dnsmasq: Add feature to forward domains to certain DNS servers.
[ipfire-2.x.git] / src / misc-progs / Makefile
1 ###############################################################################
2 #                                                                             #
3 # IPFire.org - A linux based firewall                                         #
4 # Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
5 #                                                                             #
6 # This program is free software: you can redistribute it and/or modify        #
7 # it under the terms of the GNU General Public License as published by        #
8 # the Free Software Foundation, either version 3 of the License, or           #
9 # (at your option) any later version.                                         #
10 #                                                                             #
11 # This program is distributed in the hope that it will be useful,             #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of              #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               #
14 # GNU General Public License for more details.                                #
15 #                                                                             #
16 # You should have received a copy of the GNU General Public License           #
17 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
18 #                                                                             #
19 ###############################################################################
20
21 CC=gcc 
22 CFLAGS=-O2 -Wall
23
24 COMPILE=$(CC) $(CFLAGS)
25
26 PROGS = iowrap
27 SUID_PROGS = setdmzholes setportfw setxtaccess \
28         squidctrl sshctrl ipfirereboot \
29         ipsecctrl timectrl dhcpctrl snortctrl \
30         applejuicectrl rebuildhosts backupctrl \
31         logwatch openvpnctrl outgoingfwctrl \
32         wirelessctrl getipstat qosctrl launch-ether-wake \
33         redctrl syslogdctrl extrahdctrl sambactrl upnpctrl tripwirectrl \
34         smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \
35         setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes \
36         getconntracktable wirelessclient dnsmasqctrl
37 SUID_UPDX = updxsetperms
38
39 install : all
40         install -m 755  $(PROGS) /usr/local/bin
41         install -m 4750 -g nobody $(SUID_PROGS) /usr/local/bin
42
43 all : $(PROGS) $(SUID_PROGS)
44
45 clean : 
46         -rm -f $(PROGS) $(SUID_PROGS) *.o core
47
48 ######
49
50 % : %.c
51         $(COMPILE) $< setuid.o -o $@
52
53 setuid.o: setuid.c setuid.h
54         $(COMPILE) $< -c -o $@
55
56 $(SUID_PROGS): setuid.o
57
58 $(PROGS): setuid.o
59
60 logwatch: logwatch.c setuid.o ../install+setup/libsmooth/varval.o
61         $(COMPILE) -I../install+setup/libsmooth/ logwatch.c setuid.o ../install+setup/libsmooth/varval.o -o $@
62
63 openvpnctrl: openvpnctrl.c setuid.o ../install+setup/libsmooth/varval.o
64         $(COMPILE) -I../install+setup/libsmooth/ openvpnctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
65
66 qosctrl: qosctrl.c setuid.o ../install+setup/libsmooth/varval.o
67         $(COMPILE) -I../install+setup/libsmooth/ qosctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
68
69 redctrl: redctrl.c setuid.o ../install+setup/libsmooth/varval.o
70         $(COMPILE) -I../install+setup/libsmooth/ redctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
71
72 extrahdctrl: extrahdctrl.c setuid.o ../install+setup/libsmooth/varval.o
73         $(COMPILE) -I../install+setup/libsmooth/ extrahdctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
74         
75 upnpctrl: upnpctrl.c setuid.o ../install+setup/libsmooth/varval.o
76         $(COMPILE) -I../install+setup/libsmooth/ upnpctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
77
78 sambactrl: sambactrl.c setuid.o ../install+setup/libsmooth/varval.o
79         $(COMPILE) -I../install+setup/libsmooth/ sambactrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
80
81 tripwirectrl: tripwirectrl.c setuid.o ../install+setup/libsmooth/varval.o
82         $(COMPILE) -I../install+setup/libsmooth/ tripwirectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
83         
84 smartctrl: smartctrl.c setuid.o ../install+setup/libsmooth/varval.o
85         $(COMPILE) -I../install+setup/libsmooth/ smartctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
86
87 clamavctrl: clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o
88         $(COMPILE) -I../install+setup/libsmooth/ clamavctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
89         
90 outgoingfwctrl: outgoingfwctrl.c setuid.o ../install+setup/libsmooth/varval.o
91         $(COMPILE) -I../install+setup/libsmooth/ outgoingfwctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
92         
93 timectrl: timectrl.c setuid.o ../install+setup/libsmooth/varval.o
94         $(COMPILE) -I../install+setup/libsmooth/ timectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
95
96 launch-ether-wake: launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o
97         $(COMPILE) -I../install+setup/libsmooth/ launch-ether-wake.c setuid.o ../install+setup/libsmooth/varval.o -o $@
98
99 setdmzholes: setdmzholes.c setuid.o ../install+setup/libsmooth/varval.o
100         $(COMPILE) -I../install+setup/libsmooth/ setdmzholes.c setuid.o ../install+setup/libsmooth/varval.o -o $@
101
102 setportfw: setportfw.c setuid.o ../install+setup/libsmooth/varval.o
103         $(COMPILE) -I../install+setup/libsmooth/ setportfw.c setuid.o ../install+setup/libsmooth/varval.o -o $@
104
105 rebuildhosts: rebuildhosts.c setuid.o ../install+setup/libsmooth/varval.o
106         $(COMPILE) -I../install+setup/libsmooth/ rebuildhosts.c setuid.o ../install+setup/libsmooth/varval.o -o $@
107
108 applejuicectrl: applejuicectrl.c setuid.o ../install+setup/libsmooth/varval.o
109         $(COMPILE) -I../install+setup/libsmooth/ applejuicectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
110
111 dhcpctrl: dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o
112         $(COMPILE) -I../install+setup/libsmooth/ dhcpctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
113
114 sshctrl: sshctrl.c setuid.o ../install+setup/libsmooth/varval.o
115         $(COMPILE) -I../install+setup/libsmooth/ sshctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
116
117 squidctrl: squidctrl.c setuid.o ../install+setup/libsmooth/varval.o
118         $(COMPILE) -I../install+setup/libsmooth/ squidctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
119
120 snortctrl: snortctrl.c setuid.o ../install+setup/libsmooth/varval.o
121         $(COMPILE) -I../install+setup/libsmooth/ snortctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
122
123 wirelessctrl: wirelessctrl.c setuid.o ../install+setup/libsmooth/varval.o
124         $(COMPILE) -I../install+setup/libsmooth/ wirelessctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
125
126 ipsecctrl: ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o
127         $(COMPILE) -I../install+setup/libsmooth/ ipsecctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
128
129 getipstat: getipstat.c setuid.o ../install+setup/libsmooth/varval.o
130         $(COMPILE) -I../install+setup/libsmooth/ getipstat.c setuid.o ../install+setup/libsmooth/varval.o -o $@
131
132 pakfire: pakfire.c setuid.o ../install+setup/libsmooth/varval.o
133         $(COMPILE) -I../install+setup/libsmooth/ pakfire.c setuid.o ../install+setup/libsmooth/varval.o -o $@
134
135 mpfirectrl: mpfirectrl.c setuid.o ../install+setup/libsmooth/varval.o
136         $(COMPILE) -I../install+setup/libsmooth/ mpfirectrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
137
138 backupctrl: backupctrl.c setuid.o ../install+setup/libsmooth/varval.o
139         $(COMPILE) -I../install+setup/libsmooth/ backupctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
140
141 addonctrl: addonctrl.c setuid.o ../install+setup/libsmooth/varval.o
142         $(COMPILE) -I../install+setup/libsmooth/ addonctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
143
144 syslogdctrl: syslogdctrl.c setuid.o ../install+setup/libsmooth/varval.o
145         $(COMPILE) -I../install+setup/libsmooth/ syslogdctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
146
147 wlanapctrl: wlanapctrl.c setuid.o ../install+setup/libsmooth/varval.o
148         $(COMPILE) -I../install+setup/libsmooth/ wlanapctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
149
150 setaliases: setaliases.c setuid.o ../install+setup/libsmooth/varval.o
151         $(COMPILE) -I../install+setup/libsmooth/ setaliases.c setuid.o ../install+setup/libsmooth/varval.o -o $@
152
153 fireinfoctrl: fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o
154         $(COMPILE) -I../install+setup/libsmooth/ fireinfoctrl.c setuid.o ../install+setup/libsmooth/varval.o -o $@
155
156 rebuildroutes: rebuildroutes.c setuid.o ../install+setup/libsmooth/varval.o
157         $(COMPILE) -I../install+setup/libsmooth/ rebuildroutes.c setuid.o ../install+setup/libsmooth/varval.o -o $@
158
159 getconntracktable: getconntracktable.c setuid.o ../install+setup/libsmooth/varval.o
160         $(COMPILE) -I../install+setup/libsmooth/ getconntracktable.c setuid.o ../install+setup/libsmooth/varval.o -o $@
161
162 wirelessclient: wirelessclient.c setuid.o ../install+setup/libsmooth/varval.o
163         $(COMPILE) -I../install+setup/libsmooth/ wirelessclient.c setuid.o ../install+setup/libsmooth/varval.o -o $@
164
165 dnsmasqctrl: dnsmasqctrl.c setuid.o ../install+setup/libsmooth/varval.o
166         $(COMPILE) -I../install+setup/libsmooth/ dnsmasqcrtl.c setuid.o ../install+setup/libsmooth/varval.o -o $@