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