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)/command... 93 $(INSTALL_DIR) -m 755 $(SERVERBIN)/command 94 for file in $(IPPEVECOMMANDS); do \ 95 $(INSTALL_BIN) $$file $(SERVERBIN)/command; \ 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)/command... 131 for file in $(IPPEVECOMMANDS); do \ 132 $(RM) $(SERVERBIN)/command/$$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/$(LIBCUPS) 149 echo Linking $@... 150 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(DNSSDLIBS) $(PAMLIBS) $(LINKCUPS) 151 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 152 153 154# 155# ippeveprinter-static 156# 157 158ippeveprinter-static: ippeveprinter.o ../cups/$(LIBCUPSSTATIC) 159 echo Linking $@... 160 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveprinter.o $(PAMLIBS) $(LINKCUPSSTATIC) 161 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 162 163 164# 165# ippevepcl 166# 167 168ippevepcl: ippevepcl.o ../cups/$(LIBCUPS) 169 echo Linking $@... 170 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippevepcl.o $(LINKCUPS) 171 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 172 173 174# 175# ippeveps 176# 177 178ippeveps: ippeveps.o ../cups/$(LIBCUPS) 179 echo Linking $@... 180 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippeveps.o $(LINKCUPS) 181 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 182 183 184# 185# ippfind 186# 187 188ippfind: ippfind.o ../cups/$(LIBCUPS) 189 echo Linking $@... 190 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(DNSSDLIBS) $(LINKCUPS) 191 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 192 193 194# 195# ippfind-static 196# 197 198ippfind-static: ippfind.o ../cups/$(LIBCUPSSTATIC) 199 echo Linking $@ 200 $(LD_CC) $(ALL_LDFLAGS) -o $@ ippfind.o $(LINKCUPSSTATIC) 201 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 202 203 204# 205# ipptool 206# 207 208ipptool: ipptool.o ../cups/$(LIBCUPS) 209 echo Linking $@... 210 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LINKCUPS) 211 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 212 213 214# 215# ipptool-static 216# 217 218ipptool-static: ipptool.o ../cups/$(LIBCUPSSTATIC) 219 echo Linking $@... 220 $(LD_CC) $(ALL_LDFLAGS) -o $@ ipptool.o $(LINKCUPSSTATIC) 221 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 222 223 224# 225# Generate the header containing the data for printer.png... 226# 227 228pngheader: 229 echo "Generating printer-png.h from printer.png..." 230 echo "static const unsigned char printer_png[] =" >printer-png.h 231 echo "{" >>printer-png.h 232 od -t x1 printer.png | cut -b12- | awk '{printf(" "); for (i = 1; i <= NF; i ++) printf("0x%s,", $$i); print "";}' >>printer-png.h 233 echo "};" >>printer-png.h 234 235 236# 237# Dependencies... 238# 239 240include Dependencies 241