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