summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2015-06-21 12:25:47 (GMT)
committerSamuel Lidén Borell <samuel@kodafritt.se>2015-06-21 12:27:10 (GMT)
commitd8dc08559e39c051edfb47460ba699862be25a51 (patch)
tree2519d0078a18591532312d48e4b9120b22d2fcf0
parenta0396e8e26799051c457d71c71472d4221f3c06e (diff)
downloadfishlim-d8dc08559e39c051edfb47460ba699862be25a51.zip
fishlim-d8dc08559e39c051edfb47460ba699862be25a51.tar.gz
fishlim-d8dc08559e39c051edfb47460ba699862be25a51.tar.bz2
Multiarch support
-rw-r--r--Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3f0e93d..289b796 100644
--- a/Makefile
+++ b/Makefile
@@ -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