blob: b3548e81eca85607f84c41e82a6fa7b03160f449 [file] [log] [blame]
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00001#! /usr/bin/make
2
Bart De Schuymer005837e2008-02-21 21:32:25 +00003EXT_FUNC+=802_3 nat arp arpreply ip ip6 standard log redirect vlan mark_m mark \
Bart De Schuymer5e2ddb42009-02-12 20:14:03 +00004 pkttype stp among limit ulog nflog
Bart De Schuymer1abc55d2002-06-01 19:23:47 +00005EXT_TABLES+=filter nat broute
6EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/ebt_$(T).o)
7EXT_OBJS+=$(foreach T,$(EXT_TABLES), extensions/ebtable_$(T).o)
Bart De Schuymer64182a32004-01-21 20:39:54 +00008EXT_LIBS+=$(foreach T,$(EXT_FUNC), extensions/libebt_$(T).so)
9EXT_LIBS+=$(foreach T,$(EXT_TABLES), extensions/libebtable_$(T).so)
10EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -lebt_$(T))
11EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
12
13extensions/ebt_%.so: extensions/ebt_%.o
Bart De Schuymer0f9c5012011-08-11 18:47:17 +000014 $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
Bart De Schuymer64182a32004-01-21 20:39:54 +000015
16extensions/libebt_%.so: extensions/ebt_%.so
17 mv $< $@
18
19extensions/ebtable_%.so: extensions/ebtable_%.o
Bart De Schuymer078161d2010-03-16 13:10:37 +000020 $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
Bart De Schuymer64182a32004-01-21 20:39:54 +000021
22extensions/libebtable_%.so: extensions/ebtable_%.so
23 mv $< $@
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000024
25extensions/ebt_%.o: extensions/ebt_%.c include/ebtables_u.h
Bart De Schuymer17c60f52006-12-14 18:55:44 +000026 $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES)
Bart De Schuymer0f8c4992002-11-20 19:41:02 +000027
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000028extensions/ebtable_%.o: extensions/ebtable_%.c
Bart De Schuymer17c60f52006-12-14 18:55:44 +000029 $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES)
Bart De Schuymer1abc55d2002-06-01 19:23:47 +000030