]> git.ipfire.org Git - thirdparty/cups.git/blame - Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / Makefile
CommitLineData
ef416fc2 1#
f7deaa1a 2# "$Id: Makefile 6332 2007-03-12 16:08:51Z mike $"
ef416fc2 3#
4# Top-level Makefile for the Common UNIX Printing System (CUPS).
5#
f7deaa1a 6# Copyright 1997-2007 by Easy Software Products, all rights reserved.
ef416fc2 7#
8# These coded instructions, statements, and computer programs are the
9# property of Easy Software Products and are protected by Federal
10# copyright law. Distribution and use rights are outlined in the file
11# "LICENSE.txt" which should have been included with this file. If this
12# file is missing or damaged please contact Easy Software Products
13# at:
14#
15# Attn: CUPS Licensing Information
16# Easy Software Products
17# 44141 Airport View Drive, Suite 204
18# Hollywood, Maryland 20636-3142 USA
19#
20# Voice: (301) 373-9600
21# EMail: cups-info@cups.org
22# WWW: http://www.cups.org
23#
24
25include Makedefs
26
27#
28# Directories to make...
29#
30
bd7854cb 31DIRS = cups backend berkeley cgi-bin filter locale man monitor \
e1d6a774 32 notifier $(PDFTOPS) scheduler systemv test \
757d2cad 33 $(PHPDIR) \
34 conf data doc fonts ppd templates
bd7854cb 35
ef416fc2 36
37#
38# Make all targets...
39#
40
41all:
42 chmod +x cups-config
43 for dir in $(DIRS); do\
44 echo Making all in $$dir... ;\
45 (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
46 done
47
bd7854cb 48
ef416fc2 49#
50# Remove object and target files...
51#
52
53clean:
54 for dir in $(DIRS); do\
55 echo Cleaning in $$dir... ;\
56 (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
57 done
58
bd7854cb 59
a9252913 60#
61# Remove all non-distribution files...
62#
63
64distclean: clean
65 $(RM) Makedefs config.h config.log config.status
66 $(RM) cups-config conf/cupsd.conf conf/pam.std
67 $(RM) doc/help/standard.html doc/index.html
68 $(RM) init/cups.sh init/cups-lpd
69 $(RM) man/cups-deviced.man man/cups-driverd.man
70 $(RM) man/cups-lpd.man man/cupsaddsmb.man man/cupsd.man
71 $(RM) man/cupsd.conf.man man/lpoptions.man
f7deaa1a 72 $(RM) packaging/cups.list
73 $(RM) templates/edit-config.tmpl templates/header.tmpl
a9252913 74 -$(RM) doc/*/index.html
75 -$(RM) templates/*/edit-config.tmpl
76 -$(RM) templates/*/header.tmpl
77 -$(RM) -r autom4te*.cache
78
79
ef416fc2 80#
81# Make dependencies
82#
83
84depend:
85 for dir in $(DIRS); do\
86 echo Making dependencies in $$dir... ;\
87 (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\
88 done
89
90
91#
92# Install object and target files...
93#
94
95install: installhdrs
96 for dir in $(DIRS); do\
97 echo Installing in $$dir... ;\
98 (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
99 done
ef416fc2 100 echo Installing cups-config script...
757d2cad 101 $(INSTALL_DIR) -m 755 $(BINDIR)
ef416fc2 102 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
e1d6a774 103 if test "x$(INITDIR)" != x; then \
f301802f 104 echo Installing init scripts...; \
757d2cad 105 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \
fa73b229 106 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
f7deaa1a 107 for level in $(RCLEVELS); do \
108 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
109 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/S$(RCSTART)cups; \
110 if test `uname` = HP-UX; then \
111 level=`expr $$level - 1`; \
112 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc$${level}.d; \
113 fi; \
114 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc$${level}.d/K$(RCSTOP)cups; \
115 done; \
757d2cad 116 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \
f7deaa1a 117 $(LN) ../init.d/cups $(BUILDROOT)$(INITDIR)/rc0.d/K$(RCSTOP)cups; \
ef416fc2 118 fi
e1d6a774 119 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
ef416fc2 120 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
121 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
f301802f 122 echo Installing StartupItems files...; \
e00b005a 123 $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
124 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
757d2cad 125 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
e00b005a 126 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
a4d04587 127 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
d09495fa 128 echo Installing LaunchDaemons configuration files...; \
e00b005a 129 $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
d09495fa 130 $(INSTALL_DATA) init/org.cups.cups-lpd.plist $(BUILDROOT)/System/Library/LaunchDaemons; \
ef416fc2 131 else \
f301802f 132 echo Installing RC script...; \
fa73b229 133 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
ef416fc2 134 fi \
135 fi
e1d6a774 136 if test "x$(DBUSDIR)" != x; then \
b423cd4c 137 echo Installing cups.conf in $(DBUSDIR)...;\
f7deaa1a 138 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR)/system.d; \
139 $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/system.d/cups.conf; \
bd7854cb 140 fi
e1d6a774 141 if test "x$(XINETD)" != x; then \
142 echo Installing xinetd configuration file for cups-lpd...; \
143 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \
144 $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \
145 fi
f7deaa1a 146 if test "x$(MENUDIR)" != x; then \
147 echo Installing desktop menu...; \
148 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(MENUDIR); \
149 $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)$(MENUDIR); \
150 fi
151 if test "x$(ICONDIR)" != x; then \
e1d6a774 152 echo Installing desktop icons...; \
f7deaa1a 153 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps; \
154 $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)$(ICONDIR)/hicolor/16x16/apps/cups.png; \
155 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps; \
156 $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)$(ICONDIR)/hicolor/32x32/apps/cups.png; \
157 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps; \
158 $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)$(ICONDIR)/hicolor/64x64/apps/cups.png; \
159 $(INSTALL_DIR) -m 755 $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps; \
160 $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)$(ICONDIR)/hicolor/128x128/apps/cups.png; \
e1d6a774 161 fi
ef416fc2 162
163
164#
165# Install source and header files...
166#
167
168installsrc:
bd7854cb 169 gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
ef416fc2 170
171installhdrs:
172 (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
173 (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
174
175
757d2cad 176#
177# Uninstall object and target files...
178#
179
180uninstall:
181 for dir in $(DIRS); do\
182 echo Uninstalling in $$dir... ;\
183 (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\
184 done
185 echo Uninstalling cups-config script...
186 $(RM) $(BINDIR)/cups-config
187 -$(RMDIR) $(BINDIR)
188 echo Uninstalling startup script...
e1d6a774 189 if test "x$(INITDIR)" != x; then \
757d2cad 190 $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \
191 $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \
192 $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
193 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
194 $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
195 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
196 $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
197 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
198 $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
199 $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
200 fi
e1d6a774 201 if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \
757d2cad 202 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
203 $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \
204 $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
205 $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
206 $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
207 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
208 $(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
209 else \
210 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
211 fi \
212 $(RMDIR) $(BUILDROOT)$(INITDDIR); \
213 fi
e1d6a774 214 if test "x$(DBUSDIR)" != x; then \
757d2cad 215 echo Uninstalling cups.conf in $(DBUSDIR)...;\
216 $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \
217 $(RMDIR) $(BUILDROOT)$(DBUSDIR); \
218 fi
e1d6a774 219 $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd
220 $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop
221 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png
222 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png
223 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png
224 $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png
757d2cad 225
226
ef416fc2 227#
228# Run the test suite...
229#
230
d09495fa 231test: all
ef416fc2 232 echo Running CUPS test suite...
233 cd test; ./run-stp-tests.sh
234
235
d09495fa 236check: all
237 echo Running CUPS test suite with defaults...
238 cd test; ./run-stp-tests.sh 1 0 n
239
240
ef416fc2 241#
4744bd90 242# Make software distributions using EPM (http://www.easysw.com/epm/)...
ef416fc2 243#
244
d09495fa 245EPMFLAGS = -v --output-dir dist $(EPMARCH)
ef416fc2 246
b86bc4cf 247aix bsd deb depot inst pkg setld slackware swinstall tardist:
4744bd90 248 epm $(EPMFLAGS) -f $@ cups packaging/cups.list
ef416fc2 249
250epm:
d09495fa 251 epm $(EPMFLAGS) -s packaging/installer.gif cups packaging/cups.list
252
253osx:
254 epm $(EPMFLAGS) -f osx -s packaging/installer.tif cups packaging/cups.list
255
b86bc4cf 256rpm:
257 epm $(EPMFLAGS) -f rpm -s packaging/installer.gif cups packaging/cups.list
258
d09495fa 259.PHONEY: dist
260dist: all
261 $(RM) -r dist
262 $(MAKE) $(MFLAGS) epm
263 case `uname` in \
264 *BSD*) $(MAKE) $(MFLAGS) bsd;; \
265 Darwin*) $(MAKE) $(MFLAGS) osx;; \
266 IRIX*) $(MAKE) $(MFLAGS) tardist;; \
267 Linux*) $(MAKE) $(MFLAGS) rpm;; \
268 SunOS*) $(MAKE) $(MFLAGS) pkg;; \
269 esac
ef416fc2 270
bd7854cb 271
ef416fc2 272#
f7deaa1a 273# End of "$Id: Makefile 6332 2007-03-12 16:08:51Z mike $".
ef416fc2 274#