diff options
-rw-r--r-- | Makefile | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,8 +1,15 @@ -OURCFLAGS = -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic `pkg-config --cflags glib-2.0 libcrypto` -DG_DISABLE_DEPRECATED=1 -fPIC $(CFLAGS) +OURCFLAGS = -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic -g `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) +# The prefix of the HexChat installation +PREFIX ?= /usr +# needs to be adjusted on non-multiarch distributions +LIBDIR ?= $(PREFIX)/lib/`gcc -print-multiarch` +#MULTILIB = $(PREFIX)/lib # on 32-bit systems and on some 64-bit systems +#MULTILIB = $(PREFIX)/lib64 # on 64-bit Fedora/CentOS/RedHat/etc. + BASE_OBJECTS = irc.o fish.o keystore.o misc.o PLUGIN_OBJECTS = $(BASE_OBJECTS) plugin_xchat.o TEST_OBJECTS = $(BASE_OBJECTS) test.o @@ -32,9 +39,9 @@ clean: distclean: clean install: fishlim.so - install -d $(DESTDIR)/usr/lib/xchat/plugins/ - install -m 644 fishlim.so $(DESTDIR)/usr/lib/xchat/plugins/ + install -d $(DESTDIR)$(LIBDIR)/hexchat/plugins/ + install -m 644 fishlim.so $(DESTDIR)$(LIBDIR)/hexchat/plugins/ uninstall: - rm $(DESTDIR)/usr/lib/xchat/plugins/fishlim.so + rm $(DESTDIR)$(LIBDIR)/hexchat/plugins/fishlim.so |