File: Makefile.in

package info (click to toggle)
bld 0.3.4.1-4
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 576 kB
  • ctags: 268
  • sloc: ansic: 2,333; sh: 175; makefile: 157; perl: 135; python: 36
file content (101 lines) | stat: -rw-r--r-- 4,142 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
prefix=@prefix@
exec_prefix=@exec_prefix@
sbindir=@sbindir@
mandir=@mandir@
sysconfdir=@sysconfdir@
varrun=/var/run/bld

CC= @CC@
PROGNAME= bld
READERNAME= $(PROGNAME)read
SUBMITNAME= $(PROGNAME)submit
QUERYNAME= $(PROGNAME)query
INSERTNAME= $(PROGNAME)insert
DECRNAME= $(PROGNAME)decr
POLICYNAME= $(PROGNAME)-pf_policy
UTILS=utils/bld-mrtg.pl utils/bld-pf_log.pl utils/bld-pf_policy.pl
CFLAGS= @CFLAGS@ -DPROGNAME=\"$(PROGNAME)\" -DVARRUN=\"$(varrun)\" -DETC_LOCATION=\"$(sysconfdir)\"
OBJS= main.o net.o cmd.o iptree.o daemon.o netlist.o utils.o parse_args.o \
      parse_config.o options.o client.o
LDFLAGS= @LDFLAGS@
LIBS= @LIBS@
GZIP= gzip -c -9

all: $(PROGNAME) $(READERNAME) $(SUBMITNAME) $(POLICYNAME)

$(PROGNAME): $(OBJS)
	$(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS)
$(READERNAME): dumpread.o
	$(CC) -o $@ dumpread.o
$(SUBMITNAME): submit.o net.o client.o utils.o options.o netlist.o
	$(CC) -o $@ $(LDFLAGS) submit.o net.o client.o utils.o options.o \
		netlist.o $(LIBS)
$(POLICYNAME): postfix_policy.o net.o client.o
	$(CC) -o $@ $(LDFLAGS) postfix_policy.o net.o client.o $(LIBS)

links: $(SUBMITNAME)
	-ln -sf $(SUBMITNAME) $(QUERYNAME)
	-ln -sf $(SUBMITNAME) $(INSERTNAME)
	-ln -sf $(SUBMITNAME) $(DECRNAME)

submit.o: submit.c net.h

install: all
	[ -d $(DESTDIR)$(sbindir) ] || mkdir -p $(DESTDIR)$(sbindir)
	cp $(PROGNAME) $(READERNAME) $(POLICYNAME) $(UTILS) $(DESTDIR)$(sbindir)
	strip $(DESTDIR)$(sbindir)/$(PROGNAME)
	strip $(DESTDIR)$(sbindir)/$(READERNAME)
	strip $(DESTDIR)$(sbindir)/$(POLICYNAME)
	cp $(SUBMITNAME) $(DESTDIR)$(sbindir) \
	    && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(QUERYNAME)) \
	    && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(INSERTNAME)) \
	    && (cd $(DESTDIR)$(sbindir) && ln -s $(SUBMITNAME) $(DECRNAME))
	strip $(DESTDIR)$(sbindir)/$(SUBMITNAME)
	[ -d $(DESTDIR)$(mandir)/man8 ] || mkdir -p $(DESTDIR)$(mandir)/man8
	$(GZIP) -c bld.8 > $(DESTDIR)$(mandir)/man8/bld.8.gz
	$(GZIP) -c bldread.8 > $(DESTDIR)$(mandir)/man8/bldread.8.gz
	$(GZIP) -c bldquery.8 > $(DESTDIR)$(mandir)/man8/bldquery.8.gz
	$(GZIP) -c bldsubmit.8 > $(DESTDIR)$(mandir)/man8/bldsubmit.8.gz
	$(GZIP) -c bldinsert.8 > $(DESTDIR)$(mandir)/man8/bldinsert.8.gz
	$(GZIP) -c blddecr.8 > $(DESTDIR)$(mandir)/man8/blddecr.8.gz
	$(GZIP) -c bld-pf_policy.8 > $(DESTDIR)$(mandir)/man8/bld-pf_policy.8.gz
	[ -d $(DESTDIR)$(mandir)/man5 ] || mkdir -p $(DESTDIR)$(mandir)/man5
	$(GZIP) -c bld.conf.5 > $(DESTDIR)$(mandir)/man5/bld.conf.5.gz
	$(GZIP) -c bld_acl.conf.5 > $(DESTDIR)$(mandir)/man5/bld_acl.conf.5.gz
	$(GZIP) -c bld_whitelist.conf.5 > $(DESTDIR)$(mandir)/man5/bld_whitelist.conf.5.gz
	$(GZIP) -c utils/bld-pf_log.pl.8 > $(DESTDIR)$(mandir)/man8/bld-pf_log.pl.8.gz
	$(GZIP) -c utils/bld-mrtg.pl.8 > $(DESTDIR)$(mandir)/man8/bld-mrtg.pl.8.gz

client.o: client.c options.h netlist.h client.h cmd.h iptree.h utils.h \
 net.h
cmd.o: cmd.c options.h netlist.h cmd.h iptree.h ipinfo.h utils.h \
 client.h
daemon.o: daemon.c options.h netlist.h daemon.h
dumpread.o: dumpread.c ipinfo.h
iptree.o: iptree.c ipinfo.h iptree.h options.h netlist.h
main.o: main.c options.h netlist.h parse_args.h parse_config.h net.h \
 cmd.h iptree.h daemon.h utils.h
net.o: net.c net.h
netlist.o: netlist.c netlist.h utils.h
options.o: options.c options.h netlist.h
parse_args.o: parse_args.c options.h netlist.h utils.h parse_args.h
parse_config.o: parse_config.c utils.h options.h netlist.h
postfix_policy.o: postfix_policy.c client.h cmd.h iptree.h options.h \
 netlist.h
submit.o: submit.c options.h netlist.h net.h client.h cmd.h iptree.h
utils.o: utils.c utils.h


clean:
	-rm -f $(PROGNAME) $(READERNAME) $(SUBMITNAME) $(DECRNAME) \
	$(POLICYNAME) $(OBJS) dumpread.o submit.o postfix_policy.o core

distclean: clean
	-rm -f *~ Makefile config.status config.log config.cache config.h \
	$(READERNAME) $(SUBMITNAME) $(QUERYNAME) $(INSERTNAME) $(DECRNAME) \
	$(POLICYNAME) bld.8 bld_acl.conf.5 bld_whitelist.conf.5 bld.conf.5
	-rm -rf autom4te.cache bld.8.html
	-rm -rf mktest/Makefile mktest/config.h mktest/mktest.log \
		mktest/bld_iplist.txt mktest/bld_blacklist.txt \
		mktest/bld_iplist.dump mktest/bld_blacklist.dump