]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/Makefile
Import CUPS 1.4svn-r7356.
[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
57 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
58 for file in $(RBACKENDS); do \
59 $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
60 done
61 for file in $(UBACKENDS); do \
62 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
63 done
64 $(RM) $(SERVERBIN)/backend/http
65 $(LN) ipp $(SERVERBIN)/backend/http
66 if test "x$(SYMROOT)" != "x"; then \
67 $(INSTALL_DIR) $(SYMROOT); \
68 for file in $(TARGETS); do \
69 cp $$file $(SYMROOT); \
70 done \
71 fi
72
73
74 #
75 # Uninstall all targets...
76 #
77
78 uninstall:
79 for file in $(RBACKENDS) $(UBACKENDS); do \
80 $(RM) $(SERVERBIN)/backend/$$file; \
81 done
82 $(RM) $(SERVERBIN)/backend/http
83 -$(RMDIR) $(SERVERBIN)/backend
84 -$(RMDIR) $(SERVERBIN)
85
86
87 #
88 # test1284
89 #
90
91 test1284: test1284.o ../cups/libcups.a
92 echo Linking $@...
93 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
94 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
95
96
97 #
98 # testbackend
99 #
100
101 testbackend: testbackend.o ../cups/libcups.a
102 echo Linking $@...
103 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
104 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
105
106
107 #
108 # testsupplies
109 #
110
111 testsupplies: testsupplies.o libbackend.a ../cups/libcups.a
112 echo Linking $@...
113 $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
114 ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
115
116
117 #
118 # libbackend.a
119 #
120
121 libbackend.a: $(LIBOBJS)
122 echo Archiving $@...
123 $(RM) $@
124 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
125 $(RANLIB) $@
126
127
128 #
129 # ipp
130 #
131
132 ipp: ipp.o ../cups/$(LIBCUPS)
133 echo Linking $@...
134 $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
135 $(RM) http
136 $(LN) ipp http
137
138
139 #
140 # lpd
141 #
142
143 lpd: lpd.o ../cups/$(LIBCUPS)
144 echo Linking $@...
145 $(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
146
147
148 #
149 # pap
150 #
151
152 pap: pap.o ../cups/$(LIBCUPS)
153 echo Linking $@...
154 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
155
156
157 #
158 # parallel
159 #
160
161 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
162 echo Linking $@...
163 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
164
165
166 #
167 # scsi
168 #
169
170 scsi: scsi.o ../cups/$(LIBCUPS)
171 echo Linking $@...
172 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
173
174 scsi.o: scsi.c scsi-irix.c scsi-linux.c
175
176
177 #
178 # serial
179 #
180
181 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
182 echo Linking $@...
183 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
184
185
186 #
187 # snmp
188 #
189
190 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
191 echo Linking $@...
192 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
193
194
195 #
196 # socket
197 #
198
199 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
200 echo Linking $@...
201 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
202
203
204 #
205 # usb
206 #
207
208 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
209 echo Linking $@...
210 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(BACKLIBS) $(LIBS)
211 usb.o: usb.c usb-darwin.c usb-unix.c
212
213
214 #
215 # Dependencies...
216 #
217
218 include Dependencies
219
220
221 #
222 # End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
223 #