summaryrefslogtreecommitdiffstats
path: root/ippool/Makefile
blob: 100c2e43cb3442bd6330fa28fe80dffe4db23505 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
EXTRAS+=$(shell [ -f $(KERNEL_DIR)/include/linux/netfilter_ipv4/ip_pool.h ] && echo ippool/libippool.a ippool/ippool)

ifndef TOPLEVEL_INCLUDED
local:
	cd .. && $(MAKE) $(KERN_TARGETS) $(SHARED_LIBS) $(EXTRAS)

else
EXTRA_DEPENDS+=$(shell [ -f $(KERNEL_DIR)/include/linux/netfilter_ipv4/ip_pool.h ] && echo ippool/libippool.d)

ippool/libippool.a: ippool/libippool.a(ippool/libippool.o)

ippool/libippool.d: %.d: %.c
	@-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d $*.a($*.o):@' > $@

ippool/ippool.o: ippool/ippool.c
ippool/ippool: ippool/ippool.o ippool/libippool.a
	$(CC) $(CFLAGS) -o $@ $^
endif