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