summary refs log tree commit diff stats
path: root/plugins/fishlim/Makefile
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-07-11 19:46:46 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-07-11 19:46:46 +0200
commit1ea726a91809340451c7a05ede34e7be00ba7863 (patch)
tree936bb6fce5c26b3876a7324ec82ee0bb232875d7 /plugins/fishlim/Makefile
parentd81619cca95831e2fd444d71cd078201f3db0e39 (diff)
parent9d9c24c8d347aa44efbd63e8f8c8dfb5b3cddedb (diff)
Merge branch 'wdk'
Diffstat (limited to 'plugins/fishlim/Makefile')
-rw-r--r--plugins/fishlim/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/plugins/fishlim/Makefile b/plugins/fishlim/Makefile
new file mode 100644
index 00000000..3f0e93d2
--- /dev/null
+++ b/plugins/fishlim/Makefile
@@ -0,0 +1,40 @@
+
+OURCFLAGS = -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic `pkg-config --cflags glib-2.0 libcrypto` -DG_DISABLE_DEPRECATED=1 -fPIC $(CFLAGS)
+#OURLINKFLAGS = `pkg-config --libs glib-2.0 libcrypto` -shared -fPIC -Wl,-z,defs $(CFLAGS) $(LDFLAGS)
+OURLINKFLAGS = `pkg-config --libs glib-2.0 libcrypto` $(CFLAGS) $(LDFLAGS)
+
+BASE_OBJECTS = irc.o fish.o keystore.o misc.o
+PLUGIN_OBJECTS = $(BASE_OBJECTS) plugin_xchat.o
+TEST_OBJECTS = $(BASE_OBJECTS) test.o
+
+all: fishlim.so test
+
+fish.o: fish.h keystore.h misc.h
+irc.o: irc.h
+keystore.o: keystore.h irc.h fish.h misc.h plugin_xchat.h
+misc.o: misc.h
+test.o: fish.h
+plugin_xchat.o: fish.h irc.h keystore.h plugin_xchat.h
+
+.c.o:
+	$(CC) $(OURCFLAGS) -c $< -o $@
+
+fishlim.so: $(PLUGIN_OBJECTS)
+	$(CC) -shared $(OURLINKFLAGS) $(PLUGIN_OBJECTS) -o $@
+
+test: $(TEST_OBJECTS)
+	$(CC) $(TEST_OBJECTS) -o $@ $(OURLINKFLAGS)
+
+
+.PHONY: all clean distclean install uninstall
+clean:
+	-$(RM) -f $(PLUGIN_OBJECTS) $(TEST_OBJECTS) fishlim.so test
+distclean: clean
+
+install: fishlim.so
+	install -d $(DESTDIR)/usr/lib/xchat/plugins/
+	install -m 644 fishlim.so $(DESTDIR)/usr/lib/xchat/plugins/
+uninstall:
+	rm $(DESTDIR)/usr/lib/xchat/plugins/fishlim.so
+
+