summary refs log tree commit diff stats
path: root/plugins/fishlim
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-07-18 10:51:22 +0200
committerBerke Viktor <bviktor@hexchat.org>2012-07-18 10:51:22 +0200
commit1d3c6d672eaa8d97fa24f52b14efc9ec79d71929 (patch)
tree3b72159f6433e076880b5350d61c46d1a2b68fab /plugins/fishlim
parent0cf80ecb321f493e3e35d544a970def9dab4f96a (diff)
Add make support for FiSHLiM on Unix
Diffstat (limited to 'plugins/fishlim')
-rw-r--r--plugins/fishlim/Makefile40
-rw-r--r--plugins/fishlim/Makefile.am9
-rw-r--r--plugins/fishlim/plugin_xchat.c4
3 files changed, 9 insertions, 44 deletions
diff --git a/plugins/fishlim/Makefile b/plugins/fishlim/Makefile
deleted file mode 100644
index 3f0e93d2..00000000
--- a/plugins/fishlim/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-
-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
-
-
diff --git a/plugins/fishlim/Makefile.am b/plugins/fishlim/Makefile.am
new file mode 100644
index 00000000..951af6cd
--- /dev/null
+++ b/plugins/fishlim/Makefile.am
@@ -0,0 +1,9 @@
+EXTRA_DIST = INSTALL LICENSE README
+
+libdir = $(hexchatlibdir)/plugins
+
+lib_LTLIBRARIES = fishlim.la
+fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_xchat.c
+fishlim_la_LDFLAGS = -avoid-version -module 
+fishlim_la_LIBADD = 
+INCLUDES = $(COMMON_CFLAGS) -I$(srcdir)/..
diff --git a/plugins/fishlim/plugin_xchat.c b/plugins/fishlim/plugin_xchat.c
index 5e261116..d1d3f5ca 100644
--- a/plugins/fishlim/plugin_xchat.c
+++ b/plugins/fishlim/plugin_xchat.c
@@ -27,11 +27,7 @@
 #include <string.h>
 
 // #pragma GCC visibility push(default)
-#ifdef _MSC_VER
 #include "xchat-plugin.h"
-#else
-#include <xchat/xchat-plugin.h>
-#endif
 #define XCHAT_MAX_WORDS 32
 // #pragma GCC visibility pop