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