diff options
author | Timo Teräs <timo.teras@iki.fi> | 2010-11-07 01:12:05 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2010-11-07 01:12:05 +0200 |
commit | 660b77270e599fed9a8a6bc94a0e2d44b8f282dd (patch) | |
tree | ba2a630e6365e96c7ec5a43bfde757a870c99a5e /src/Makefile | |
parent | 25593b5e6fea76ed7c08db586924032c0810c27e (diff) | |
download | squark-660b77270e599fed9a8a6bc94a0e2d44b8f282dd.tar.bz2 squark-660b77270e599fed9a8a6bc94a0e2d44b8f282dd.tar.xz |
build: use build system from apk-tools/opennhrp
Diffstat (limited to 'src/Makefile')
-rw-r--r-- | src/Makefile | 43 |
1 files changed, 19 insertions, 24 deletions
diff --git a/src/Makefile b/src/Makefile index db683a2..5863414 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,30 +1,25 @@ -TARGETS=squark-auth-snmp squark-auth-ip squark-filter squarkdb.so +progs-y += squark-filter squark-auth-snmp squark-auth-ip +shlibs-y += squarkdb.so +scripts-y += sqdb-build.lua -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) +common-objs += filterdb.o authdb.o blob.o addr.o -CC=gcc -CFLAGS=-g -I. $(NETSNMP_CFLAGS) $(LUA_CFLAGS) $(CMPH_CFLAGS) -std=gnu99 -D_GNU_SOURCE -Wall -LIBS+=-lrt +squark-filter-objs += squark-filter.o $(common-objs) +squark-auth-snmp-objs += squark-auth-snmp.o $(common-objs) +squark-auth-ip-objs += squark-auth-ip.o $(common-objs) +squarkdb.so-objs += lua-squarkdb.o filterdb.o blob.o -all: $(TARGETS) +CFLAGS += -DSQUARK_VERSION=\"$(FULL_VERSION)\" +LIBS += -lrt -squark-auth-snmp: squark-auth-snmp.o filterdb.o authdb.o blob.o addr.o - $(CC) -o $@ $^ $(NETSNMP_LIBS) $(LIBS) +CFLAGS_lua-squarkdb.o += $(shell pkg-config --cflags lua5.1) +LIBS_squark-filter += $(shell pkg-config --libs cmph) +LIBS_squark-auth-snmp += $(shell net-snmp-config --libs) +LIBS_squarkdb.so += $(shell pkg-config --libs lua5.1) -squark-auth-ip: squark-auth-ip.o filterdb.o authdb.o blob.o addr.o - $(CC) -o $@ $^ $(LIBS) - -squark-filter: squark-filter.o filterdb.o authdb.o blob.o addr.o - $(CC) -o $@ $^ $(CMPH_LIBS) $(LIBS) - -squarkdb.so: lua-squarkdb.o filterdb.o blob.o - $(CC) -shared -o $@ $^ $(LUA_LIBS) $(CMPH_LIBS) $(LIBS) - -clean: - rm $(OBJS1) $(TARGETS) +install: + $(INSTALLDIR) $(DESTDIR)$(BINDIR) + $(INSTALL) $(addprefix $(obj)/,$(progs-y) $(scripts-y)) $(DESTDIR)$(BINDIR) + $(INSTALLDIR) $(DESTDIR)$(LUALIBDIR) + $(INSTALL) $(addprefix $(obj)/,$(shlibs-y)) $(DESTDIR)$(LUALIBDIR)
\ No newline at end of file |