summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2014-03-19 21:28:17 +0100
committerSebastian Reichel <sre@ring0.de>2014-03-19 21:28:17 +0100
commit0d0f1085dc41c2090bb8716833a8e5bc214f284a (patch)
treebe2b9ec92f6c92e915c3db1f993c99f89790da42
parentc801db6599baec20408a43368eacbb8470976ed3 (diff)
downloadisi-wireshark-plugin-0d0f1085dc41c2090bb8716833a8e5bc214f284a.tar.bz2
wireshark provides a pkg-config file now
-rw-r--r--Makefile7
-rw-r--r--config.mk3
2 files changed, 4 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ffe9f0c..4ea4617 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
include config.mk
-CFLAGS +=-I${WIRESHARKDIR} -DHAVE_STDARG_H -DHAVE_CONFIG_H -g -Wall -Wno-unused
+CFLAGS += -DHAVE_CONFIG_H -g -Wall -Wno-unused
+PLUGINDIR := `pkg-config --variable=plugindir wireshark`
SOURCES := $(wildcard src/*.c)
OBJECTS := $(patsubst %.c, %.o, $(SOURCES))
@@ -8,7 +9,7 @@ all: isi.so
%.o: %.c
@echo "[CC] $<"
- @$(CC) -o $@ $(CFLAGS) `pkg-config --cflags glib-2.0` -c -fPIC $<
+ @$(CC) -o $@ $(CFLAGS) `pkg-config --cflags glib-2.0 wireshark` -c -fPIC $<
isi.so: $(OBJECTS)
@echo "[LD] $@"
@@ -18,6 +19,6 @@ clean:
@rm -f isi.so $(OBJECTS)
install: isi.so
- install -m 644 isi.so $(DESTDIR)${PREFIX}/${PLUGINDIR}
+ install -m 644 isi.so $(DESTDIR)/${PLUGINDIR}
.PHONEY: all clean install
diff --git a/config.mk b/config.mk
index 3d2fc43..73bb091 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,2 @@
#use this to compile with USB support
#CFLAGS?=-DISI_USB
-PREFIX?=/usr
-PLUGINDIR?=lib/x86_64-linux-gnu/wireshark/libwireshark3/plugins
-WIRESHARKDIR?=/usr/include/wireshark