]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # "$Id: Makefile 5314 2006-03-20 19:06:50Z mike $" | |
3 | # | |
4 | # Top-level Makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
6 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. | |
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 | ||
25 | include Makedefs | |
26 | ||
27 | # | |
28 | # Directories to make... | |
29 | # | |
30 | ||
31 | DIRS = cups backend berkeley cgi-bin filter locale man monitor \ | |
32 | notifier $(PDFTOPS) scheduler systemv test \ | |
33 | $(PHPDIR) \ | |
34 | conf data doc fonts ppd templates | |
35 | ||
36 | ||
37 | # | |
38 | # Make all targets... | |
39 | # | |
40 | ||
41 | all: | |
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 | ||
48 | ||
49 | # | |
50 | # Remove object and target files... | |
51 | # | |
52 | ||
53 | clean: | |
54 | for dir in $(DIRS); do\ | |
55 | echo Cleaning in $$dir... ;\ | |
56 | (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\ | |
57 | done | |
58 | ||
59 | ||
60 | # | |
61 | # Make dependencies | |
62 | # | |
63 | ||
64 | depend: | |
65 | for dir in $(DIRS); do\ | |
66 | echo Making dependencies in $$dir... ;\ | |
67 | (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\ | |
68 | done | |
69 | ||
70 | ||
71 | # | |
72 | # Install object and target files... | |
73 | # | |
74 | ||
75 | install: installhdrs | |
76 | for dir in $(DIRS); do\ | |
77 | echo Installing in $$dir... ;\ | |
78 | (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\ | |
79 | done | |
80 | echo Installing cups-config script... | |
81 | $(INSTALL_DIR) -m 755 $(BINDIR) | |
82 | $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config | |
83 | echo Installing startup script... | |
84 | if test "x$(INITDIR)" != x; then \ | |
85 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \ | |
86 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \ | |
87 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc0.d; \ | |
88 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \ | |
89 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc2.d; \ | |
90 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \ | |
91 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc3.d; \ | |
92 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \ | |
93 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/rc5.d; \ | |
94 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \ | |
95 | fi | |
96 | if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \ | |
97 | $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \ | |
98 | if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \ | |
99 | $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \ | |
100 | $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \ | |
101 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \ | |
102 | $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \ | |
103 | elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \ | |
104 | $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \ | |
105 | else \ | |
106 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \ | |
107 | fi \ | |
108 | fi | |
109 | if test "x$(DBUSDIR)" != x; then \ | |
110 | echo Installing cups.conf in $(DBUSDIR)...;\ | |
111 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(DBUSDIR); \ | |
112 | $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \ | |
113 | fi | |
114 | if test "x$(XINETD)" != x; then \ | |
115 | echo Installing xinetd configuration file for cups-lpd...; \ | |
116 | $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ | |
117 | $(INSTALL_DATA) init/cups-lpd $(BUILDROOT)$(XINETD)/cups-lpd; \ | |
118 | fi | |
119 | if test -d /usr/share/applications; then \ | |
120 | echo Installing desktop icons...; \ | |
121 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/applications; \ | |
122 | $(INSTALL_DATA) desktop/cups.desktop $(BUILDROOT)/usr/share/applications; \ | |
123 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps; \ | |
124 | $(INSTALL_DATA) desktop/cups-16.png $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png; \ | |
125 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps; \ | |
126 | $(INSTALL_DATA) desktop/cups-32.png $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png; \ | |
127 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps; \ | |
128 | $(INSTALL_DATA) desktop/cups-64.png $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png; \ | |
129 | $(INSTALL_DIR) -m 755 $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps; \ | |
130 | $(INSTALL_DATA) desktop/cups-128.png $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png; \ | |
131 | fi | |
132 | ||
133 | ||
134 | # | |
135 | # Install source and header files... | |
136 | # | |
137 | ||
138 | installsrc: | |
139 | gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf - | |
140 | ||
141 | installhdrs: | |
142 | (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\ | |
143 | (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1; | |
144 | ||
145 | ||
146 | # | |
147 | # Uninstall object and target files... | |
148 | # | |
149 | ||
150 | uninstall: | |
151 | for dir in $(DIRS); do\ | |
152 | echo Uninstalling in $$dir... ;\ | |
153 | (cd $$dir; $(MAKE) $(MFLAGS) uninstall) || exit 1;\ | |
154 | done | |
155 | echo Uninstalling cups-config script... | |
156 | $(RM) $(BINDIR)/cups-config | |
157 | -$(RMDIR) $(BINDIR) | |
158 | echo Uninstalling startup script... | |
159 | if test "x$(INITDIR)" != x; then \ | |
160 | $(RM) $(BUILDROOT)$(INITDIR)/init.d/cups; \ | |
161 | $(RMDIR) $(BUILDROOT)$(INITDIR)/init.d; \ | |
162 | $(RM) $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \ | |
163 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc0.d; \ | |
164 | $(RM) $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \ | |
165 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc2.d; \ | |
166 | $(RM) $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \ | |
167 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc3.d; \ | |
168 | $(RM) $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \ | |
169 | $(RMDIR) $(BUILDROOT)$(INITDIR)/rc5.d; \ | |
170 | fi | |
171 | if test "x$(INITDIR)" = x -a "x$(INITDDIR)" != x; then \ | |
172 | if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \ | |
173 | $(RM) $(BUILDROOT)$(INITDDIR)/PrintingServices; \ | |
174 | $(RM) $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \ | |
175 | $(RM) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \ | |
176 | $(RMDIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \ | |
177 | elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \ | |
178 | $(RM) $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \ | |
179 | else \ | |
180 | $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \ | |
181 | fi \ | |
182 | $(RMDIR) $(BUILDROOT)$(INITDDIR); \ | |
183 | fi | |
184 | if test "x$(DBUSDIR)" != x; then \ | |
185 | echo Uninstalling cups.conf in $(DBUSDIR)...;\ | |
186 | $(RM) $(BUILDROOT)$(DBUSDIR)/cups.conf; \ | |
187 | $(RMDIR) $(BUILDROOT)$(DBUSDIR); \ | |
188 | fi | |
189 | $(RM) $(BUILDROOT)/etc/xinetd.d/cups-lpd | |
190 | $(RM) $(BUILDROOT)/usr/share/applications/cups.desktop | |
191 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/16x16/apps/cups.png | |
192 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/32x32/apps/cups.png | |
193 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/64x64/apps/cups.png | |
194 | $(RM) $(BUILDROOT)/usr/share/icons/hicolor/128x128/apps/cups.png | |
195 | ||
196 | ||
197 | # | |
198 | # Run the test suite... | |
199 | # | |
200 | ||
201 | check test: all | |
202 | echo Running CUPS test suite... | |
203 | cd test; ./run-stp-tests.sh | |
204 | ||
205 | ||
206 | # | |
207 | # Make software distributions using EPM (http://www.easysw.com/epm/)... | |
208 | # | |
209 | ||
210 | EPMFLAGS = -v | |
211 | ||
212 | aix bsd deb depot inst osx pkg rpm setld slackware swinstall tardist: | |
213 | epm $(EPMFLAGS) -f $@ cups packaging/cups.list | |
214 | ||
215 | epm: | |
216 | epm $(EPMFLAGS) cups packaging/cups.list | |
217 | ||
218 | ||
219 | # | |
220 | # End of "$Id: Makefile 5314 2006-03-20 19:06:50Z mike $". | |
221 | # |