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