]> git.ipfire.org Git - thirdparty/cups.git/blame - backend/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / backend / Makefile
CommitLineData
ef416fc2 1#
bc44d920 2# "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3#
4# Backend makefile for the Common UNIX Printing System (CUPS).
5#
bc44d920 6# Copyright 2007 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
09a101d6 20RBACKENDS = lpd
21UBACKENDS = ipp $(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# ieee1394
118#
119
120ieee1394: ieee1394.o ieee1394-linux.o
121 echo Linking $@...
122 $(CC) $(LDFLAGS) -o ieee1394 ieee1394.o ieee1394-linux.o -lraw1394 $(LIBS)
123
124ieee1394.o: ieee1394.h
125ieee1394-linux.o: ieee1394.h
126
127
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#
bc44d920 222# End of "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 223#