]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f1ac9f58 | 2 | # IPP tools makefile for CUPS. |
ef416fc2 | 3 | # |
f1ac9f58 MS |
4 | # Copyright © 2007-2019 by Apple Inc. |
5 | # Copyright © 1997-2006 by Easy Software Products, all rights reserved. | |
ef416fc2 | 6 | # |
f1ac9f58 MS |
7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more |
8 | # information. | |
ef416fc2 | 9 | # |
10 | ||
11 | include ../Makedefs | |
12 | ||
13 | ||
1106b00e | 14 | OBJS = \ |
6641bd0d | 15 | ippevepcl.o \ |
d46dbe1b | 16 | ippeveprinter.o \ |
6641bd0d | 17 | ippeveps.o \ |
766a8229 | 18 | ippfind.o \ |
e1f89675 | 19 | ipptool.o |
f1ac9f58 | 20 | IPPTOOLS = \ |
aa2a90ce | 21 | ippeveprinter \ |
766a8229 | 22 | $(IPPFIND_BIN) \ |
f1ac9f58 MS |
23 | ipptool |
24 | TARGETS = \ | |
25 | $(IPPEVECOMMANDS) \ | |
26 | $(IPPTOOLS) \ | |
105922ec | 27 | $(LOCALTARGET) |
f8b3a85b MS |
28 | |
29 | ||
ef416fc2 | 30 | # |
31 | # Make all targets... | |
32 | # | |
33 | ||
1106b00e | 34 | all: $(TARGETS) |
ef416fc2 | 35 | |
36 | ||
c9fc04c6 MS |
37 | # |
38 | # Make library targets... | |
39 | # | |
40 | ||
41 | libs: | |
42 | ||
43 | ||
5f64df29 MS |
44 | # |
45 | # Make unit tests... | |
46 | # | |
47 | ||
48 | unittests: | |
49 | ||
50 | ||
ef416fc2 | 51 | # |
52 | # Clean all object files... | |
53 | # | |
54 | ||
55 | clean: | |
f1ac9f58 | 56 | $(RM) $(IPPTOOLS) $(IPPEVECOMMANDS) $(OBJS) |
d46dbe1b | 57 | $(RM) ippeveprinter-static ippfind-static ipptool-static |
ef416fc2 | 58 | |
59 | ||
60 | # | |
61 | # Update dependencies (without system header dependencies...) | |
62 | # | |
63 | ||
64 | depend: | |
12f89d24 | 65 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 66 | |
67 | ||
68 | # | |
69 | # Install all targets... | |
70 | # | |
71 | ||
50fe7201 MS |
72 | install: all install-data install-headers install-libs install-exec |
73 | ||
74 | ||
75 | # | |
76 | # Install data files... | |
77 | # | |
78 | ||
79 | install-data: | |
80 | ||
81 | ||
82 | # | |
83 | # Install programs... | |
84 | # | |
85 | ||
86 | install-exec: | |
f1ac9f58 | 87 | echo Installing IPP tools in $(BINDIR)... |
f8b3a85b | 88 | $(INSTALL_DIR) -m 755 $(BINDIR) |
f1ac9f58 MS |
89 | for file in $(IPPTOOLS); do \ |
90 | $(INSTALL_BIN) $$file $(BINDIR); \ | |
91 | done | |
92 | echo Installing printer commands in $(SERVERBIN)/ippeveprinter... | |
efb349bc MS |
93 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/ippeveprinter |
94 | for file in $(IPPEVECOMMANDS); do \ | |
95 | $(INSTALL_BIN) $$file $(SERVERBIN)/ippeveprinter; \ | |
96 | done | |
f8b3a85b MS |
97 | if test "x$(SYMROOT)" != "x"; then \ |
98 | $(INSTALL_DIR) $(SYMROOT); \ | |
f1ac9f58 MS |
99 | for file in $(IPPTOOLS) $(IPPEVECOMMANDS); do |
100 | cp $$file $(SYMROOT); \ | |
101 | dsymutil $(SYMROOT)/$$file; \ | |
102 | done; \ | |
f8b3a85b | 103 | fi |
50fe7201 MS |
104 | |
105 | ||
106 | # | |
107 | # Install headers... | |
108 | # | |
109 | ||
110 | install-headers: | |
111 | ||
112 | ||
113 | # | |
114 | # Install libraries... | |
115 | # | |
116 | ||
117 | install-libs: | |
ef416fc2 | 118 | |
119 | ||
757d2cad | 120 | # |
121 | # Unnstall all targets... | |
122 | # | |
123 | ||
124 | uninstall: | |
f1ac9f58 MS |
125 | echo Uninstalling IPP tools from $(BINDIR)... |
126 | for file in $(IPPTOOLS); do \ | |
d46dbe1b MS |
127 | $(RM) $(BINDIR)/$$file; \ |
128 | done | |
129 | -$(RMDIR) $(BINDIR) | |
f1ac9f58 | 130 | echo Uninstalling print commands from $(SERVERBIN)/ippeveprinter... |
efb349bc MS |
131 | for file in $(IPPEVECOMMANDS); do \ |
132 | $(RM) $(SERVERBIN)/ippeveprinter/$$file; \ | |
133 | done | |
134 | -$(RMDIR) $(SERVERBIN)/ippeveprinter | |
757d2cad | 135 | |
136 | ||
105922ec MS |
137 | # |
138 | # Local programs (not built when cross-compiling...) | |
139 | # | |
140 | ||
aa2a90ce | 141 | local: ippeveprinter-static ipptool-static |
105922ec MS |
142 | |
143 | ||
766a8229 | 144 | # |
d46dbe1b | 145 | # ippeveprinter |
766a8229 MS |
146 | # |
147 | ||
d46dbe1b | 148 | ippeveprinter: ippeveprinter.o ../cups/$(LIBCUPSSTATIC) |
766a8229 | 149 | echo Linking $@... |
d46dbe1b | 150 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(LIBS) |
00dbe99f MS |
151 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
152 | ||
d46dbe1b MS |
153 | |
154 | # | |
155 | # ippeveprinter-static | |
156 | # | |
157 | ||
158 | ippeveprinter-static: ippeveprinter.o ../cups/$(LIBCUPS) | |
159 | echo Linking $@... | |
f1ac9f58 | 160 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o ../cups/$(LIBCUPSSTATIC) \ |
766a8229 | 161 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
00dbe99f | 162 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
766a8229 MS |
163 | |
164 | ||
6641bd0d MS |
165 | # |
166 | # ippevepcl | |
167 | # | |
168 | ||
169 | ippevepcl: ippevepcl.o ../cups/$(LIBCUPS) | |
170 | echo Linking $@... | |
171 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippevepcl.o $(LIBS) | |
172 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ | |
173 | ||
174 | ||
175 | # | |
176 | # ippeveps | |
177 | # | |
178 | ||
179 | ippeveps: ippeveps.o ../cups/$(LIBCUPS) | |
180 | echo Linking $@... | |
181 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveps.o $(LIBS) | |
182 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ | |
183 | ||
184 | ||
1106b00e | 185 | # |
d46dbe1b | 186 | # ippfind |
1106b00e MS |
187 | # |
188 | ||
d46dbe1b | 189 | ippfind: ippfind.o ../cups/$(LIBCUPS) |
1106b00e | 190 | echo Linking $@... |
d46dbe1b | 191 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(LIBS) |
00dbe99f | 192 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
1106b00e MS |
193 | |
194 | ||
e60ec91f | 195 | # |
d46dbe1b | 196 | # ippfind-static |
e60ec91f MS |
197 | # |
198 | ||
d46dbe1b MS |
199 | ippfind-static: ippfind.o ../cups/$(LIBCUPSSTATIC) |
200 | echo Linking $@ | |
201 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o ../cups/$(LIBCUPSSTATIC) \ | |
202 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
00dbe99f | 203 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
e60ec91f MS |
204 | |
205 | ||
ef416fc2 | 206 | # |
aaf19ab0 | 207 | # ipptool |
ef416fc2 | 208 | # |
209 | ||
aaf19ab0 | 210 | ipptool: ipptool.o ../cups/$(LIBCUPS) |
f8b3a85b | 211 | echo Linking $@... |
21609267 | 212 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LIBS) |
00dbe99f | 213 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
f8b3a85b MS |
214 | |
215 | ||
216 | # | |
aaf19ab0 | 217 | # ipptool-static |
f8b3a85b MS |
218 | # |
219 | ||
aaf19ab0 | 220 | ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC) |
ef416fc2 | 221 | echo Linking $@... |
21609267 | 222 | $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o ../cups/$(LIBCUPSSTATIC) \ |
c168a833 | 223 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
00dbe99f | 224 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 225 | |
226 | ||
3e5092db | 227 | # |
f1ac9f58 | 228 | # Generate the header containing the data for printer.png... |
3e5092db MS |
229 | # |
230 | ||
f1ac9f58 | 231 | pngheader: |
3e5092db MS |
232 | echo "Generating printer-png.h from printer.png..." |
233 | echo "static const unsigned char printer_png[] =" >printer-png.h | |
234 | echo "{" >>printer-png.h | |
235 | od -t x1 printer.png | cut -b12- | awk '{printf(" "); for (i = 1; i <= NF; i ++) printf("0x%s,", $$i); print "";}' >>printer-png.h | |
236 | echo "};" >>printer-png.h | |
237 | ||
238 | ||
ef416fc2 | 239 | # |
240 | # Dependencies... | |
241 | # | |
242 | ||
243 | include Dependencies |