2 # "$Id: Makefile 6664 2007-07-13 17:41:02Z mike $"
4 # Scheduler Makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007 by Apple Inc.
7 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
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/".
83 # Clean all object files...
92 # Update dependencies (without system header dependencies...)
96 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
100 # Install the scheduler...
104 echo Creating
$(SBINDIR
)...
105 $(INSTALL_DIR
) -m
755 $(SBINDIR
)
106 echo Installing cupsd in
$(SBINDIR
)...
107 $(INSTALL_BIN
) cupsd
$(SBINDIR
)
108 echo Installing cupsfilter in
$(SBINDIR
)...
109 $(INSTALL_BIN
) cupsfilter
$(SBINDIR
)
110 echo Creating
$(SERVERBIN
)...
111 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)
112 echo Creating
$(SERVERBIN
)/daemon...
113 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/daemon
114 echo Installing cups-deviced
, cups-driverd
, cups-lpd
, and cups-polld in
$(SERVERBIN
)/daemon...
115 $(INSTALL_BIN
) cups-deviced
$(SERVERBIN
)/daemon
116 $(INSTALL_BIN
) cups-driverd
$(SERVERBIN
)/daemon
117 $(INSTALL_BIN
) cups-lpd
$(SERVERBIN
)/daemon
118 $(INSTALL_BIN
) cups-polld
$(SERVERBIN
)/daemon
119 echo Creating
$(SERVERBIN
)/driver...
120 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/driver
121 echo Creating
$(SERVERROOT
)...
122 $(INSTALL_DIR
) -m
755 $(SERVERROOT
)
123 -chgrp
$(CUPS_GROUP
) $(SERVERROOT
)
124 echo Creating
$(SERVERROOT
)/interfaces...
125 $(INSTALL_DIR
) -m
755 $(SERVERROOT
)/interfaces
126 -chgrp
$(CUPS_GROUP
) $(SERVERROOT
)/interfaces
127 echo Creating
$(SERVERROOT
)/ppd...
128 $(INSTALL_DIR
) -m
755 $(SERVERROOT
)/ppd
129 -chgrp
$(CUPS_GROUP
) $(SERVERROOT
)/ppd
130 -if
test "x`uname`" != xDarwin
; then \
131 echo Creating
$(SERVERROOT
)/ssl...
; \
132 $(INSTALL_DIR
) -m
700 $(SERVERROOT
)/ssl
; \
133 -chgrp
$(CUPS_GROUP
) $(SERVERROOT
)/ssl
; \
134 echo Creating
$(STATEDIR
)...
; \
135 $(INSTALL_DIR
) -m
755 $(STATEDIR
); \
136 echo Creating
$(STATEDIR
)/certs...
; \
137 $(INSTALL_DIR
) -m
511 $(STATEDIR
)/certs
; \
138 chgrp
$(CUPS_PRIMARY_SYSTEM_GROUP
) $(STATEDIR
)/certs
; \
140 echo Creating
$(LOGDIR
)...
141 $(INSTALL_DIR
) -m
755 $(LOGDIR
)
142 echo Creating
$(REQUESTS
)...
143 $(INSTALL_DIR
) -m
710 $(REQUESTS
)
144 -chgrp
$(CUPS_GROUP
) $(REQUESTS
)
145 echo Creating
$(REQUESTS
)/tmp...
146 $(INSTALL_DIR
) -m
1770 $(REQUESTS
)/tmp
147 -chgrp
$(CUPS_GROUP
) $(REQUESTS
)/tmp
148 echo Creating
$(CACHEDIR
)...
149 $(INSTALL_DIR
) -m
775 $(CACHEDIR
)
150 -chgrp
$(CUPS_GROUP
) $(CACHEDIR
)
151 # echo Creating $(CACHEDIR)/ppd...
152 # $(INSTALL_DIR) -m 755 $(CACHEDIR)/ppd
153 # -chgrp $(CUPS_GROUP) $(CACHEDIR)/ppd
154 if
test "x$(SYMROOT)" != "x"; then \
155 $(INSTALL_DIR
) $(SYMROOT
); \
156 for file in
$(TARGETS
); do \
157 cp
$$file $(SYMROOT
); \
163 # Uninstall the scheduler...
167 $(RM
) $(SBINDIR
)/cupsd
168 $(RM
) $(SERVERBIN
)/daemon
/cups-deviced
169 $(RM
) $(SERVERBIN
)/daemon
/cups-driverd
170 $(RM
) $(SERVERBIN
)/daemon
/cups-lpd
171 $(RM
) $(SERVERBIN
)/daemon
/cups-polld
172 -$(RMDIR
) $(STATEDIR
)/certs
173 -$(RMDIR
) $(STATEDIR
)
174 -$(RMDIR
) $(SERVERROOT
)/ppd
175 -$(RMDIR
) $(SERVERROOT
)/interfaces
176 -$(RMDIR
) $(SERVERROOT
)
177 -$(RMDIR
) $(SERVERBIN
)/driver
178 -$(RMDIR
) $(SERVERBIN
)/daemon
179 -$(RMDIR
) $(SERVERBIN
)
181 -$(RMDIR
) $(REQUESTS
)/tmp
182 -$(RMDIR
) $(REQUESTS
)
184 -$(RMDIR
) $(CACHEDIR
)
188 # Make the scheduler executable, "cupsd".
191 cupsd
: $(CUPSDOBJS
) libmime.a ..
/cups
/$(LIBCUPS
)
193 $(CC
) $(LDFLAGS
) -o cupsd
$(CUPSDOBJS
) libmime.a \
194 $(LIBZ
) $(SSLLIBS
) $(LIBSLP
) $(LIBLDAP
) $(PAMLIBS
) \
195 $(LIBPAPER
) $(LIBMALLOC
) $(CUPSDLIBS
) $(DNSSDLIBS
) $(LIBS
) \
198 cupsd-static
: $(CUPSDOBJS
) libmime.a ..
/cups
/libcups.a
200 $(CC
) $(LDFLAGS
) -o cupsd-static
$(CUPSDOBJS
) libmime.a \
201 $(LIBZ
) $(SSLLIBS
) $(LIBSLP
) $(LIBLDAP
) $(PAMLIBS
) \
202 ..
/cups
/libcups.a
$(COMMONLIBS
) $(LIBZ
) $(LIBPAPER
) \
203 $(LIBMALLOC
) $(CUPSDLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
207 # Make the cupsfilter utility.
210 cupsfilter
: cupsfilter.o libmime.a ..
/cups
/$(LIBCUPS
)
212 $(CC
) $(LDFLAGS
) -o cupsfilter cupsfilter.o libmime.a
$(LIBS
)
216 # Make the device daemon, "cups-deviced".
219 cups-deviced
: cups-deviced.o util.o ..
/cups
/$(LIBCUPS
)
221 $(CC
) $(LDFLAGS
) -o cups-deviced cups-deviced.o util.o
$(LIBS
)
225 # Make the driver daemon, "cups-driverd".
228 cups-driverd
: cups-driverd.o util.o ..
/cups
/$(LIBCUPS
)
230 $(CC
) $(LDFLAGS
) -o cups-driverd cups-driverd.o util.o
$(LIBS
)
234 # Make the line printer daemon, "cups-lpd".
237 cups-lpd
: cups-lpd.o ..
/cups
/$(LIBCUPS
)
239 $(CC
) $(LDFLAGS
) -o cups-lpd cups-lpd.o
$(LIBS
)
243 # Make the polling daemon, "cups-polld".
246 cups-polld
: cups-polld.o ..
/cups
/$(LIBCUPS
)
248 $(CC
) $(LDFLAGS
) -o cups-polld cups-polld.o
$(LIBS
)
255 libmime.a
: $(MIMEOBJS
)
258 $(AR
) $(ARFLAGS
) $@
$(MIMEOBJS
)
263 # Make the test program, "testdirsvc".
266 testdirsvc
: testdirsvc.o
268 $(CC
) $(LDFLAGS
) -o testdirsvc testdirsvc.o
$(COMMONLIBS
) $(NETLIBS
)
272 # Make the test program, "testlpd".
275 testlpd
: testlpd.o ..
/cups
/libcups.a cups-lpd
277 $(CC
) $(LDFLAGS
) -o testlpd testlpd.o ..
/cups
/libcups.a \
278 $(COMMONLIBS
) $(LIBZ
) $(SSLLIBS
) $(LIBGSSAPI
)
285 testmime
: testmime.o libmime.a ..
/cups
/libcups.a
287 $(CC
) $(LDFLAGS
) -o
$@ testmime.o libmime.a ..
/cups
/libcups.a \
288 $(COMMONLIBS
) $(LIBZ
) $(SSLLIBS
) $(LIBGSSAPI
)
292 # Make the test program, "testspeed".
295 testspeed
: testspeed.o ..
/cups
/libcups.a
297 $(CC
) $(LDFLAGS
) -o testspeed testspeed.o ..
/cups
/libcups.a \
298 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) $(LIBGSSAPI
)
302 # Make the test program, "testsub".
305 testsub
: testsub.o ..
/cups
/libcups.a
307 $(CC
) $(LDFLAGS
) -o testsub testsub.o ..
/cups
/libcups.a \
308 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) $(LIBGSSAPI
)
319 # End of "$Id: Makefile 6664 2007-07-13 17:41:02Z mike $".