OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / iptables / Makefile.am
1 # -*- Makefile -*-
2
3 ACLOCAL_AMFLAGS  = -I m4
4 AUTOMAKE_OPTIONS = foreign subdir-objects
5
6 AM_CFLAGS        = ${regular_CFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CFLAGS}
7 SUBDIRS          = extensions
8 if ENABLE_DEVEL
9 SUBDIRS         += include
10 endif
11 if ENABLE_LIBIPQ
12 SUBDIRS         += libipq
13 endif
14 lib_LTLIBRARIES =
15
16 # libiptc
17 lib_LTLIBRARIES           += libiptc/libiptc.la
18 libiptc_libiptc_la_SOURCES = libiptc/libip4tc.c libiptc/libip6tc.c
19 libiptc_libiptc_la_LDFLAGS = -version-info 0:0:0
20
21 lib_LTLIBRARIES      += libxtables.la
22 libxtables_la_SOURCES = xtables.c
23 libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
24 libxtables_la_LIBADD  = -ldl
25
26 # iptables, dynamic
27 iptables_SOURCES          = iptables-standalone.c iptables.c
28 iptables_LDFLAGS          = -rdynamic
29 iptables_LDADD            = libiptc/libiptc.la extensions/libext4.a libxtables.la -lm
30
31 iptables_xml_LDADD        = libxtables.la
32 iptables_multi_SOURCES    = iptables-multi.c iptables-save.c \
33                             iptables-restore.c iptables-xml.c \
34                             iptables-standalone.c iptables.c
35 iptables_multi_CFLAGS     = ${AM_CFLAGS} -DIPTABLES_MULTI
36 iptables_multi_LDFLAGS    = ${iptables_LDFLAGS}
37 iptables_multi_LDADD      = ${iptables_LDADD}
38
39 iptables_restore_SOURCES  = iptables-restore.c iptables.c
40 iptables_restore_LDFLAGS  = ${iptables_LDFLAGS}
41 iptables_restore_LDADD    = ${iptables_LDADD}
42
43 iptables_save_SOURCES     = iptables-save.c iptables.c
44 iptables_save_LDFLAGS     = ${iptables_LDFLAGS}
45 iptables_save_LDADD       = ${iptables_LDADD}
46
47 # iptables-multi, semi-static
48 iptables_static_SOURCES   = ${iptables_multi_SOURCES} xtables.c
49 iptables_static_CFLAGS    = ${iptables_multi_CFLAGS} -DNO_SHARED_LIBS=1
50 iptables_static_LDADD     = libiptc/libiptc.la extensions/libext4.a -lm
51
52 iptables_xml_SOURCES      = iptables-xml.c
53
54 # ip6tables, dynamic
55 ip6tables_SOURCES         = ip6tables-standalone.c ip6tables.c
56 ip6tables_LDFLAGS         = -rdynamic
57 ip6tables_LDADD           = libiptc/libiptc.la extensions/libext6.a libxtables.la -lm
58
59 ip6tables_multi_SOURCES   = ip6tables-multi.c ip6tables-save.c \
60                             ip6tables-restore.c ip6tables-standalone.c \
61                             ip6tables.c
62 ip6tables_multi_CFLAGS    = ${AM_CFLAGS} -DIPTABLES_MULTI
63 ip6tables_multi_LDFLAGS   = ${ip6tables_LDFLAGS}
64 ip6tables_multi_LDADD     = ${ip6tables_LDADD}
65
66 ip6tables_restore_SOURCES = ip6tables-restore.c ip6tables.c
67 ip6tables_restore_LDFLAGS = ${ip6tables_LDFLAGS}
68 ip6tables_restore_LDADD   = ${ip6tables_LDADD}
69
70 ip6tables_save_SOURCES    = ip6tables-save.c ip6tables.c
71 ip6tables_save_LDFLAGS    = ${ip6tables_LDFLAGS}
72 ip6tables_save_LDADD      = ${ip6tables_LDADD}
73
74 # iptables-multi, semi-static
75 ip6tables_static_SOURCES    = ${ip6tables_multi_SOURCES} xtables.c
76 ip6tables_static_CFLAGS     = ${ip6tables_multi_CFLAGS} -DNO_SHARED_LIBS=1
77 ip6tables_static_LDADD      = libiptc/libiptc.la extensions/libext6.a -lm
78
79 bin_PROGRAMS     = 
80 sbin_PROGRAMS    =
81 noinst_PROGRAMS  =
82 man_MANS         = iptables.8 iptables-restore.8 iptables-save.8 \
83                    iptables-xml.8 ip6tables.8 ip6tables-restore.8 \
84                    ip6tables-save.8
85 CLEANFILES       = iptables.8 ip6tables.8
86
87 if ENABLE_STATIC
88 if ENABLE_IPV4
89 sbin_PROGRAMS += iptables-static
90 endif
91 if ENABLE_IPV6
92 sbin_PROGRAMS += ip6tables-static
93 endif
94 endif
95 if ENABLE_SHARED
96 if ENABLE_IPV4
97 sbin_PROGRAMS += iptables iptables-multi iptables-restore iptables-save
98 endif
99 if ENABLE_IPV6
100 sbin_PROGRAMS += ip6tables ip6tables-multi ip6tables-restore ip6tables-save
101 endif
102 bin_PROGRAMS   = iptables-xml
103 endif
104
105 iptables.8: ${srcdir}/iptables.8.in extensions/matches4.man extensions/targets4.man
106         ${AM_VERBOSE_GEN} sed -e 's/@PACKAGE_AND_VERSION@/${PACKAGE} ${PACKAGE_VERSION}/g' -e '/@MATCH@/ r extensions/matches4.man' -e '/@TARGET@/ r extensions/targets4.man' $< >$@;
107
108 ip6tables.8: ${srcdir}/ip6tables.8.in extensions/matches6.man extensions/targets6.man
109         ${AM_VERBOSE_GEN} sed -e 's/@PACKAGE_AND_VERSION@/${PACKAGE} ${PACKAGE_VERSION}/g' -e '/@MATCH@/ r extensions/matches6.man' -e '/@TARGET@/ r extensions/targets6.man' $< >$@;
110
111 pkgconfig_DATA = libiptc.pc xtables.pc
112
113 .PHONY: tarball
114 tarball:
115         rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION};
116         pushd ${top_srcdir} && git archive --prefix=${PACKAGE_TARNAME}-${PACKAGE_VERSION}/ HEAD | tar -C /tmp -x && popd;
117         pushd /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION} && ./autogen.sh && popd;
118         tar -C /tmp -cjf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/;
119         rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION};
120
121 config.status: extensions/GNUmakefile.in \
122         include/xtables.h.in include/iptables/internal.h.in
123
124 # Using if..fi avoids an ugly "error (ignored)" message :)
125 install-exec-hook:
126         -if test -z "${DESTDIR}"; then /sbin/ldconfig; fi;