summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-08-09 15:07:26 +0300
committerTimo Teräs <timo.teras@iki.fi>2010-08-09 15:07:26 +0300
commitb5a5dd614101000f653e6ecb96ab34ae3f44353f (patch)
tree5b9cb2a8b9d56eefc2e044d8845bb5fbedb6ba49 /Makefile
parent02e7cfc6b4603be8ff3b69abbfad50193aaee845 (diff)
downloadsquark-b5a5dd614101000f653e6ecb96ab34ae3f44353f.tar.bz2
squark-b5a5dd614101000f653e6ecb96ab34ae3f44353f.tar.xz
squarkdb: cmph based url database for squark filtering
Implement basics of squarkdb which will be used by squark-filter to categorize URIs. Implementation is based on libcmph and uses file format suitable to be mmap:ed from squark-filter. Lua code is used to create the squark database from standard domain / url blacklists.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 01d7400..329c66a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,22 @@
+TARGETS=squark-auth squarkdb.so
+
+NETSNMP_CFLAGS:=$(shell net-snmp-config --cflags)
+NETSNMP_LIBS:=$(shell net-snmp-config --libs)
+LUA_CFLAGS:=$(shell pkg-config --cflags lua5.1)
+LUA_LIBS:=$(shell pkg-config --libs lua5.1)
+CMPH_CFLAGS:=$(shell pkg-config --cflags cmph)
+CMPH_LIBS:=$(shell pkg-config --libs cmph)
+
CC=gcc
-OBJS1=squark-auth.o
-TARGETS=squark-auth
-CFLAGS=-g -I. $(shell net-snmp-config --cflags) -std=gnu99 -Wall
-BUILDLIBS=$(shell net-snmp-config --libs)
+CFLAGS=-g -I. $(NETSNMP_CFLAGS) $(LUA_CFLAGS) $(CMPH_CFLAGS) -std=gnu99 -Wall
all: $(TARGETS)
-squark-auth: $(OBJS1)
- $(CC) -g -o $@ $(OBJS1) $(BUILDLIBS) -nopie
+squark-auth: squark-auth.o
+ $(CC) -o $@ $< $(NETSNMP_LIBS)
+
+squarkdb.so: lua-squarkdb.o squarkdb.o
+ $(CC) -shared -o $@ $^ $(LUA_LIBS) $(CMPH_LIBS)
clean:
rm $(OBJS1) $(TARGETS)