]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f2d18633 | 2 | # "$Id$" |
ef416fc2 | 3 | # |
f8b3a85b | 4 | # System V commands makefile for CUPS. |
ef416fc2 | 5 | # |
12f89d24 | 6 | # Copyright 2007-2012 by Apple Inc. |
bd7854cb | 7 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 8 | # |
9 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 10 | # property of Apple Inc. and are protected by Federal copyright |
11 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
12 | # which should have been included with this file. If this file is | |
13 | # file is missing or damaged, see the license at "http://www.cups.org/". | |
ef416fc2 | 14 | # |
15 | ||
16 | include ../Makedefs | |
17 | ||
1f6f3dbc | 18 | TARGETS = cancel cupsaccept cupsaddsmb cupsctl cupstestdsc cupstestppd \ |
80ca4592 | 19 | lp lpadmin lpinfo lpmove lpoptions lppasswd lpstat |
1f6f3dbc | 20 | OBJS = cancel.o cupsaccept.o cupsaddsmb.o cupsctl.o cupstestdsc.o \ |
bc44d920 | 21 | cupstestppd.o lp.o lpadmin.o lpinfo.o lpmove.o lpoptions.o \ |
22 | lppasswd.o lpstat.o | |
ef416fc2 | 23 | |
24 | ||
25 | # | |
26 | # Make all targets... | |
27 | # | |
28 | ||
29 | all: $(TARGETS) | |
30 | ||
31 | ||
c9fc04c6 MS |
32 | # |
33 | # Make library targets... | |
34 | # | |
35 | ||
36 | libs: | |
37 | ||
38 | ||
5f64df29 MS |
39 | # |
40 | # Make unit tests... | |
41 | # | |
42 | ||
43 | unittests: | |
44 | ||
45 | ||
ef416fc2 | 46 | # |
47 | # Clean all object files... | |
48 | # | |
49 | ||
50 | clean: | |
49d87452 | 51 | $(RM) $(OBJS) $(TARGETS) |
f11a948a | 52 | $(RM) accept cupsdisable cupsenable cupsreject reject |
ef416fc2 | 53 | |
54 | ||
55 | # | |
56 | # Update dependencies (without system header dependencies...) | |
57 | # | |
58 | ||
59 | depend: | |
12f89d24 | 60 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 61 | |
62 | ||
63 | # | |
64 | # Install all targets... | |
65 | # | |
66 | ||
50fe7201 MS |
67 | install: all install-data install-headers install-libs install-exec |
68 | ||
69 | ||
70 | # | |
71 | # Install data files... | |
72 | # | |
73 | ||
74 | install-data: | |
75 | ||
76 | ||
77 | # | |
78 | # Install programs... | |
79 | # | |
80 | ||
81 | install-exec: | |
e07d4801 | 82 | echo Installing System V admin printing commands in $(SBINDIR) |
bd7854cb | 83 | $(INSTALL_DIR) -m 755 $(SBINDIR) |
e07d4801 | 84 | $(INSTALL_BIN) cupsaccept $(SBINDIR) |
ef416fc2 | 85 | $(INSTALL_BIN) cupsaddsmb $(SBINDIR) |
bc44d920 | 86 | $(INSTALL_BIN) cupsctl $(SBINDIR) |
ef416fc2 | 87 | $(INSTALL_BIN) lpadmin $(SBINDIR) |
88 | $(INSTALL_BIN) lpinfo $(SBINDIR) | |
89 | $(INSTALL_BIN) lpmove $(SBINDIR) | |
e07d4801 MS |
90 | $(RM) $(SBINDIR)/accept |
91 | $(LN) cupsaccept $(SBINDIR)/accept | |
92 | $(RM) $(SBINDIR)/cupsdisable | |
93 | $(LN) cupsaccept $(SBINDIR)/cupsdisable | |
94 | $(RM) $(SBINDIR)/cupsenable | |
95 | $(LN) cupsaccept $(SBINDIR)/cupsenable | |
96 | $(RM) $(SBINDIR)/cupsreject | |
97 | $(LN) cupsaccept $(SBINDIR)/cupsreject | |
98 | $(RM) $(SBINDIR)/reject | |
99 | $(LN) cupsaccept $(SBINDIR)/reject | |
100 | echo Installing System V user printing commands in $(BINDIR) | |
bd7854cb | 101 | $(INSTALL_DIR) -m 755 $(BINDIR) |
ef416fc2 | 102 | $(INSTALL_BIN) cancel $(BINDIR) |
80ca4592 | 103 | $(INSTALL_BIN) cupstestdsc $(BINDIR) |
ef416fc2 | 104 | $(INSTALL_BIN) cupstestppd $(BINDIR) |
ef416fc2 | 105 | $(INSTALL_BIN) lp $(BINDIR) |
106 | $(INSTALL_BIN) lpoptions $(BINDIR) | |
107 | $(INSTALL_BIN) lpstat $(BINDIR) | |
568fa3fa | 108 | $(INSTALL_BIN) lppasswd $(BINDIR) |
09a101d6 | 109 | if test "x$(SYMROOT)" != "x"; then \ |
110 | $(INSTALL_DIR) $(SYMROOT); \ | |
111 | for file in $(TARGETS); do \ | |
112 | cp $$file $(SYMROOT); \ | |
c1420c87 | 113 | dsymutil $(SYMROOT)/$$file; \ |
09a101d6 | 114 | done \ |
115 | fi | |
ef416fc2 | 116 | |
117 | ||
50fe7201 MS |
118 | # |
119 | # Install headers... | |
120 | # | |
121 | ||
122 | install-headers: | |
123 | ||
124 | ||
125 | # | |
126 | # Install libraries... | |
127 | # | |
128 | ||
129 | install-libs: | |
130 | ||
131 | ||
757d2cad | 132 | # |
133 | # Uninstall all targets... | |
134 | # | |
135 | ||
136 | uninstall: | |
137 | $(RM) $(BINDIR)/cancel | |
80ca4592 | 138 | $(RM) $(BINDIR)/cupstestdsc |
757d2cad | 139 | $(RM) $(BINDIR)/cupstestppd |
140 | $(RM) $(BINDIR)/lp | |
141 | $(RM) $(BINDIR)/lpoptions | |
142 | $(RM) $(BINDIR)/lppasswd | |
143 | $(RM) $(BINDIR)/lpstat | |
144 | -$(RMDIR) $(BINDIR) | |
145 | $(RM) $(SBINDIR)/accept | |
e07d4801 | 146 | $(RM) $(SBINDIR)/cupsaccept |
757d2cad | 147 | $(RM) $(SBINDIR)/cupsaddsmb |
49d87452 | 148 | $(RM) $(SBINDIR)/cupsaccept |
757d2cad | 149 | $(RM) $(SBINDIR)/cupsdisable |
150 | $(RM) $(SBINDIR)/cupsenable | |
49d87452 | 151 | $(RM) $(SBINDIR)/cupsreject |
757d2cad | 152 | $(RM) $(SBINDIR)/lpadmin |
153 | $(RM) $(SBINDIR)/lpinfo | |
154 | $(RM) $(SBINDIR)/lpmove | |
155 | $(RM) $(SBINDIR)/reject | |
156 | -$(RMDIR) $(SBINDIR) | |
157 | ||
158 | ||
ef416fc2 | 159 | # |
1f6f3dbc | 160 | # cancel |
ef416fc2 | 161 | # |
162 | ||
1f6f3dbc | 163 | cancel: cancel.o ../cups/$(LIBCUPS) |
ef416fc2 | 164 | echo Linking $@... |
1f6f3dbc | 165 | $(CC) $(LDFLAGS) -o cancel cancel.o $(LIBS) |
ef416fc2 | 166 | |
167 | ||
168 | # | |
1f6f3dbc | 169 | # cupsaccept |
ef416fc2 | 170 | # |
171 | ||
1f6f3dbc | 172 | cupsaccept: cupsaccept.o ../cups/$(LIBCUPS) |
ef416fc2 | 173 | echo Linking $@... |
1f6f3dbc | 174 | $(CC) $(LDFLAGS) -o cupsaccept cupsaccept.o $(LIBS) |
f11a948a | 175 | for file in accept cupsenable cupsdisable cupsreject reject; do \ |
1f6f3dbc MS |
176 | $(RM) $$file; \ |
177 | $(LN) cupsaccept $$file; \ | |
178 | done | |
ef416fc2 | 179 | |
180 | ||
181 | # | |
182 | # cupsaddsmb | |
183 | # | |
184 | ||
185 | cupsaddsmb: cupsaddsmb.o ../cups/$(LIBCUPS) | |
186 | echo Linking $@... | |
187 | $(CC) $(LDFLAGS) -o cupsaddsmb cupsaddsmb.o $(LIBS) | |
188 | ||
189 | ||
bc44d920 | 190 | # |
191 | # cupsctl | |
192 | # | |
193 | ||
194 | cupsctl: cupsctl.o ../cups/$(LIBCUPS) | |
195 | echo Linking $@... | |
196 | $(CC) $(LDFLAGS) -o cupsctl cupsctl.o $(LIBS) | |
197 | ||
198 | ||
80ca4592 | 199 | # |
200 | # cupstestdsc | |
201 | # | |
202 | ||
203 | cupstestdsc: cupstestdsc.o ../cups/$(LIBCUPS) | |
204 | echo Linking $@... | |
205 | $(CC) $(LDFLAGS) -o $@ cupstestdsc.o $(LIBS) | |
206 | ||
207 | ||
ef416fc2 | 208 | # |
209 | # cupstestppd | |
210 | # | |
211 | ||
09a101d6 | 212 | cupstestppd: cupstestppd.o ../cups/$(LIBCUPS) ../filter/$(LIBCUPSIMAGE) |
ef416fc2 | 213 | echo Linking $@... |
83e08001 | 214 | $(CC) $(LDFLAGS) -o $@ cupstestppd.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
ef416fc2 | 215 | |
f8b3a85b | 216 | cupstestppd-static: cupstestppd.o ../cups/$(LIBCUPSSTATIC) ../filter/libcupsimage.a |
66ab9486 MS |
217 | echo Linking $@... |
218 | $(CC) $(LDFLAGS) -o $@ cupstestppd.o ../filter/libcupsimage.a \ | |
f8b3a85b | 219 | ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(LIBGSSAPI) $(LIBS) $(LIBZ) |
66ab9486 | 220 | |
ef416fc2 | 221 | |
222 | # | |
223 | # lp | |
224 | # | |
225 | ||
226 | lp: lp.o ../cups/$(LIBCUPS) | |
227 | echo Linking $@... | |
228 | $(CC) $(LDFLAGS) -o lp lp.o $(LIBS) | |
229 | ||
230 | ||
231 | # | |
232 | # lpadmin | |
233 | # | |
234 | ||
235 | lpadmin: lpadmin.o ../cups/$(LIBCUPS) | |
236 | echo Linking $@... | |
237 | $(CC) $(LDFLAGS) -o lpadmin lpadmin.o $(LIBZ) $(LIBS) | |
238 | ||
239 | ||
240 | # | |
241 | # lpinfo | |
242 | # | |
243 | ||
244 | lpinfo: lpinfo.o ../cups/$(LIBCUPS) | |
245 | echo Linking $@... | |
246 | $(CC) $(LDFLAGS) -o lpinfo lpinfo.o $(LIBS) | |
247 | ||
248 | ||
249 | # | |
250 | # lpmove | |
251 | # | |
252 | ||
253 | lpmove: lpmove.o ../cups/$(LIBCUPS) | |
254 | echo Linking $@... | |
255 | $(CC) $(LDFLAGS) -o lpmove lpmove.o $(LIBS) | |
256 | ||
257 | ||
258 | # | |
259 | # lpoptions | |
260 | # | |
261 | ||
262 | lpoptions: lpoptions.o ../cups/$(LIBCUPS) | |
263 | echo Linking $@... | |
264 | $(CC) $(LDFLAGS) -o lpoptions lpoptions.o $(LIBZ) $(LIBS) | |
265 | ||
266 | ||
267 | # | |
268 | # lppasswd | |
269 | # | |
270 | ||
271 | lppasswd: lppasswd.o ../cups/$(LIBCUPS) | |
272 | echo Linking $@... | |
273 | $(CC) $(LDFLAGS) -o lppasswd lppasswd.o $(LIBZ) $(LIBS) | |
274 | ||
275 | ||
276 | # | |
277 | # lpstat | |
278 | # | |
279 | ||
280 | lpstat: lpstat.o ../cups/$(LIBCUPS) | |
281 | echo Linking $@... | |
282 | $(CC) $(LDFLAGS) -o lpstat lpstat.o $(LIBS) | |
283 | ||
284 | ||
285 | # | |
286 | # Dependencies... | |
287 | # | |
288 | ||
289 | include Dependencies | |
290 | ||
291 | ||
292 | # | |
f2d18633 | 293 | # End of "$Id$". |
ef416fc2 | 294 | # |