lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame^] | 1 | # Configure options. |
| 2 | include $(COMMON_MK) |
| 3 | |
| 4 | CFLAGS += -O1 |
| 5 | |
| 6 | PATH := $(PATH):${CROSS_ROOT}/usr/bin |
| 7 | |
| 8 | CONFOPTS = --prefix= --disable-shared --enable-static |
| 9 | |
| 10 | ifdef CONFIG_USER_IPTABLES_IPTABLES |
| 11 | CONFOPTS += --enable-ipv4 |
| 12 | else |
| 13 | CONFOPTS += --disable-ipv4 |
| 14 | endif |
| 15 | |
| 16 | ifdef CONFIG_USER_IPTABLES_IP6TABLES |
| 17 | CONFOPTS += --enable-ipv6 |
| 18 | else |
| 19 | CONFOPTS += --disable-ipv6 |
| 20 | endif |
| 21 | |
| 22 | ifdef CONFIG_IP_NF_QUEUE |
| 23 | CONFOPTS += --enable-libipq |
| 24 | endif |
| 25 | |
| 26 | |
| 27 | all: build/build |
| 28 | $(MAKE) -C build am__configure_deps= am__aclocal_m4_deps= |
| 29 | $(MAKE) -C build install DESTDIR=`pwd`/install am__configure_deps= am__aclocal_m4_deps= |
| 30 | |
| 31 | build/build: makefile |
| 32 | @chmod u+x configure |
| 33 | @rm -rf build install |
| 34 | @mkdir build install |
| 35 | (cd build; sh ../configure CFLAGS='$(CFLAGS)' LDFLAGS='$(LDFLAGS)' $(CONFIGURE_OPTS) $(CONFOPTS)) |
| 36 | @touch build/build |
| 37 | |
| 38 | clean: |
| 39 | rm -rf build install |
| 40 | |
| 41 | romfs: |
| 42 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IPTABLES build/iptables-static /bin/iptables |
| 43 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IPTABLES -s iptables /bin/iptables-save |
| 44 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IPTABLES -s iptables /bin/iptables-restore |
| 45 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IP6TABLES build/ip6tables-static /bin/ip6tables |
| 46 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IP6TABLES -s ip6tables /bin/ip6tables-save |
| 47 | $(ROMFSINST) -e CONFIG_USER_IPTABLES_IP6TABLES -s ip6tables /bin/ip6tables-restore |