]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/Makefile
<rdar://problem/5792631> dependency cycle in cups-144 / PrintingCore-250 / Applicatio...
[thirdparty/cups.git] / backend / Makefile
1 #
2 # "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $"
3 #
4 # Backend makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007-2008 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
8 #
9 # These coded instructions, statements, and computer programs are the
10 # property of Apple Inc. and are protected by Federal copyright
11 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 # which should have been included with this file. If this file is
13 # file is missing or damaged, see the license at "http://www.cups.org/".
14 #
15 # This file is subject to the Apple OS-Developed Software exception.
16 #
17
18 include ../Makedefs
19
20 RBACKENDS = ipp lpd
21 UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
22 TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
24 LIBOBJS = ieee1284.o runloop.o snmp-supplies.o
25 OBJS = ipp.o lpd.o pap.o parallel.o scsi.o serial.o snmp.o socket.o \
26 test1284.o testbackend.o testsupplies.o usb.o
27
28
29 #
30 # Make all targets...
31 #
32
33 all: $(TARGETS)
34
35
36 #
37 # Clean all object files...
38 #
39
40 clean:
41 $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
42
43
44 #
45 # Update dependencies (without system header dependencies...)
46 #
47
48 depend:
49 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
50
51
52 #
53 # Install all targets...
54 #
55
56 install: all install-data install-headers install-libs install-exec
57
58
59 #
60 # Install data files...
61 #
62
63 install-data:
64
65
66 #
67 # Install programs...
68 #
69
70 install-exec:
71 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
72 for file in $(RBACKENDS); do \
73 $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
74 done
75 for file in $(UBACKENDS); do \
76 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
77 done
78 $(RM) $(SERVERBIN)/backend/http
79 $(LN) ipp $(SERVERBIN)/backend/http
80 if test "x$(SYMROOT)" != "x"; then \
81 $(INSTALL_DIR) $(SYMROOT); \
82 for file in $(TARGETS); do \
83 cp $$file $(SYMROOT); \
84 done \
85 fi
86
87
88 #
89 # Install headers...
90 #
91
92 install-headers:
93
94
95 #
96 # Install libraries...
97 #
98
99 install-libs:
100
101
102 #
103 # Uninstall all targets...
104 #
105
106 uninstall:
107 for file in $(RBACKENDS) $(UBACKENDS); do \
108 $(RM) $(SERVERBIN)/backend/$$file; \
109 done
110 $(RM) $(SERVERBIN)/backend/http
111 -$(RMDIR) $(SERVERBIN)/backend
112 -$(RMDIR) $(SERVERBIN)
113
114
115 #
116 # test1284
117 #
118
119 test1284: test1284.o ../cups/libcups.a
120 echo Linking $@...
121 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
122 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
123
124
125 #
126 # testbackend
127 #
128
129 testbackend: testbackend.o ../cups/libcups.a
130 echo Linking $@...
131 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
132 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
133
134
135 #
136 # testsupplies
137 #
138
139 testsupplies: testsupplies.o libbackend.a ../cups/libcups.a
140 echo Linking $@...
141 $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
142 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
143
144
145 #
146 # libbackend.a
147 #
148
149 libbackend.a: $(LIBOBJS)
150 echo Archiving $@...
151 $(RM) $@
152 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
153 $(RANLIB) $@
154
155
156 #
157 # ipp
158 #
159
160 ipp: ipp.o ../cups/$(LIBCUPS)
161 echo Linking $@...
162 $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
163 $(RM) http
164 $(LN) ipp http
165
166
167 #
168 # lpd
169 #
170
171 lpd: lpd.o ../cups/$(LIBCUPS)
172 echo Linking $@...
173 $(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
174
175
176 #
177 # pap
178 #
179
180 pap: pap.o ../cups/$(LIBCUPS)
181 echo Linking $@...
182 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
183
184
185 #
186 # parallel
187 #
188
189 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
190 echo Linking $@...
191 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
192
193
194 #
195 # scsi
196 #
197
198 scsi: scsi.o ../cups/$(LIBCUPS)
199 echo Linking $@...
200 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
201
202 scsi.o: scsi.c scsi-irix.c scsi-linux.c
203
204
205 #
206 # serial
207 #
208
209 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
210 echo Linking $@...
211 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
212
213
214 #
215 # snmp
216 #
217
218 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
219 echo Linking $@...
220 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
221
222
223 #
224 # socket
225 #
226
227 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
228 echo Linking $@...
229 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
230
231
232 #
233 # usb
234 #
235
236 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
237 echo Linking $@...
238 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(BACKLIBS) $(LIBS)
239 usb.o: usb.c usb-darwin.c usb-unix.c
240
241
242 #
243 # Dependencies...
244 #
245
246 include Dependencies
247
248
249 #
250 # End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
251 #