Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 1 | #! /usr/bin/make |
| 2 | |
Bart De Schuymer | 005837e | 2008-02-21 21:32:25 +0000 | [diff] [blame] | 3 | EXT_FUNC+=802_3 nat arp arpreply ip ip6 standard log redirect vlan mark_m mark \ |
Bart De Schuymer | 5e2ddb4 | 2009-02-12 20:14:03 +0000 | [diff] [blame] | 4 | pkttype stp among limit ulog nflog |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 5 | EXT_TABLES+=filter nat broute |
| 6 | EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/ebt_$(T).o) |
| 7 | EXT_OBJS+=$(foreach T,$(EXT_TABLES), extensions/ebtable_$(T).o) |
Bart De Schuymer | 64182a3 | 2004-01-21 20:39:54 +0000 | [diff] [blame] | 8 | EXT_LIBS+=$(foreach T,$(EXT_FUNC), extensions/libebt_$(T).so) |
| 9 | EXT_LIBS+=$(foreach T,$(EXT_TABLES), extensions/libebtable_$(T).so) |
| 10 | EXT_LIBSI+=$(foreach T,$(EXT_FUNC), -lebt_$(T)) |
| 11 | EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T)) |
| 12 | |
| 13 | extensions/ebt_%.so: extensions/ebt_%.o |
Bart De Schuymer | 0f9c501 | 2011-08-11 18:47:17 +0000 | [diff] [blame^] | 14 | $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles |
Bart De Schuymer | 64182a3 | 2004-01-21 20:39:54 +0000 | [diff] [blame] | 15 | |
| 16 | extensions/libebt_%.so: extensions/ebt_%.so |
| 17 | mv $< $@ |
| 18 | |
| 19 | extensions/ebtable_%.so: extensions/ebtable_%.o |
Bart De Schuymer | 078161d | 2010-03-16 13:10:37 +0000 | [diff] [blame] | 20 | $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles |
Bart De Schuymer | 64182a3 | 2004-01-21 20:39:54 +0000 | [diff] [blame] | 21 | |
| 22 | extensions/libebtable_%.so: extensions/ebtable_%.so |
| 23 | mv $< $@ |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 24 | |
| 25 | extensions/ebt_%.o: extensions/ebt_%.c include/ebtables_u.h |
Bart De Schuymer | 17c60f5 | 2006-12-14 18:55:44 +0000 | [diff] [blame] | 26 | $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) |
Bart De Schuymer | 0f8c499 | 2002-11-20 19:41:02 +0000 | [diff] [blame] | 27 | |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 28 | extensions/ebtable_%.o: extensions/ebtable_%.c |
Bart De Schuymer | 17c60f5 | 2006-12-14 18:55:44 +0000 | [diff] [blame] | 29 | $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) |
Bart De Schuymer | 1abc55d | 2002-06-01 19:23:47 +0000 | [diff] [blame] | 30 | |