1# 2# Filter makefile for CUPS. 3# 4# Copyright © 2020-2024 by OpenPrinting. 5# Copyright © 2007-2019 by Apple Inc. 6# Copyright © 1997-2006 by Easy Software Products. 7# 8# Licensed under Apache License v2.0. See the file "LICENSE" for more 9# information. 10# 11 12include ../Makedefs 13 14 15TARGETS = \ 16 commandtops \ 17 gziptoany \ 18 pstops \ 19 rastertoepson \ 20 rastertohp \ 21 rastertolabel \ 22 rastertopwg 23 24OBJS = commandtops.o gziptoany.o common.o pstops.o \ 25 rastertoepson.o rastertohp.o rastertolabel.o \ 26 rastertopwg.o 27 28 29# 30# Make all targets... 31# 32 33all: $(TARGETS) 34 35 36# 37# Make library targets... 38# 39 40libs: 41 42 43# 44# Make unit tests... 45# 46 47unittests: 48 49 50# 51# Clean all object files... 52# 53 54clean: 55 $(RM) $(OBJS) $(TARGETS) 56 57 58# 59# Update dependencies (without system header dependencies...) 60# 61 62depend: 63 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies 64 65 66# 67# Install all targets... 68# 69 70install: all install-data install-headers install-libs install-exec 71 72 73# 74# Install data files... 75# 76 77install-data: 78 79 80# 81# Install programs... 82# 83 84install-exec: 85 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter 86 for file in $(TARGETS); do \ 87 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \ 88 done 89 if test "x$(SYMROOT)" != "x"; then \ 90 $(INSTALL_DIR) $(SYMROOT); \ 91 for file in $(TARGETS); do \ 92 cp $$file $(SYMROOT); \ 93 dsymutil $(SYMROOT)/$$file; \ 94 done \ 95 fi 96 97 98# 99# Install headers... 100# 101 102install-headers: 103 104 105# 106# Install libraries... 107# 108 109install-libs: 110 111 112# 113# Uninstall all targets... 114# 115 116uninstall: 117 for file in $(TARGETS); do \ 118 $(RM) $(SERVERBIN)/filter/$$file; \ 119 done 120 -$(RMDIR) $(SERVERBIN)/filter 121 -$(RMDIR) $(SERVERBIN) 122 123 124# 125# Automatic API help files... 126# 127 128apihelp: 129 echo Generating CUPS API help files... 130 codedoc --section "Programming" \ 131 --title "Developing PostScript Printer Drivers" \ 132 --header postscript-driver.header \ 133 --body postscript-driver.shtml \ 134 >../doc/help/postscript-driver.html 135 codedoc --section "Programming" \ 136 --title "Introduction to the PPD Compiler" \ 137 --header ppd-compiler.header \ 138 --body ppd-compiler.shtml \ 139 >../doc/help/ppd-compiler.html 140 codedoc --section "Programming" \ 141 --title "Developing Raster Printer Drivers" \ 142 --header raster-driver.header \ 143 --body raster-driver.shtml \ 144 >../doc/help/raster-driver.html 145 codedoc --section "Specifications" \ 146 --title "CUPS PPD Extensions" \ 147 --header spec-ppd.header \ 148 --body spec-ppd.shtml \ 149 >../doc/help/spec-ppd.html 150 151 152# 153# commandtops 154# 155 156commandtops: commandtops.o ../cups/$(LIBCUPS) 157 echo Linking $@... 158 $(LD_CC) $(ALL_LDFLAGS) -o $@ commandtops.o $(LINKCUPS) 159 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 160 161 162# 163# gziptoany 164# 165 166gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) 167 echo Linking $@... 168 $(LD_CC) $(ALL_LDFLAGS) -o $@ gziptoany.o $(LINKCUPS) 169 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 170 171 172# 173# pstops 174# 175 176pstops: pstops.o common.o ../cups/$(LIBCUPS) 177 echo Linking $@... 178 $(LD_CC) $(ALL_LDFLAGS) -o $@ pstops.o common.o $(LINKCUPS) 179 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 180 181 182# 183# rastertoepson 184# 185 186rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) 187 echo Linking $@... 188 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertoepson.o $(LINKCUPS) 189 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 190 191 192# 193# rastertohp 194# 195 196rastertohp: rastertohp.o ../cups/$(LIBCUPS) 197 echo Linking $@... 198 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertohp.o $(LINKCUPS) 199 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 200 201 202# 203# rastertolabel 204# 205 206rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) 207 echo Linking $@... 208 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertolabel.o $(LINKCUPS) 209 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 210 211 212# 213# rastertopwg 214# 215 216rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) 217 echo Linking $@... 218 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPS) 219 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 220 221rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) 222 echo Linking $@... 223 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSSTATIC) 224 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ 225 226 227# 228# Dependencies... 229# 230 231include Dependencies 232