75e8f63fc720ae70844bcdf3bdc821ee45795fb1
[people/pmueller/ipfire-2.x.git] / src / misc-progs / Makefile
1 CC=gcc
2 CFLAGS=-O2 -Wall
3
4 COMPILE=$(CC) $(CFLAGS)
5
6 PROGS = iowrap
7 SUID_PROGS = setdmzholes setportfw setfilters setxtaccess \
8 squidctrl restartssh ipfirereboot setaliases \
9 ipsecctrl restartntpd dhcpctrl restartsnort \
10 restartapplejuice rebuildhosts \
11 restartsyslogd logwatch openvpnctrl timecheckctrl \
12 restartwireless getipstat qosctrl launch-ether-wake \
13 redctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
14 smartctrl clamavctrl
15
16 install : all
17 install -m 755 $(PROGS) /usr/local/bin
18 install -m 4750 -g nobody $(SUID_PROGS) /usr/local/bin
19
20 all : $(PROGS) $(SUID_PROGS)
21
22 clean :
23 -rm -f $(PROGS) $(SUID_PROGS) *.o core
24
25 ######
26
27 % : %.c
28 $(COMPILE) $< setuid.o -o $@
29
30 setuid.o: setuid.c setuid.h
31 $(COMPILE) $< -c -o $@
32
33 $(SUID_PROGS): setuid.o
34
35 $(PROGS): setuid.o
36
37 logwatch: logwatch.c setuid.o ../install+setup/libsmooth/varval.o
38 $(COMPILE) -I../install+setup/libsmooth/ logwatch.c setuid.o ../install+setup/libsmooth/varval.o -o $@
39
40 openvpnctrl: openvpnctrl.c setuid.o ../install+setup/libsmooth/varval.o
41 $(COMPILE) -I../install+setup/libsmooth/ openvpnctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
42
43 qosctrl: qosctrl.c setuid.o ../install+setup/libsmooth/varval.o
44 $(COMPILE) -I../install+setup/libsmooth/ qosctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
45
46 redctrl: redctrl.c setuid.o ../install+setup/libsmooth/varval.o
47 $(COMPILE) -I../install+setup/libsmooth/ redctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
48
49 extrahdctrl: extrahdctrl.c setuid.o ../install+setup/libsmooth/varval.o
50 $(COMPILE) -I../install+setup/libsmooth/ extrahdctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
51
52 upnpctrl: upnpctrl.c setuid.o ../install+setup/libsmooth/varval.o
53 $(COMPILE) -I../install+setup/libsmooth/ upnpctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
54
55 sambactrl: sambactrl.c setuid.o ../install+setup/libsmooth/varval.o
56 $(COMPILE) -I../install+setup/libsmooth/ sambactrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
57
58 tripwirectrl: tripwirectrl.c setuid.o ../install+setup/libsmooth/varval.o
59 $(COMPILE) -I../install+setup/libsmooth/ tripwirectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
60
61 smartctrl: smartctrl.c setuid.o ../install+setup/libsmooth/varval.o
62 $(COMPILE) -I../install+setup/libsmooth/ smartctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
63
64 clamavctrl: clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o
65 $(COMPILE) -I../install+setup/libsmooth/ clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
66
67 launch-ether-wake: launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o
68 $(COMPILE) -I../install+setup/libsmooth/ launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o -o $@
69
70 setaliases: setaliases.c setuid.o ../install+setup/libsmooth/varval.o
71 $(COMPILE) -I../install+setup/libsmooth/ setaliases.c setuid.o ../install+setup/libsmooth/varval.o -o $@
72
73 setdmzholes: setdmzholes.c setuid.o ../install+setup/libsmooth/varval.o
74 $(COMPILE) -I../install+setup/libsmooth/ setdmzholes.c setuid.o ../install+setup/libsmooth/varval.o -o $@
75
76 setportfw: setportfw.c setuid.o ../install+setup/libsmooth/varval.o
77 $(COMPILE) -I../install+setup/libsmooth/ setportfw.c setuid.o ../install+setup/libsmooth/varval.o -o $@
78
79 setfilters: setfilters.c setuid.o ../install+setup/libsmooth/varval.o
80 $(COMPILE) -I../install+setup/libsmooth/ setfilters.c setuid.o ../install+setup/libsmooth/varval.o -o $@
81
82 rebuildhosts: rebuildhosts.c setuid.o ../install+setup/libsmooth/varval.o
83 $(COMPILE) -I../install+setup/libsmooth/ rebuildhosts.c setuid.o ../install+setup/libsmooth/varval.o -o $@
84
85 restartapplejuice: restartapplejuice.c setuid.o ../install+setup/libsmooth/varval.o
86 $(COMPILE) -I../install+setup/libsmooth/ restartapplejuice.c setuid.o ../install+setup/libsmooth/varval.o -o $@
87
88 dhcpctrl: dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o
89 $(COMPILE) -I../install+setup/libsmooth/ dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
90
91 restartssh: restartssh.c setuid.o ../install+setup/libsmooth/varval.o
92 $(COMPILE) -I../install+setup/libsmooth/ restartssh.c setuid.o ../install+setup/libsmooth/varval.o -o $@
93
94 squidctrl: squidctrl.c setuid.o ../install+setup/libsmooth/varval.o
95 $(COMPILE) -I../install+setup/libsmooth/ squidctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
96
97 restartsnort: restartsnort.c setuid.o ../install+setup/libsmooth/varval.o
98 $(COMPILE) -I../install+setup/libsmooth/ restartsnort.c setuid.o ../install+setup/libsmooth/varval.o -o $@
99
100 restartsyslogd: restartsyslogd.c setuid.o ../install+setup/libsmooth/varval.o
101 $(COMPILE) -I../install+setup/libsmooth/ restartsyslogd.c setuid.o ../install+setup/libsmooth/varval.o -o $@
102
103 restartwireless: restartwireless.c setuid.o ../install+setup/libsmooth/varval.o
104 $(COMPILE) -I../install+setup/libsmooth/ restartwireless.c setuid.o ../install+setup/libsmooth/varval.o -o $@
105
106 ipsecctrl: ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o
107 $(COMPILE) -I../install+setup/libsmooth/ ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
108
109 timecheckctrl: timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o
110 $(COMPILE) -I../install+setup/libsmooth/ timecheckctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
111
112 getipstat: getipstat.c setuid.o ../install+setup/libsmooth/varval.o
113 $(COMPILE) -I../install+setup/libsmooth/ getipstat.c setuid.o ../install+setup/libsmooth/varval.o -o $@