3
# Unpack the source and apply patches with either of
4
# "make prep" or "debian/rules prep" in the top directory.
6
# Change the kernel source/header and iptables source
7
# versions in prep.sh in the top directory.
9
# Custom build tips: Modify and repack iptables source
10
# into upstream/. Account for patches/*, patch-o-matic,
11
# and install directives in */debian/iptables*.install.
12
# Alternatively, you can unpack and then modify sources
13
# in debian/build/, but take note that the clean target
14
# WILL definitely erase all of your work amd various
15
# build tools call the clean target by default.
17
# source directory symlinks, see prep.sh
18
IPTABLES = iptables_profectio
19
KERNEL = kernel_profectio
21
BUILD_DIR := $(CURDIR)/debian/build
22
SRC_DIR := $(BUILD_DIR)/$(IPTABLES)
23
STAMP_DIR := $(BUILD_DIR)/stamp
25
MANDIR = MANDIR=/usr/share/man
28
DESTDIR := DESTDIR=$(CURDIR)/debian/iptables
29
KERNEL_DIR := KERNEL_DIR=$(BUILD_DIR)/$(KERNEL)
31
BUILD_VARS := $(LIBDIR) $(KERNEL_DIR)
32
INSTALL_VARS := $(DESTDIR) $(MANDIR) $(LIBDIR) $(BINDIR) $(KERNEL_DIR)
33
BUILD_TARGETS = all ip6tables-save ip6tables-restore
35
prep: $(STAMP_DIR)/prep-stamp
36
$(STAMP_DIR)/prep-stamp:
40
build: $(STAMP_DIR)/build-stamp
41
$(STAMP_DIR)/build-stamp: prep
44
$(MAKE) -C $(SRC_DIR) $(BUILD_TARGETS) $(BUILD_VARS)
46
cd $(SRC_DIR); ar rcs libiptables.a iptables.o
47
cd $(SRC_DIR); ar rcs libip6tables.a ip6tables.o
60
$(MAKE) -C $(SRC_DIR) install $(INSTALL_VARS)
61
rm -rf $(SRC_DIR)/include/libipulog
62
install -m0644 -D $(CURDIR)/debian/iptables.lintian.override \
63
$(CURDIR)/debian/iptables/usr/share/lintian/overrides/iptables
65
binary-indep: build install
67
binary-arch: build install
83
binary: binary-indep binary-arch
84
.PHONY: prep build clean binary-indep binary-arch binary install