Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 1 | # -*- Makefile -*- |
| 2 | |
Jan Engelhardt | 0086b8b | 2009-01-07 15:11:59 +0100 | [diff] [blame] | 3 | ACLOCAL_AMFLAGS = -I m4 |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 4 | AUTOMAKE_OPTIONS = foreign subdir-objects |
Jan Engelhardt | fb6209a | 2008-01-29 13:32:07 +0000 | [diff] [blame] | 5 | |
Jan Engelhardt | ca7cd66 | 2008-02-11 01:23:01 +0100 | [diff] [blame] | 6 | AM_CFLAGS = ${regular_CFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CFLAGS} |
Jan Engelhardt | 52edda6 | 2009-01-12 07:21:20 +0100 | [diff] [blame] | 7 | SUBDIRS = extensions |
Jan Engelhardt | f567ac9 | 2009-02-12 15:01:37 +0100 | [diff] [blame] | 8 | if ENABLE_DEVEL |
| 9 | SUBDIRS += include |
| 10 | endif |
Jan Engelhardt | 77f1538 | 2008-02-11 15:01:03 +0100 | [diff] [blame] | 11 | if ENABLE_LIBIPQ |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 12 | SUBDIRS += libipq |
| 13 | endif |
Jan Engelhardt | db6d027 | 2010-03-27 12:48:55 +0100 | [diff] [blame] | 14 | if HAVE_LIBNFNETLINK |
| 15 | SUBDIRS += utils |
| 16 | endif |
Jan Engelhardt | 51bc836 | 2009-02-11 16:40:29 +0100 | [diff] [blame] | 17 | lib_LTLIBRARIES = |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 18 | |
| 19 | # libiptc |
Jan Engelhardt | bb5c136 | 2009-07-23 15:06:16 +0200 | [diff] [blame] | 20 | lib_LTLIBRARIES += libiptc/libip4tc.la libiptc/libip6tc.la libiptc/libiptc.la |
Jan Engelhardt | cc43440 | 2009-06-01 13:36:30 +0200 | [diff] [blame] | 21 | libiptc_libiptc_la_SOURCES = |
| 22 | libiptc_libiptc_la_LIBADD = libiptc/libip4tc.la libiptc/libip6tc.la |
Jan Engelhardt | 655ae6b | 2010-09-13 16:06:50 +0200 | [diff] [blame] | 23 | libiptc_libiptc_la_LDFLAGS = -version-info 0:0:0 ${libiptc_LDFLAGS2} |
Jan Engelhardt | cc43440 | 2009-06-01 13:36:30 +0200 | [diff] [blame] | 24 | libiptc_libip4tc_la_SOURCES = libiptc/libip4tc.c |
| 25 | libiptc_libip4tc_la_LDFLAGS = -version-info 0:0:0 |
| 26 | libiptc_libip6tc_la_SOURCES = libiptc/libip6tc.c |
Jan Engelhardt | 655ae6b | 2010-09-13 16:06:50 +0200 | [diff] [blame] | 27 | libiptc_libip6tc_la_LDFLAGS = -version-info 0:0:0 ${libiptc_LDFLAGS2} |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 28 | |
Jan Engelhardt | 51bc836 | 2009-02-11 16:40:29 +0100 | [diff] [blame] | 29 | lib_LTLIBRARIES += libxtables.la |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 30 | libxtables_la_SOURCES = xtables.c |
Jan Engelhardt | dacafa5 | 2009-01-27 20:56:23 +0100 | [diff] [blame] | 31 | libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage} |
Jan Engelhardt | b79ec69 | 2009-07-23 17:41:21 +0200 | [diff] [blame] | 32 | if ENABLE_SHARED |
| 33 | libxtables_la_CFLAGS = ${AM_CFLAGS} |
Jan Engelhardt | 5c3e076 | 2009-02-10 10:20:19 +0100 | [diff] [blame] | 34 | libxtables_la_LIBADD = -ldl |
Jan Engelhardt | b79ec69 | 2009-07-23 17:41:21 +0200 | [diff] [blame] | 35 | else |
| 36 | libxtables_la_CFLAGS = ${AM_CFLAGS} -DNO_SHARED_LIBS=1 |
| 37 | libxtables_la_LIBADD = |
| 38 | endif |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 39 | |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 40 | iptables_multi_SOURCES = iptables-multi.c iptables-save.c \ |
| 41 | iptables-restore.c iptables-xml.c \ |
Jan Engelhardt | f89c171 | 2009-06-12 20:48:52 +0200 | [diff] [blame] | 42 | iptables-standalone.c iptables.c xshared.c |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 43 | iptables_multi_CFLAGS = ${AM_CFLAGS} -DIPTABLES_MULTI |
Jan Engelhardt | b79ec69 | 2009-07-23 17:41:21 +0200 | [diff] [blame] | 44 | if ENABLE_STATIC |
| 45 | iptables_multi_CFLAGS += -DALL_INCLUSIVE |
| 46 | endif |
Jan Engelhardt | 80fcb7b | 2009-07-25 18:18:36 +0200 | [diff] [blame] | 47 | iptables_multi_LDFLAGS = -rdynamic |
| 48 | iptables_multi_LDADD = libiptc/libip4tc.la extensions/libext4.a libxtables.la -lm |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 49 | |
| 50 | ip6tables_multi_SOURCES = ip6tables-multi.c ip6tables-save.c \ |
| 51 | ip6tables-restore.c ip6tables-standalone.c \ |
Jan Engelhardt | f89c171 | 2009-06-12 20:48:52 +0200 | [diff] [blame] | 52 | ip6tables.c xshared.c |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 53 | ip6tables_multi_CFLAGS = ${AM_CFLAGS} -DIPTABLES_MULTI |
Jan Engelhardt | b79ec69 | 2009-07-23 17:41:21 +0200 | [diff] [blame] | 54 | if ENABLE_STATIC |
| 55 | ip6tables_multi_CFLAGS += -DALL_INCLUSIVE |
| 56 | endif |
Jan Engelhardt | 80fcb7b | 2009-07-25 18:18:36 +0200 | [diff] [blame] | 57 | ip6tables_multi_LDFLAGS = -rdynamic |
| 58 | ip6tables_multi_LDADD = libiptc/libip6tc.la extensions/libext6.a libxtables.la -lm |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 59 | |
Jan Engelhardt | 52edda6 | 2009-01-12 07:21:20 +0100 | [diff] [blame] | 60 | sbin_PROGRAMS = |
Jan Engelhardt | 52edda6 | 2009-01-12 07:21:20 +0100 | [diff] [blame] | 61 | man_MANS = iptables.8 iptables-restore.8 iptables-save.8 \ |
| 62 | iptables-xml.8 ip6tables.8 ip6tables-restore.8 \ |
| 63 | ip6tables-save.8 |
| 64 | CLEANFILES = iptables.8 ip6tables.8 |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 65 | |
Jan Engelhardt | a094eb0 | 2009-04-03 22:37:49 +0200 | [diff] [blame] | 66 | if ENABLE_IPV4 |
Jan Engelhardt | 80fcb7b | 2009-07-25 18:18:36 +0200 | [diff] [blame] | 67 | sbin_PROGRAMS += iptables-multi |
| 68 | v4_bin_links = iptables-xml |
| 69 | v4_sbin_links = iptables iptables-restore iptables-save |
Jan Engelhardt | a094eb0 | 2009-04-03 22:37:49 +0200 | [diff] [blame] | 70 | endif |
Jan Engelhardt | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame] | 71 | if ENABLE_IPV6 |
Jan Engelhardt | 80fcb7b | 2009-07-25 18:18:36 +0200 | [diff] [blame] | 72 | sbin_PROGRAMS += ip6tables-multi |
| 73 | v6_sbin_links = ip6tables ip6tables-restore ip6tables-save |
Jan Engelhardt | 8e58613 | 2009-04-03 22:28:34 +0200 | [diff] [blame] | 74 | endif |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 75 | |
| 76 | iptables.8: ${srcdir}/iptables.8.in extensions/matches4.man extensions/targets4.man |
Jan Engelhardt | 8d67190 | 2009-01-08 18:03:45 +0100 | [diff] [blame] | 77 | ${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' $< >$@; |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 78 | |
| 79 | ip6tables.8: ${srcdir}/ip6tables.8.in extensions/matches6.man extensions/targets6.man |
Jan Engelhardt | 8d67190 | 2009-01-08 18:03:45 +0100 | [diff] [blame] | 80 | ${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' $< >$@; |
Jan Engelhardt | f82070f | 2008-01-20 13:14:00 +0000 | [diff] [blame] | 81 | |
Jan Engelhardt | 51bc836 | 2009-02-11 16:40:29 +0100 | [diff] [blame] | 82 | pkgconfig_DATA = libiptc.pc xtables.pc |
Jan Engelhardt | 126c136 | 2008-08-04 18:37:38 +0200 | [diff] [blame] | 83 | |
Jan Engelhardt | a31cdd8 | 2008-03-03 13:04:07 +0100 | [diff] [blame] | 84 | .PHONY: tarball |
| 85 | tarball: |
Jan Engelhardt | e6610c8 | 2008-04-17 10:32:13 +0200 | [diff] [blame] | 86 | rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION}; |
Jan Engelhardt | 9e81228 | 2008-09-01 14:27:19 +0200 | [diff] [blame] | 87 | pushd ${top_srcdir} && git archive --prefix=${PACKAGE_TARNAME}-${PACKAGE_VERSION}/ HEAD | tar -C /tmp -x && popd; |
Jan Engelhardt | e6610c8 | 2008-04-17 10:32:13 +0200 | [diff] [blame] | 88 | pushd /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION} && ./autogen.sh && popd; |
| 89 | tar -C /tmp -cjf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/; |
| 90 | rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION}; |
Jan Engelhardt | ee38146 | 2008-08-13 14:43:22 +0200 | [diff] [blame] | 91 | |
Jan Engelhardt | 2c2466b | 2009-02-17 15:04:57 +0100 | [diff] [blame] | 92 | config.status: extensions/GNUmakefile.in \ |
| 93 | include/xtables.h.in include/iptables/internal.h.in |
Jan Engelhardt | 75e8b13 | 2008-09-08 15:42:06 +0200 | [diff] [blame] | 94 | |
Jan Engelhardt | c7f70f1 | 2009-03-30 01:28:44 +0200 | [diff] [blame] | 95 | # Using if..fi avoids an ugly "error (ignored)" message :) |
Jan Engelhardt | 75e8b13 | 2008-09-08 15:42:06 +0200 | [diff] [blame] | 96 | install-exec-hook: |
Jan Engelhardt | c7f70f1 | 2009-03-30 01:28:44 +0200 | [diff] [blame] | 97 | -if test -z "${DESTDIR}"; then /sbin/ldconfig; fi; |
Jan Engelhardt | 80fcb7b | 2009-07-25 18:18:36 +0200 | [diff] [blame] | 98 | ${INSTALL} -dm0755 "${DESTDIR}${bindir}"; |
| 99 | for i in ${v4_bin_links}; do ${LN_S} -f "${sbindir}/iptables-multi" "${DESTDIR}${bindir}/$$i"; done; |
| 100 | for i in ${v4_sbin_links}; do ${LN_S} -f iptables-multi "${DESTDIR}${sbindir}/$$i"; done; |
| 101 | for i in ${v6_sbin_links}; do ${LN_S} -f ip6tables-multi "${DESTDIR}${sbindir}/$$i"; done; |