]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b19ccc9e | 2 | # "$Id: Makefile 7929 2008-09-10 22:23:59Z mike $" |
ef416fc2 | 3 | # |
4 | # System V commands makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
e07d4801 | 6 | # Copyright 2007-2009 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) |
e07d4801 | 52 | $(RM) accept cupsdisable cupsenable cupsreject disable enable reject |
ef416fc2 | 53 | |
54 | ||
55 | # | |
56 | # Update dependencies (without system header dependencies...) | |
57 | # | |
58 | ||
59 | depend: | |
60 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
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) |
e07d4801 MS |
105 | $(RM) $(BINDIR)/disable |
106 | $(LN) cupsaccept $(BINDIR)/disable | |
107 | $(RM) $(BINDIR)/enable | |
108 | $(LN) cupsaccept $(BINDIR)/enable | |
ef416fc2 | 109 | $(INSTALL_BIN) lp $(BINDIR) |
110 | $(INSTALL_BIN) lpoptions $(BINDIR) | |
111 | $(INSTALL_BIN) lpstat $(BINDIR) | |
568fa3fa | 112 | $(INSTALL_BIN) lppasswd $(BINDIR) |
09a101d6 | 113 | if test "x$(SYMROOT)" != "x"; then \ |
114 | $(INSTALL_DIR) $(SYMROOT); \ | |
115 | for file in $(TARGETS); do \ | |
116 | cp $$file $(SYMROOT); \ | |
117 | done \ | |
118 | fi | |
ef416fc2 | 119 | |
120 | ||
50fe7201 MS |
121 | # |
122 | # Install headers... | |
123 | # | |
124 | ||
125 | install-headers: | |
126 | ||
127 | ||
128 | # | |
129 | # Install libraries... | |
130 | # | |
131 | ||
132 | install-libs: | |
133 | ||
134 | ||
757d2cad | 135 | # |
136 | # Uninstall all targets... | |
137 | # | |
138 | ||
139 | uninstall: | |
140 | $(RM) $(BINDIR)/cancel | |
80ca4592 | 141 | $(RM) $(BINDIR)/cupstestdsc |
757d2cad | 142 | $(RM) $(BINDIR)/cupstestppd |
e07d4801 MS |
143 | $(RM) $(BINDIR)/disable |
144 | $(RM) $(BINDIR)/enable | |
757d2cad | 145 | $(RM) $(BINDIR)/lp |
146 | $(RM) $(BINDIR)/lpoptions | |
147 | $(RM) $(BINDIR)/lppasswd | |
148 | $(RM) $(BINDIR)/lpstat | |
149 | -$(RMDIR) $(BINDIR) | |
150 | $(RM) $(SBINDIR)/accept | |
e07d4801 | 151 | $(RM) $(SBINDIR)/cupsaccept |
757d2cad | 152 | $(RM) $(SBINDIR)/cupsaddsmb |
49d87452 | 153 | $(RM) $(SBINDIR)/cupsaccept |
757d2cad | 154 | $(RM) $(SBINDIR)/cupsdisable |
155 | $(RM) $(SBINDIR)/cupsenable | |
49d87452 | 156 | $(RM) $(SBINDIR)/cupsreject |
757d2cad | 157 | $(RM) $(SBINDIR)/lpadmin |
158 | $(RM) $(SBINDIR)/lpinfo | |
159 | $(RM) $(SBINDIR)/lpmove | |
160 | $(RM) $(SBINDIR)/reject | |
161 | -$(RMDIR) $(SBINDIR) | |
162 | ||
163 | ||
ef416fc2 | 164 | # |
1f6f3dbc | 165 | # cancel |
ef416fc2 | 166 | # |
167 | ||
1f6f3dbc | 168 | cancel: cancel.o ../cups/$(LIBCUPS) |
ef416fc2 | 169 | echo Linking $@... |
1f6f3dbc | 170 | $(CC) $(LDFLAGS) -o cancel cancel.o $(LIBS) |
ef416fc2 | 171 | |
172 | ||
173 | # | |
1f6f3dbc | 174 | # cupsaccept |
ef416fc2 | 175 | # |
176 | ||
1f6f3dbc | 177 | cupsaccept: cupsaccept.o ../cups/$(LIBCUPS) |
ef416fc2 | 178 | echo Linking $@... |
1f6f3dbc | 179 | $(CC) $(LDFLAGS) -o cupsaccept cupsaccept.o $(LIBS) |
e07d4801 | 180 | for file in accept cupsenable cupsdisable cupsreject disable enable reject; do \ |
1f6f3dbc MS |
181 | $(RM) $$file; \ |
182 | $(LN) cupsaccept $$file; \ | |
183 | done | |
ef416fc2 | 184 | |
185 | ||
186 | # | |
187 | # cupsaddsmb | |
188 | # | |
189 | ||
190 | cupsaddsmb: cupsaddsmb.o ../cups/$(LIBCUPS) | |
191 | echo Linking $@... | |
192 | $(CC) $(LDFLAGS) -o cupsaddsmb cupsaddsmb.o $(LIBS) | |
193 | ||
194 | ||
bc44d920 | 195 | # |
196 | # cupsctl | |
197 | # | |
198 | ||
199 | cupsctl: cupsctl.o ../cups/$(LIBCUPS) | |
200 | echo Linking $@... | |
201 | $(CC) $(LDFLAGS) -o cupsctl cupsctl.o $(LIBS) | |
202 | ||
203 | ||
80ca4592 | 204 | # |
205 | # cupstestdsc | |
206 | # | |
207 | ||
208 | cupstestdsc: cupstestdsc.o ../cups/$(LIBCUPS) | |
209 | echo Linking $@... | |
210 | $(CC) $(LDFLAGS) -o $@ cupstestdsc.o $(LIBS) | |
211 | ||
212 | ||
ef416fc2 | 213 | # |
214 | # cupstestppd | |
215 | # | |
216 | ||
09a101d6 | 217 | cupstestppd: cupstestppd.o ../cups/$(LIBCUPS) ../filter/$(LIBCUPSIMAGE) |
ef416fc2 | 218 | echo Linking $@... |
09a101d6 | 219 | $(CC) $(LDFLAGS) -o $@ cupstestppd.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) |
ef416fc2 | 220 | |
66ab9486 MS |
221 | cupstestppd-static: cupstestppd.o ../cups/libcups.a ../filter/libcupsimage.a |
222 | echo Linking $@... | |
223 | $(CC) $(LDFLAGS) -o $@ cupstestppd.o ../filter/libcupsimage.a \ | |
224 | ../cups/libcups.a $(IMGLIBS) $(LIBGSSAPI) $(LIBS) $(LIBZ) | |
225 | ||
ef416fc2 | 226 | |
227 | # | |
228 | # lp | |
229 | # | |
230 | ||
231 | lp: lp.o ../cups/$(LIBCUPS) | |
232 | echo Linking $@... | |
233 | $(CC) $(LDFLAGS) -o lp lp.o $(LIBS) | |
234 | ||
235 | ||
236 | # | |
237 | # lpadmin | |
238 | # | |
239 | ||
240 | lpadmin: lpadmin.o ../cups/$(LIBCUPS) | |
241 | echo Linking $@... | |
242 | $(CC) $(LDFLAGS) -o lpadmin lpadmin.o $(LIBZ) $(LIBS) | |
243 | ||
244 | ||
245 | # | |
246 | # lpinfo | |
247 | # | |
248 | ||
249 | lpinfo: lpinfo.o ../cups/$(LIBCUPS) | |
250 | echo Linking $@... | |
251 | $(CC) $(LDFLAGS) -o lpinfo lpinfo.o $(LIBS) | |
252 | ||
253 | ||
254 | # | |
255 | # lpmove | |
256 | # | |
257 | ||
258 | lpmove: lpmove.o ../cups/$(LIBCUPS) | |
259 | echo Linking $@... | |
260 | $(CC) $(LDFLAGS) -o lpmove lpmove.o $(LIBS) | |
261 | ||
262 | ||
263 | # | |
264 | # lpoptions | |
265 | # | |
266 | ||
267 | lpoptions: lpoptions.o ../cups/$(LIBCUPS) | |
268 | echo Linking $@... | |
269 | $(CC) $(LDFLAGS) -o lpoptions lpoptions.o $(LIBZ) $(LIBS) | |
270 | ||
271 | ||
272 | # | |
273 | # lppasswd | |
274 | # | |
275 | ||
276 | lppasswd: lppasswd.o ../cups/$(LIBCUPS) | |
277 | echo Linking $@... | |
278 | $(CC) $(LDFLAGS) -o lppasswd lppasswd.o $(LIBZ) $(LIBS) | |
279 | ||
280 | ||
281 | # | |
282 | # lpstat | |
283 | # | |
284 | ||
285 | lpstat: lpstat.o ../cups/$(LIBCUPS) | |
286 | echo Linking $@... | |
287 | $(CC) $(LDFLAGS) -o lpstat lpstat.o $(LIBS) | |
288 | ||
289 | ||
290 | # | |
291 | # Dependencies... | |
292 | # | |
293 | ||
294 | include Dependencies | |
295 | ||
296 | ||
297 | # | |
b19ccc9e | 298 | # End of "$Id: Makefile 7929 2008-09-10 22:23:59Z mike $". |
ef416fc2 | 299 | # |