2 # IPP tools makefile for CUPS.
4 # Copyright © 2007-2019 by Apple Inc.
5 # Copyright © 1997-2006 by Easy Software Products, all rights reserved.
7 # Licensed under Apache License v2.0. See the file "LICENSE" for more
38 # Make library targets...
52 # Clean all object files...
56 $(RM
) $(IPPTOOLS
) $(IPPEVECOMMANDS
) $(OBJS
)
57 $(RM
) ippeveprinter-static ippfind-static ipptool-static
61 # Update dependencies (without system header dependencies...)
65 $(CC
) -MM
$(ALL_CFLAGS
) $(OBJS
:.o
=.c
) >Dependencies
69 # Install all targets...
72 install: all install-data install-headers install-libs install-exec
76 # Install data files...
87 echo Installing IPP tools in
$(BINDIR
)...
88 $(INSTALL_DIR
) -m
755 $(BINDIR
)
89 for file in
$(IPPTOOLS
); do \
90 $(INSTALL_BIN
) $$file $(BINDIR
); \
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
; \
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; \
114 # Install libraries...
121 # Unnstall all targets...
125 echo Uninstalling IPP tools from
$(BINDIR
)...
126 for file in
$(IPPTOOLS
); do \
127 $(RM
) $(BINDIR
)/$$file; \
130 echo Uninstalling
print commands from
$(SERVERBIN
)/ippeveprinter...
131 for file in
$(IPPEVECOMMANDS
); do \
132 $(RM
) $(SERVERBIN
)/ippeveprinter
/$$file; \
134 -$(RMDIR
) $(SERVERBIN
)/ippeveprinter
138 # Local programs (not built when cross-compiling...)
141 local
: ippeveprinter-static ipptool-static
148 ippeveprinter
: ippeveprinter.o ..
/cups
/$(LIBCUPSSTATIC
)
150 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippeveprinter.o
$(LIBS
)
151 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
155 # ippeveprinter-static
158 ippeveprinter-static
: ippeveprinter.o ..
/cups
/$(LIBCUPS
)
160 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippeveprinter.o ..
/cups
/$(LIBCUPSSTATIC
) \
161 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
162 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
169 ippevepcl
: ippevepcl.o ..
/cups
/$(LIBCUPS
)
171 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippevepcl.o
$(LIBS
)
172 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
179 ippeveps
: ippeveps.o ..
/cups
/$(LIBCUPS
)
181 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippeveps.o
$(LIBS
)
182 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
189 ippfind
: ippfind.o ..
/cups
/$(LIBCUPS
)
191 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippfind.o
$(LIBS
)
192 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
199 ippfind-static
: ippfind.o ..
/cups
/$(LIBCUPSSTATIC
)
201 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ippfind.o ..
/cups
/$(LIBCUPSSTATIC
) \
202 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
203 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
210 ipptool
: ipptool.o ..
/cups
/$(LIBCUPS
)
212 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ipptool.o
$(LIBS
)
213 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
220 ipptool-static
: ipptool.o ..
/cups
/$(LIBCUPSSTATIC
)
222 $(LD_CC
) $(ALL_LDFLAGS
) -o
$@ ipptool.o ..
/cups
/$(LIBCUPSSTATIC
) \
223 $(LIBGSSAPI
) $(SSLLIBS
) $(DNSSDLIBS
) $(COMMONLIBS
) $(LIBZ
)
224 $(CODE_SIGN
) -s
"$(CODE_SIGN_IDENTITY)" $@
228 # Generate the header containing the data for printer.png...
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