summaryrefslogtreecommitdiff
path: root/ipl/packs/icondb/Makefile
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
committerIgor Pashev <pashev.igor@gmail.com>2013-01-28 19:02:21 +0000
commitd78e6c19ff93964183950f846868ade625e6b537 (patch)
treef2d588a9646c8496db23d3fe868d7dce4f7dfa83 /ipl/packs/icondb/Makefile
parentf944578414d5adc0c6c3fb22ad5808077444a410 (diff)
parentf627f77f23d1497c9e1f4269b5c8812d12b42f18 (diff)
downloadicon-d78e6c19ff93964183950f846868ade625e6b537.tar.gz
Merge tag 'upstream/9.5.0'
Upstream version 9.5.0
Diffstat (limited to 'ipl/packs/icondb/Makefile')
-rw-r--r--ipl/packs/icondb/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/ipl/packs/icondb/Makefile b/ipl/packs/icondb/Makefile
new file mode 100644
index 0000000..5e616c4
--- /dev/null
+++ b/ipl/packs/icondb/Makefile
@@ -0,0 +1,41 @@
+# icondb -- Icon database interface contributed by Carl Sturtivant.
+
+# Requires GNU make, gcc, mysql utilities, and mysql development package.
+
+ifndef TARGET
+
+ifneq ($(strip $(shell g++ -v 2>&1 | grep "darwin")),)
+TARGET=mac
+else
+ifneq ($(strip $(shell g++ -v 2>&1 | grep "cygwin")),)
+TARGET=cygwin
+else
+TARGET=other
+endif
+endif
+
+endif #TARGET
+
+
+ICON_PATH=../../..
+
+
+SHARED_mac = -bundle -undefined suppress
+SHARED_cygwin = -shared
+SHARED_other = -shared
+
+PIC_mac = -flat_namespace
+PIC_other = -fPIC
+
+EXTRA_cygwin = $(ICON_PATH)/bin/iload.a -Wl,--enable-auto-import
+EXTRA_other = -I./
+
+
+default:
+ icont -ucs icondb.icn
+ cp icondb.u1 icondb.u2 $(ICON_PATH)/lib
+ sh -c "gcc -I../../cfuncs $(SHARED_$(TARGET)) -o mysqldb.so $(PIC_$(TARGET)) `mysql_config --cflags` mysqldb.c `mysql_config --libs`"
+ cp mysqldb.so $(ICON_PATH)/bin
+
+clean Clean:
+ rm -f *.u? *.o *.so */*.o */*.u? */*.so