]> git.ipfire.org Git - thirdparty/cups.git/blame - backend/Makefile
Import CUPS 1.4svn-r7356.
[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
7ff4fea9
MS
20RBACKENDS = ipp lpd
21UBACKENDS = $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
568fa3fa
MS
22TARGETS = test1284 testbackend testsupplies \
23 libbackend.a $(RBACKENDS) $(UBACKENDS)
24LIBOBJS = ieee1284.o runloop.o snmp-supplies.o
25OBJS = 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
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
56install: all
bd7854cb 57 $(INSTALL_DIR) -m 755 $(SERVERBIN)/backend
e00b005a 58 for file in $(RBACKENDS); do \
59 $(LIBTOOL) $(INSTALL) -m 700 $$file $(SERVERBIN)/backend; \
60 done
61 for file in $(UBACKENDS); do \
ef416fc2 62 $(INSTALL_BIN) $$file $(SERVERBIN)/backend; \
63 done
64 $(RM) $(SERVERBIN)/backend/http
65 $(LN) ipp $(SERVERBIN)/backend/http
09a101d6 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
ef416fc2 72
73
757d2cad 74#
75# Uninstall all targets...
76#
77
78uninstall:
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
ef416fc2 87#
568fa3fa 88# test1284
ef416fc2 89#
90
568fa3fa 91test1284: test1284.o ../cups/libcups.a
ef416fc2 92 echo Linking $@...
568fa3fa
MS
93 $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
94 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
ef416fc2 95
96
97#
568fa3fa 98# testbackend
ef416fc2 99#
100
568fa3fa 101testbackend: testbackend.o ../cups/libcups.a
ef416fc2 102 echo Linking $@...
568fa3fa 103 $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
4400e98d 104 $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
ef416fc2 105
106
568fa3fa
MS
107#
108# testsupplies
109#
110
111testsupplies: 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
ed486911 117#
118# libbackend.a
119#
120
121libbackend.a: $(LIBOBJS)
122 echo Archiving $@...
123 $(RM) $@
124 $(AR) $(ARFLAGS) $@ $(LIBOBJS)
125 $(RANLIB) $@
126
127
ef416fc2 128#
129# ipp
130#
131
132ipp: 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
143lpd: lpd.o ../cups/$(LIBCUPS)
144 echo Linking $@...
145 $(CC) $(LDFLAGS) -o lpd lpd.o $(LIBS)
146
147
a74454a7 148#
149# pap
150#
151
152pap: pap.o ../cups/$(LIBCUPS)
153 echo Linking $@...
154 $(CC) $(LDFLAGS) -o pap pap.o $(BACKLIBS) $(LIBS) -framework AppleTalk
155
156
ef416fc2 157#
158# parallel
159#
160
ed486911 161parallel: parallel.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 162 echo Linking $@...
ed486911 163 $(CC) $(LDFLAGS) -o parallel parallel.o libbackend.a $(LIBS)
ef416fc2 164
165
166#
167# scsi
168#
169
170scsi: scsi.o ../cups/$(LIBCUPS)
171 echo Linking $@...
172 $(CC) $(LDFLAGS) -o scsi scsi.o $(LIBS)
173
174scsi.o: scsi.c scsi-irix.c scsi-linux.c
175
176
177#
178# serial
179#
180
ed486911 181serial: serial.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 182 echo Linking $@...
ed486911 183 $(CC) $(LDFLAGS) -o serial serial.o libbackend.a $(BACKLIBS) $(LIBS)
ef416fc2 184
185
89d46774 186#
187# snmp
188#
189
ed486911 190snmp: snmp.o ../cups/$(LIBCUPS) libbackend.a
89d46774 191 echo Linking $@...
ed486911 192 $(CC) $(LDFLAGS) -o snmp snmp.o libbackend.a $(LIBS)
89d46774 193
194
ef416fc2 195#
196# socket
197#
198
ed486911 199socket: socket.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 200 echo Linking $@...
ed486911 201 $(CC) $(LDFLAGS) -o socket socket.o libbackend.a $(LIBS)
ef416fc2 202
203
204#
205# usb
206#
207
ed486911 208usb: usb.o ../cups/$(LIBCUPS) libbackend.a
ef416fc2 209 echo Linking $@...
ed486911 210 $(CC) $(LDFLAGS) -o usb usb.o libbackend.a $(BACKLIBS) $(LIBS)
211usb.o: usb.c usb-darwin.c usb-unix.c
ef416fc2 212
213
214#
215# Dependencies...
216#
217
218include Dependencies
219
220
221#
db1f069b 222# End of "$Id: Makefile 6778 2007-08-08 19:27:51Z mike $".
ef416fc2 223#