Load cups into easysw/current.
[thirdparty/cups.git] / Makefile
CommitLineData
ef416fc2 1#
bd7854cb 2# "$Id: Makefile 5136 2006-02-19 18:46:46Z mike $"
ef416fc2 3#
4# Top-level Makefile for the Common UNIX Printing System (CUPS).
5#
fa73b229 6# Copyright 1997-2006 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 \
32 notifier pdftops scheduler systemv test
33
ef416fc2 34
35#
36# Make all targets...
37#
38
39all:
40 chmod +x cups-config
41 for dir in $(DIRS); do\
42 echo Making all in $$dir... ;\
43 (cd $$dir ; $(MAKE) $(MFLAGS)) || exit 1;\
44 done
45
bd7854cb 46
ef416fc2 47#
48# Remove object and target files...
49#
50
51clean:
52 for dir in $(DIRS); do\
53 echo Cleaning in $$dir... ;\
54 (cd $$dir; $(MAKE) $(MFLAGS) clean) || exit 1;\
55 done
56
bd7854cb 57
ef416fc2 58#
59# Make dependencies
60#
61
62depend:
63 for dir in $(DIRS); do\
64 echo Making dependencies in $$dir... ;\
65 (cd $$dir; $(MAKE) $(MFLAGS) depend) || exit 1;\
66 done
67
68
69#
70# Install object and target files...
71#
72
73install: installhdrs
74 for dir in $(DIRS); do\
75 echo Installing in $$dir... ;\
76 (cd $$dir; $(MAKE) $(MFLAGS) install) || exit 1;\
77 done
78 echo Installing in conf...
79 (cd conf; $(MAKE) $(MFLAGS) install)
80 echo Installing in data...
81 (cd data; $(MAKE) $(MFLAGS) install)
82 echo Installing in doc...
83 (cd doc; $(MAKE) $(MFLAGS) install)
84 echo Installing in fonts...
85 (cd fonts; $(MAKE) $(MFLAGS) install)
ef416fc2 86 echo Installing in ppd...
87 (cd ppd; $(MAKE) $(MFLAGS) install)
88 echo Installing in templates...
89 (cd templates; $(MAKE) $(MFLAGS) install)
90 echo Installing cups-config script...
91 $(INSTALL_DIR) $(BINDIR)
92 $(INSTALL_SCRIPT) cups-config $(BINDIR)/cups-config
93 echo Installing startup script...
94 if test "x$(INITDIR)" != "x"; then \
95 $(INSTALL_DIR) $(BUILDROOT)$(INITDIR)/init.d; \
fa73b229 96 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/init.d/cups; \
ef416fc2 97 $(INSTALL_DIR) $(BUILDROOT)$(INITDIR)/rc0.d; \
fa73b229 98 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc0.d/K00cups; \
ef416fc2 99 $(INSTALL_DIR) $(BUILDROOT)$(INITDIR)/rc2.d; \
fa73b229 100 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc2.d/S99cups; \
ef416fc2 101 $(INSTALL_DIR) $(BUILDROOT)$(INITDIR)/rc3.d; \
fa73b229 102 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc3.d/S99cups; \
ef416fc2 103 $(INSTALL_DIR) $(BUILDROOT)$(INITDIR)/rc5.d; \
fa73b229 104 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDIR)/rc5.d/S99cups; \
ef416fc2 105 fi
106 if test "x$(INITDIR)" = "x" -a "x$(INITDDIR)" != "x"; then \
107 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR); \
108 if test "$(INITDDIR)" = "/System/Library/StartupItems/PrintingServices"; then \
e00b005a 109 $(INSTALL_SCRIPT) init/PrintingServices $(BUILDROOT)$(INITDDIR)/PrintingServices; \
110 $(INSTALL_DATA) init/StartupParameters.plist $(BUILDROOT)$(INITDDIR)/StartupParameters.plist; \
ef416fc2 111 $(INSTALL_DIR) $(BUILDROOT)$(INITDDIR)/Resources/English.lproj; \
e00b005a 112 $(INSTALL_DATA) init/Localizable.strings $(BUILDROOT)$(INITDDIR)/Resources/English.lproj/Localizable.strings; \
a4d04587 113 elif test "$(INITDDIR)" = "/System/Library/LaunchDaemons"; then \
e00b005a 114 $(INSTALL_DATA) init/org.cups.cupsd.plist $(BUILDROOT)$(DEFAULT_LAUNCHD_CONF); \
ef416fc2 115 else \
fa73b229 116 $(INSTALL_SCRIPT) init/cups.sh $(BUILDROOT)$(INITDDIR)/cups; \
ef416fc2 117 fi \
118 fi
bd7854cb 119 if test "x$(DBUSDIR)" != "x"; then \
120 $(INSTALL_DIR) $(BUILDROOT)$(DBUSDIR); \
121 $(INSTALL_DATA) packaging/cups-dbus.conf $(BUILDROOT)$(DBUSDIR)/cups.conf; \
122 fi
ef416fc2 123
124
125#
126# Install source and header files...
127#
128
129installsrc:
bd7854cb 130 gnutar --dereference --exclude=.svn -cf - . | gnutar -C $(SRCROOT) -xf -
ef416fc2 131
132installhdrs:
133 (cd cups ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;\
134 (cd filter ; $(MAKE) $(MFLAGS) installhdrs) || exit 1;
135
136
137#
138# Run the test suite...
139#
140
141check test: all
142 echo Running CUPS test suite...
143 cd test; ./run-stp-tests.sh
144
145
146#
147# Make software distributions using EPM (http://www.easysw.com/epm)...
148#
149
150EPMFLAGS = -v
151
152aix:
153 epm $(EPMFLAGS) -f aix cups packaging/cups.list
154
155bsd:
156 epm $(EPMFLAGS) -f bsd cups packaging/cups.list
157
158epm:
159 epm $(EPMFLAGS) cups packaging/cups.list
160
161rpm:
162 epm $(EPMFLAGS) -f rpm cups packaging/cups.list
163
164deb:
165 epm $(EPMFLAGS) -f deb cups packaging/cups.list
166
167depot:
168 epm $(EPMFLAGS) -f depot cups packaging/cups.list
169
170pkg:
171 epm $(EPMFLAGS) -f pkg cups packaging/cups.list
172
173tardist:
174 epm $(EPMFLAGS) -f tardist cups packaging/cups.list
175
bd7854cb 176
ef416fc2 177#
bd7854cb 178# End of "$Id: Makefile 5136 2006-02-19 18:46:46Z mike $".
ef416fc2 179#