2 # Filter makefile for CUPS.
4 # Copyright © 2020-2024 by OpenPrinting.
5 # Copyright © 2007-2019 by Apple Inc.
6 # Copyright © 1997-2006 by Easy Software Products.
8 # Licensed under Apache License v2.0. See the file "LICENSE" for more
24 OBJS = commandtops.o gziptoany.o common.o pstops.o \
25 rastertoepson.o rastertohp.o rastertolabel.o \
37 # Make library targets...
51 # Clean all object files...
55 $(RM) $(OBJS) $(TARGETS)
59 # Update dependencies (without system header dependencies...)
63 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) | sed -e '1,$$s/ \/usr\/include\/[^ ]*//g' -e '1,$$s/ \/usr\/local\/include\/[^ ]*//g' >Dependencies
67 # Install all targets...
70 install: all install-data install-headers install-libs install-exec
74 # Install data files...
85 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
86 for file in $(TARGETS); do \
87 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
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; \
106 # Install libraries...
113 # Uninstall all targets...
117 for file in $(TARGETS); do \
118 $(RM) $(SERVERBIN)/filter/$$file; \
120 -$(RMDIR) $(SERVERBIN)/filter
121 -$(RMDIR) $(SERVERBIN)
125 # Automatic API help files...
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
156 commandtops: commandtops.o ../cups/$(LIBCUPS)
158 $(LD_CC) $(ALL_LDFLAGS) -o $@ commandtops.o $(LINKCUPS)
159 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
166 gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
168 $(LD_CC) $(ALL_LDFLAGS) -o $@ gziptoany.o $(LINKCUPS)
169 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
176 pstops: pstops.o common.o ../cups/$(LIBCUPS)
178 $(LD_CC) $(ALL_LDFLAGS) -o $@ pstops.o common.o $(LINKCUPS)
179 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
186 rastertoepson: rastertoepson.o ../cups/$(LIBCUPS)
188 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertoepson.o $(LINKCUPS)
189 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
196 rastertohp: rastertohp.o ../cups/$(LIBCUPS)
198 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertohp.o $(LINKCUPS)
199 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
206 rastertolabel: rastertolabel.o ../cups/$(LIBCUPS)
208 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertolabel.o $(LINKCUPS)
209 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
216 rastertopwg: rastertopwg.o ../cups/$(LIBCUPS)
218 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPS)
219 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
221 rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC)
223 $(LD_CC) $(ALL_LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSSTATIC)
224 $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@