summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 4ea4617080d41e1a05559a89e87f013c4d56716e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
include config.mk

CFLAGS      += -DHAVE_CONFIG_H -g -Wall -Wno-unused
PLUGINDIR   := `pkg-config --variable=plugindir wireshark`
SOURCES     := $(wildcard src/*.c)
OBJECTS     := $(patsubst %.c, %.o, $(SOURCES))

all: isi.so

%.o: %.c
	@echo "[CC] $<"
	@$(CC) -o $@ $(CFLAGS) `pkg-config --cflags glib-2.0 wireshark` -c -fPIC $<

isi.so: $(OBJECTS)
	@echo "[LD] $@"
	@$(CC) -o $@ -shared -Wl,-soname,$@ $^

clean:
	@rm -f isi.so $(OBJECTS)

install: isi.so
	install -m 644 isi.so $(DESTDIR)/${PLUGINDIR}

.PHONEY: all clean install