From b5a5dd614101000f653e6ecb96ab34ae3f44353f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 9 Aug 2010 15:07:26 +0300 Subject: 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. --- Makefile | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'Makefile') 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) -- cgit v1.2.3