1 IPTABLES_SRC
=..
/iptables
2 IPTABLES_VERSION
= $(shell cat
$(IPTABLES_SRC
)/Makefile | grep
-e
'^IPTABLES_VERSION:=' | cut
-d
"=" -f2
)
3 IPTABLES_OPTION
= -DIPTABLES_VERSION
=\"$(IPTABLES_VERSION
)\"
6 all: libipt_ipp2p.so ipt_ipp2p.o
8 modules
: ipt_ipp2p.h ipt_ipp2p.c Makefile
9 $(CC
) $(CFLAGS
) -c ipt_ipp2p.c
-o ipt_ipp2p_mod.o
10 $(LD
) -o ipt_ipp2p.o
-r ipt_ipp2p_mod.o
13 @make
-C
$(LINUXDIR
) SUBDIRS
=$(shell pwd
) modules
15 libipt_ipp2p.so
: libipt_ipp2p.c ipt_ipp2p.h Makefile
16 $(CC
) -Os
-Wall
$(IPTABLES_OPTION
) -I
$(LINUXDIR
)/include -I
$(IPTABLES_SRC
)/include -fPIC
-c libipt_ipp2p.c
17 $(CC
) -shared
-o
$@ libipt_ipp2p.o
18 # mipsel-uclibc-gcc -O2 -Wall -Wunused -I/wg/tomato/release/src/linux/linux/include -I../iptables/include/ -DIPTABLES_VERSION=\"1.3.6\" -fPIC -o libipt_ipp2p_sh.o -c libipt_ipp2p.c
19 # mipsel-uclibc-gcc -shared -o libipt_ipp2p.so libipt_ipp2p_sh.o
22 install -D
-m
0644 ipt_ipp2p.o
$(INSTALLDIR
)/lib
/modules
/2.4.20/kernel
/net
/ipv4
/netfilter
/ipt_ipp2p.o
23 $(STRIP
) -x
$(INSTALLDIR
)/lib
/modules
/2.4.20/kernel
/net
/ipv4
/netfilter
/ipt_ipp2p.o
24 install -D libipt_ipp2p.so
$(INSTALLDIR
)/usr
/lib
/iptables
/libipt_ipp2p.so
25 $(STRIP
) $(INSTALLDIR
)/usr
/lib
/iptables
/libipt_ipp2p.so