vampire: Add special hook for DNS badness.
[firewall] / Makefile
1 ### Makefile for firewall scripts
2
3 MAIN_M4_SOURCES =
4 HOSTS =
5
6 SCRIPTS =
7
8 default: all
9 .PHONY: default
10
11 ###--------------------------------------------------------------------------
12 ### Local configuration.
13
14 ## Should set up HOSTS and add stuff to MAIN_M4_SOURCES if necessary.
15 include 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.
22 MAIN_M4_SOURCES += config.m4
23 MAIN_M4_SOURCES += prologue.m4
24 MAIN_M4_SOURCES += functions.m4
25 MAIN_M4_SOURCES += numbers.m4
26 MAIN_M4_SOURCES += bookends.m4
27 MAIN_M4_SOURCES += classify.m4
28 MAIN_M4_SOURCES += icmp.m4
29
30 ## All of our m4 inputs. The base gets read first to set things up.
31 M4_SOURCES = base.m4
32 M4_SOURCES += $(MAIN_M4_SOURCES)
33
34 ###--------------------------------------------------------------------------
35 ### Hosts.
36
37 TARGETS = $(addsuffix .sh,$(HOSTS))
38
39 ###--------------------------------------------------------------------------
40 ### Building.
41
42 all: $(TARGETS)
43 .PHONY: all
44
45 %.sh: %.m4 $(M4_SOURCES)
46 m4 -P base.m4 $*.m4 $(MAIN_M4_SOURCES) >$@.new
47 chmod +x $@.new
48 mv $@.new $@
49
50 clean:; rm -f $(TARGETS) *.new
51 .PHONY: clean
52
53 ###----- That's all, folks --------------------------------------------------