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