]> git.ipfire.org Git - thirdparty/cups.git/blame_incremental - backend/Makefile
Merge changes from CUPS 1.4svn-r7932.
[thirdparty/cups.git] / backend / Makefile
... / ...
CommitLineData
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
18include ../Makedefs
19
20RBACKENDS = ipp lpd $(DNSSD_BACKEND)
21UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
22TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
24LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
25OBJS = ipp.o lpd.o dnssd.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
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) $(LIBOBJS) http mdns
56
57
58#
59# Update dependencies (without system header dependencies...)
60#
61
62depend:
63 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
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)/backend
86 for file in $(RBACKENDS); do \
87 $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
88 done
89 for file in $(UBACKENDS); do \
90 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
91 done
92 $(RM) $(SERVERBIN)/backend/http
93 $(LN) ipp $(SERVERBIN)/backend/http
94 if test "x$(DNSSD_BACKEND)" != x; then \
95 $(RM) $(SERVERBIN)/backend/mdns; \
96 $(LN) $(DNSSD_BACKEND) $(SERVERBIN)/backend/mdns; \
97 fi
98 if test "x$(SYMROOT)" != "x"; then \
99 $(INSTALL_DIR) $(SYMROOT); \
100 for file in $(TARGETS); do \
101 cp $$file $(SYMROOT); \
102 done \
103 fi
104
105
106#
107# Install headers...
108#
109
110install-headers:
111
112
113#
114# Install libraries...
115#
116
117install-libs:
118
119
120#
121# Uninstall all targets...
122#
123
124uninstall:
125 for file in $(RBACKENDS) $(UBACKENDS); do \
126 $(RM) $(SERVERBIN)/backend/$$file; \
127 done
128 $(RM) $(SERVERBIN)/backend/http
129 -$(RMDIR) $(SERVERBIN)/backend
130 -$(RMDIR) $(SERVERBIN)
131
132
133#
134# test1284
135#
136
137test1284: test1284.o ../cups/libcups.a
138 echo Linking $@...
139 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
140 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
141
142
143#
144# testbackend
145#
146
147testbackend: testbackend.o ../cups/libcups.a
148 echo Linking $@...
149 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
150 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
151
152
153#
154# testsupplies
155#
156
157testsupplies: testsupplies.o libbackend.a ../cups/libcups.a
158 echo Linking $@...
159 $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
160 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
161
162
163#
164# libbackend.a
165#
166
167libbackend.a: $(LIBOBJS)
168 echo Archiving $@...
169 $(RM) $@
170 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
171 $(RANLIB) $@
172
173
174#
175# dnssd
176#
177
178dnssd: dnssd.o ../cups/$(LIBCUPS) libbackend.a
179 echo Linking $@...
180 $(CC) $(LDFLAGS) -o dnssd dnssd.o libbackend.a $(LIBS)
181 $(RM) mdns
182 $(LN) dnssd mdns
183
184
185#
186# ipp
187#
188
189ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
190 echo Linking $@...
191 $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
192 $(RM) http
193 $(LN) ipp http
194
195
196#
197# lpd
198#
199
200lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
201 echo Linking $@...
202 $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
203
204
205#
206# pap
207#
208
209pap: pap.o ../cups/$(LIBCUPS)
210 echo Linking $@...
211 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
212
213
214#
215# parallel
216#
217
218parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
219 echo Linking $@...
220 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
221
222
223#
224# scsi
225#
226
227scsi: scsi.o ../cups/$(LIBCUPS)
228 echo Linking $@...
229 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
230
231scsi.o: scsi.c scsi-irix.c scsi-linux.c
232
233
234#
235# serial
236#
237
238serial: serial.o ../cups/$(LIBCUPS) libbackend.a
239 echo Linking $@...
240 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
241
242
243#
244# snmp
245#
246
247snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
248 echo Linking $@...
249 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
250
251
252#
253# socket
254#
255
256socket: socket.o ../cups/$(LIBCUPS) libbackend.a
257 echo Linking $@...
258 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
259
260
261#
262# usb
263#
264
265usb: usb.o ../cups/$(LIBCUPS) libbackend.a
266 echo Linking $@...
267 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o usb usb.o libbackend.a $(LIBUSB) \
268 $(BACKLIBS) $(LIBS)
269usb.o: usb.c usb-darwin.c usb-libusb.c usb-unix.c
270
271
272#
273# Dependencies...
274#
275
276include Dependencies
277
278
279#
280# End of "$Id: Makefile 7687 2008-06-24 01:28:36Z mike $".
281#