Initial commit of fancy firewall infrastructure.
[firewall] / Makefile
CommitLineData
bfdc045d
MW
1### Makefile for firewall scripts
2
3MAIN_M4_SOURCES =
4HOSTS =
5
6###--------------------------------------------------------------------------
7### Local configuration.
8
9## Should set up HOSTS and add stuff to MAIN_M4_SOURCES if necessary.
10include local.mk
11
12###--------------------------------------------------------------------------
13### Configuration.
14
15## The main m4 inputs which construct the firewall. These are read in last
16## to allow local configuration to change their environments.
17MAIN_M4_SOURCES += config.m4
18MAIN_M4_SOURCES += prologue.m4
19MAIN_M4_SOURCES += functions.m4
20MAIN_M4_SOURCES += numbers.m4
21MAIN_M4_SOURCES += bookends.m4
22MAIN_M4_SOURCES += classify.m4
23MAIN_M4_SOURCES += icmp.m4
24
25## All of our m4 inputs. The base gets read first to set things up.
26M4_SOURCES = base.m4
27M4_SOURCES += $(MAIN_M4_SOURCES)
28
29###--------------------------------------------------------------------------
30### Hosts.
31
32TARGETS = $(addsuffix .sh,$(HOSTS))
33
34###--------------------------------------------------------------------------
35### Building.
36
37all: $(TARGETS)
38
39%.sh: %.m4 $(M4_SOURCES)
40 m4 -P base.m4 $*.m4 $(MAIN_M4_SOURCES) >$@.new
41 chmod +x $@.new
42 mv $@.new $@
43
44clean:; rm -f $(TARGETS) *.new
45
46###----- That's all, folks --------------------------------------------------