diff options
author | laforge <laforge> | 2000-08-10 11:45:49 +0000 |
---|---|---|
committer | laforge <laforge> | 2000-08-10 11:45:49 +0000 |
commit | 36b5562a3fa5f7e3f5990567c0c7d5b5b401dd1a (patch) | |
tree | 41aa2e037555362c319a69cb46b596ea0b2fb0da /Makefile | |
parent | f9b17cad817b6770cb68f3e13d326ed74dbf07c6 (diff) |
Initial revision
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9cb52f6 --- /dev/null +++ b/Makefile @@ -0,0 +1,33 @@ +# Path of libipulog (from iptables) +LIBIPULOG=../libipulog + +# Names of the plugins to be compiled +ULOGD_SL:=BASE OPRINT + + +# Normally You should not need to change anything below +# +CC = gcc +CFLAGS = -I. -I$(LIBIPULOG)/include -g -Wall +SH_CFLAGS:=$(CFLAGS) -fPIC + +SHARED_LIBS+=$(foreach T,$(ULOGD_SL),extensions/ulogd_$(T).so) + +all: $(SHARED_LIBS) ulogd + +$(SHARED_LIBS): %.so: %_sh.o + ld -shared -o $@ $< + +%_sh.o: %.c + gcc $(SH_CFLAGS) -o $@ -c $< + +ulogd: ulogd.c ../libipulog/libipulog.a ulogd.h + $(CC) $(CFLAGS) -rdynamic -ldl -i ulogd.c $(LIBIPULOG)/libipulog.a -o ulogd + +clean: + rm -f ulogd extensions/*.o extensions/*.so + +install: all + mkdir -p /usr/local/lib/ulogd && cp extensions/*.so /usr/local/lib/ulogd + cp ulogd /usr/local/sbin + |