]> git.ipfire.org Git - thirdparty/cups.git/blob - backend/Makefile
Import CUPS 1.4svn-r7226.
[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 = betest test1284 libbackend.a $(RBACKENDS) $(UBACKENDS)
23 LIBOBJS = ieee1284.o runloop.o
24 OBJS = betest.o ipp.o lpd.o pap.o parallel.o scsi.o \
25 serial.o snmp.o socket.o test1284.o usb.o
26
27
28 #
29 # Make all targets...
30 #
31
32 all: $(TARGETS)
33
34
35 #
36 # Clean all object files...
37 #
38
39 clean:
40 $(RM) $(OBJS) $(TARGETS) $(LIBOBJS) http
41
42
43 #
44 # Update dependencies (without system header dependencies...)
45 #
46
47 depend:
48 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
49
50
51 #
52 # Install all targets...
53 #
54
55 install: all
56 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
57 for file in $(RBACKENDS); do \
58 $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
59 done
60 for file in $(UBACKENDS); do \
61 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
62 done
63 $(RM) $(SERVERBIN)/backend/http
64 $(LN) ipp $(SERVERBIN)/backend/http
65 if test "x$(SYMROOT)" != "x"; then \
66 $(INSTALL_DIR) $(SYMROOT); \
67 for file in $(TARGETS); do \
68 cp $$file $(SYMROOT); \
69 done \
70 fi
71
72
73 #
74 # Uninstall all targets...
75 #
76
77 uninstall:
78 for file in $(RBACKENDS) $(UBACKENDS); do \
79 $(RM) $(SERVERBIN)/backend/$$file; \
80 done
81 $(RM) $(SERVERBIN)/backend/http
82 -$(RMDIR) $(SERVERBIN)/backend
83 -$(RMDIR) $(SERVERBIN)
84
85
86 #
87 # betest
88 #
89
90 betest: betest.o ../cups/$(LIBCUPS)
91 echo Linking $@...
92 $(CC) $(LDFLAGS) -o betest betest.o $(LIBS)
93
94
95 #
96 # test1284
97 #
98
99 test1284: test1284.o ../cups/libcups.a
100 echo Linking $@...
101 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
102 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
103
104
105 #
106 # libbackend.a
107 #
108
109 libbackend.a: $(LIBOBJS)
110 echo Archiving $@...
111 $(RM) $@
112 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
113 $(RANLIB) $@
114
115
116 #
117 # ipp
118 #
119
120 ipp: ipp.o ../cups/$(LIBCUPS)
121 echo Linking $@...
122 $(CC) $(LDFLAGS) -o ipp ipp.o $(LIBS)
123 $(RM) http
124 $(LN) ipp http
125
126
127 #
128 # lpd
129 #
130
131 lpd: lpd.o ../cups/$(LIBCUPS)
132 echo Linking $@...
133 $(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
134
135
136 #
137 # pap
138 #
139
140 pap: pap.o ../cups/$(LIBCUPS)
141 echo Linking $@...
142 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
143
144
145 #
146 # parallel
147 #
148
149 parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
150 echo Linking $@...
151 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
152
153
154 #
155 # scsi
156 #
157
158 scsi: scsi.o ../cups/$(LIBCUPS)
159 echo Linking $@...
160 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
161
162 scsi.o: scsi.c scsi-irix.c scsi-linux.c
163
164
165 #
166 # serial
167 #
168
169 serial: serial.o ../cups/$(LIBCUPS) libbackend.a
170 echo Linking $@...
171 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
172
173
174 #
175 # snmp
176 #
177
178 snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
179 echo Linking $@...
180 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
181
182
183 #
184 # socket
185 #
186
187 socket: socket.o ../cups/$(LIBCUPS) libbackend.a
188 echo Linking $@...
189 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
190
191
192 #
193 # usb
194 #
195
196 usb: usb.o ../cups/$(LIBCUPS) libbackend.a
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(BACKLIBS) $(LIBS)
199 usb.o: usb.c usb-darwin.c usb-unix.c
200
201
202 #
203 # Dependencies...
204 #
205
206 include Dependencies
207
208
209 #
210 # End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
211 #