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