1#! /usr/bin/make
2
3EXTRAS+=libiptc/libiptc.a
4ifeq ($(DO_IPV6), 1)
5EXTRAS+=libiptc/libip6tc.a
6endif
7
8CFLAGS+=-fPIC
9
10# libiptc is not a public interface and therefore not installed
11# DEVEL_LIBS+=libiptc/libiptc.a
12
13ifndef TOPLEVEL_INCLUDED
14local:
15	cd .. && $(MAKE) $(KERN_TARGETS) $(SHARED_LIBS) $(EXTRAS)
16
17else
18EXTRA_DEPENDS+=libiptc/libip4tc.d
19
20libiptc/libiptc.a: libiptc/libiptc.a(libiptc/libip4tc.o)
21
22ifeq ($(DO_IPV6), 1)
23EXTRA_DEPENDS+= libiptc/libip6tc.d
24libiptc/libip6tc.a: libiptc/libip6tc.a(libiptc/libip6tc.o)
25endif
26
27libiptc/libip4tc.d: %.d: %.c
28	@-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d libiptc/libiptc.a($*.o):@' > $@
29libiptc/libip6tc.d: %.d: %.c
30	@-$(CC) -M -MG $(CFLAGS) $< | sed -e 's@^.*\.o:@$*.d libiptc/libip6tc.a($*.o):@' > $@
31endif
32