]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/Makefile
Merge changes from CUPS 1.4svn-r7696.
[thirdparty/cups.git] / backend / Makefile
1 #
2 # "$Id: Makefile 7687 2008-06-24 01:28:36Z 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 $(MDNS)
21 UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
22 TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
24 LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
25 OBJS = ipp.o lpd.o mdns.o pap.o parallel.o scsi.o serial.o snmp.o \
26 socket.o test1284.o testbackend.o testsupplies.o usb.o
27
28
29 #
30 # Make all targets...
31 #
32
33 all: $(TARGETS)
34
35
36 #
37 # Make library targets...
38 #
39
40 libs:
41
42
43 #
44 # Clean all object files...
45 #
46
47 clean:
48 $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
49
50
51 #
52 # Update dependencies (without system header dependencies...)
53 #
54
55 depend:
56 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
57
58
59 #
60 # Install all targets...
61 #
62
63 install: all install-data install-headers install-libs install-exec
64
65
66 #
67 # Install data files...
68 #
69
70 install-data:
71
72
73 #
74 # Install programs...
75 #
76
77 install-exec:
78 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
79 for file in $(RBACKENDS); do \
80 $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
81 done
82 for file in $(UBACKENDS); do \
83 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
84 done
85 $(RM) $(SERVERBIN)/backend/http
86 $(LN) ipp $(SERVERBIN)/backend/http
87 if test "x$(SYMROOT)" != "x"; then \
88 $(INSTALL_DIR) $(SYMROOT); \
89 for file in $(TARGETS); do \
90 cp $$file $(SYMROOT); \
91 done \
92 fi
93
94
95 #
96 # Install headers...
97 #
98
99 install-headers:
100
101
102 #
103 # Install libraries...
104 #
105
106 install-libs:
107
108
109 #
110 # Uninstall all targets...
111 #
112
113 uninstall:
114 for file in $(RBACKENDS) $(UBACKENDS); do \
115 $(RM) $(SERVERBIN)/backend/$$file; \
116 done
117 $(RM) $(SERVERBIN)/backend/http
118 -$(RMDIR) $(SERVERBIN)/backend
119 -$(RMDIR) $(SERVERBIN)
120
121
122 #
123 # test1284
124 #
125
126 test1284: test1284.o ../cups/libcups.a
127 echo Linking $@...
128 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
129 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
130
131
132 #
133 # testbackend
134 #
135
136 testbackend: testbackend.o ../cups/libcups.a
137 echo Linking $@...
138 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
139 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
140
141
142 #
143 # testsupplies
144 #
145
146 testsupplies: testsupplies.o libbackend.a ../cups/libcups.a
147 echo Linking $@...
148 $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
149 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
150
151
152 #
153 # libbackend.a
154 #
155
156 libbackend.a: $(LIBOBJS)
157 echo Archiving $@...
158 $(RM) $@
159 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
160 $(RANLIB) $@
161
162
163 #
164 # ipp
165 #
166
167 ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
168 echo Linking $@...
169 $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
170 $(RM) http
171 $(LN) ipp http
172
173
174 #
175 # lpd
176 #
177
178 lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
179 echo Linking $@...
180 $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
181
182
183 #
184 # mdns
185 #
186
187 mdns: mdns.o ../cups/$(LIBCUPS) libbackend.a
188 echo Linking $@...
189 $(CC) $(LDFLAGS) -o mdns mdns.o libbackend.a $(LIBS)
190
191
192 #
193 # pap
194 #
195
196 pap: pap.o ../cups/$(LIBCUPS)
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
199
200
201 #
202 # parallel
203 #
204
205 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
206 echo Linking $@...
207 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
208
209
210 #
211 # scsi
212 #
213
214 scsi: scsi.o ../cups/$(LIBCUPS)
215 echo Linking $@...
216 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
217
218 scsi.o: scsi.c scsi-irix.c scsi-linux.c
219
220
221 #
222 # serial
223 #
224
225 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
226 echo Linking $@...
227 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
228
229
230 #
231 # snmp
232 #
233
234 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
235 echo Linking $@...
236 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
237
238
239 #
240 # socket
241 #
242
243 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
244 echo Linking $@...
245 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
246
247
248 #
249 # usb
250 #
251
252 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
253 echo Linking $@...
254 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) $(BACKLIBS) $(LIBS)
255 usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
256
257
258 #
259 # Dependencies...
260 #
261
262 include Dependencies
263
264
265 #
266 # End of "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $".
267 #