]> git.ipfire.org Git - thirdparty/cups.git/blame - backend/Makefile
Merge fixes from CUPS 1.4svn-r7555.
[thirdparty/cups.git] / backend / Makefile
CommitLineData
ef416fc2 1#
db1f069b 2# "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $"
ef416fc2 3#
4# Backend makefile for the Common UNIX Printing System (CUPS).
5#
91c84a35 6# Copyright 2007-2008 by Apple Inc.
09a101d6 7# Copyright 1997-2007 by Easy Software Products, all rights reserved.
ef416fc2 8#
9# These coded instructions, statements, and computer programs are the
bc44d920 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/".
ef416fc2 14#
15# This file is subject to the Apple OS-Developed Software exception.
16#
17
18include ../Makedefs
19
7a14d768 20RBACKENDS = ipp lpd $(MDNS)
7ff4fea9 21UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
568fa3fa
MS
22TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
7a14d768
MS
24LIBOBJS = ieee1284.o network.o runloop.o snmp-supplies.o
25OBJS = 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
ef416fc2 27
28
29#
30# Make all targets...
31#
32
33all: $(TARGETS)
34
35
36#
37# Clean all object files...
38#
39
40clean:
26d47ec6 41 $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
ef416fc2 42
43
44#
45# Update dependencies (without system header dependencies...)
46#
47
48depend:
49 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
50
51
52#
53# Install all targets...
54#
55
50fe7201
MS
56install: all install-data install-headers install-libs install-exec
57
58
59#
60# Install data files...
61#
62
63install-data:
64
65
66#
67# Install programs...
68#
69
70install-exec:
bd7854cb 71 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
e00b005a 72 for file in $(RBACKENDS); do \
839a51c8 73 $(LIBTOOL) $(INSTALL_BIN) -m 700 $$file $(SERVERBIN)/backend; \
e00b005a 74 done
75 for file in $(UBACKENDS); do \
ef416fc2 76 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
77 done
78 $(RM) $(SERVERBIN)/backend/http
79 $(LN) ipp $(SERVERBIN)/backend/http
09a101d6 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
ef416fc2 86
87
50fe7201
MS
88#
89# Install headers...
90#
91
92install-headers:
93
94
95#
96# Install libraries...
97#
98
99install-libs:
100
101
757d2cad 102#
103# Uninstall all targets...
104#
105
106uninstall:
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
ef416fc2 115#
568fa3fa 116# test1284
ef416fc2 117#
118
568fa3fa 119test1284: test1284.o ../cups/libcups.a
ef416fc2 120 echo Linking $@...
568fa3fa 121 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
ae71f5de 122 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
ef416fc2 123
124
125#
568fa3fa 126# testbackend
ef416fc2 127#
128
568fa3fa 129testbackend: testbackend.o ../cups/libcups.a
ef416fc2 130 echo Linking $@...
568fa3fa 131 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
ae71f5de 132 $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
ef416fc2 133
134
568fa3fa
MS
135#
136# testsupplies
137#
138
139testsupplies: 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
ed486911 145#
146# libbackend.a
147#
148
149libbackend.a: $(LIBOBJS)
150 echo Archiving $@...
151 $(RM) $@
152 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
153 $(RANLIB) $@
154
155
ef416fc2 156#
157# ipp
158#
159
7a14d768 160ipp: ipp.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 161 echo Linking $@...
7a14d768 162 $(CC) $(LDFLAGS) -o ipp ipp.o libbackend.a $(LIBS)
ef416fc2 163 $(RM) http
164 $(LN) ipp http
165
166
167#
168# lpd
169#
170
7a14d768 171lpd: lpd.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 172 echo Linking $@...
7a14d768
MS
173 $(CC) $(LDFLAGS) -o lpd lpd.o libbackend.a $(LIBS)
174
175
176#
177# mdns
178#
179
180mdns: mdns.o ../cups/$(LIBCUPS) libbackend.a
181 echo Linking $@...
182 $(CC) $(LDFLAGS) -o mdns mdns.o libbackend.a $(LIBS)
ef416fc2 183
184
a74454a7 185#
186# pap
187#
188
189pap: pap.o ../cups/$(LIBCUPS)
190 echo Linking $@...
191 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
192
193
ef416fc2 194#
195# parallel
196#
197
ed486911 198parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 199 echo Linking $@...
ed486911 200 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
ef416fc2 201
202
203#
204# scsi
205#
206
207scsi: scsi.o ../cups/$(LIBCUPS)
208 echo Linking $@...
209 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
210
211scsi.o: scsi.c scsi-irix.c scsi-linux.c
212
213
214#
215# serial
216#
217
ed486911 218serial: serial.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 219 echo Linking $@...
ed486911 220 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
ef416fc2 221
222
89d46774 223#
224# snmp
225#
226
ed486911 227snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
89d46774 228 echo Linking $@...
ed486911 229 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
89d46774 230
231
ef416fc2 232#
233# socket
234#
235
ed486911 236socket: socket.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 237 echo Linking $@...
ed486911 238 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
ef416fc2 239
240
241#
242# usb
243#
244
ed486911 245usb: usb.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 246 echo Linking $@...
ed486911 247 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(BACKLIBS) $(LIBS)
248usb.o: usb.c usb-darwin.c usb-unix.c
ef416fc2 249
250
251#
252# Dependencies...
253#
254
255include Dependencies
256
257
258#
db1f069b 259# End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
ef416fc2 260#