]> git.ipfire.org Git - thirdparty/cups.git/blob - systemv/Makefile
Merge changes from CUPS 1.4svn-r7874.
[thirdparty/cups.git] / systemv / Makefile
1 #
2 # "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $"
3 #
4 # System V commands makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007-2008 by Apple Inc.
7 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
8 #
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/".
14 #
15
16 include ../Makedefs
17
18 TARGETS = accept cancel cupsaddsmb cupsctl cupstestdsc cupstestppd \
19 lp lpadmin lpinfo lpmove lpoptions lppasswd lpstat
20 OBJS = accept.o cancel.o cupsaddsmb.o cupsctl.o cupstestdsc.o \
21 cupstestppd.o lp.o lpadmin.o lpinfo.o lpmove.o lpoptions.o \
22 lppasswd.o lpstat.o
23
24
25 #
26 # Make all targets...
27 #
28
29 all: $(TARGETS)
30
31
32 #
33 # Make library targets...
34 #
35
36 libs:
37
38
39 #
40 # Make unit tests...
41 #
42
43 unittests:
44
45
46 #
47 # Clean all object files...
48 #
49
50 clean:
51 $(RM) $(OBJS) $(TARGETS) cupsdisable cupsenable reject
52
53
54 #
55 # Update dependencies (without system header dependencies...)
56 #
57
58 depend:
59 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
60
61
62 #
63 # Install all targets...
64 #
65
66 install: all install-data install-headers install-libs install-exec
67
68
69 #
70 # Install data files...
71 #
72
73 install-data:
74
75
76 #
77 # Install programs...
78 #
79
80 install-exec:
81 $(INSTALL_DIR) -m 755 $(SBINDIR)
82 $(INSTALL_BIN) accept $(SBINDIR)
83 $(RM) $(SBINDIR)/reject
84 $(LN) accept $(SBINDIR)/reject
85 $(INSTALL_BIN) cupsaddsmb $(SBINDIR)
86 $(INSTALL_BIN) cupsctl $(SBINDIR)
87 $(INSTALL_BIN) lpadmin $(SBINDIR)
88 $(INSTALL_BIN) lpinfo $(SBINDIR)
89 $(INSTALL_BIN) lpmove $(SBINDIR)
90 $(INSTALL_DIR) -m 755 $(BINDIR)
91 $(INSTALL_BIN) cancel $(BINDIR)
92 $(INSTALL_BIN) cupstestdsc $(BINDIR)
93 $(INSTALL_BIN) cupstestppd $(BINDIR)
94 $(RM) $(SBINDIR)/cupsdisable
95 $(LN) accept $(SBINDIR)/cupsdisable
96 $(RM) $(SBINDIR)/cupsenable
97 $(LN) accept $(SBINDIR)/cupsenable
98 $(INSTALL_BIN) lp $(BINDIR)
99 $(INSTALL_BIN) lpoptions $(BINDIR)
100 $(INSTALL_BIN) lpstat $(BINDIR)
101 $(INSTALL_BIN) lppasswd $(BINDIR)
102 if test "x$(SYMROOT)" != "x"; then \
103 $(INSTALL_DIR) $(SYMROOT); \
104 for file in $(TARGETS); do \
105 cp $$file $(SYMROOT); \
106 done \
107 fi
108
109
110 #
111 # Install headers...
112 #
113
114 install-headers:
115
116
117 #
118 # Install libraries...
119 #
120
121 install-libs:
122
123
124 #
125 # Uninstall all targets...
126 #
127
128 uninstall:
129 $(RM) $(BINDIR)/cancel
130 $(RM) $(BINDIR)/cupstestdsc
131 $(RM) $(BINDIR)/cupstestppd
132 $(RM) $(BINDIR)/lp
133 $(RM) $(BINDIR)/lpoptions
134 $(RM) $(BINDIR)/lppasswd
135 $(RM) $(BINDIR)/lpstat
136 -$(RMDIR) $(BINDIR)
137 $(RM) $(SBINDIR)/accept
138 $(RM) $(SBINDIR)/cupsaddsmb
139 $(RM) $(SBINDIR)/cupsdisable
140 $(RM) $(SBINDIR)/cupsenable
141 $(RM) $(SBINDIR)/lpadmin
142 $(RM) $(SBINDIR)/lpinfo
143 $(RM) $(SBINDIR)/lpmove
144 $(RM) $(SBINDIR)/reject
145 -$(RMDIR) $(SBINDIR)
146
147
148 #
149 # accept
150 #
151
152 accept: accept.o ../cups/$(LIBCUPS)
153 echo Linking $@...
154 $(CC) $(LDFLAGS) -o accept accept.o $(LIBS)
155 $(RM) reject cupsenable cupsdisable
156 $(LN) accept reject
157 $(LN) accept cupsenable
158 $(LN) accept cupsdisable
159
160
161 #
162 # cancel
163 #
164
165 cancel: cancel.o ../cups/$(LIBCUPS)
166 echo Linking $@...
167 $(CC) $(LDFLAGS) -o cancel cancel.o $(LIBS)
168
169
170 #
171 # cupsaddsmb
172 #
173
174 cupsaddsmb: cupsaddsmb.o ../cups/$(LIBCUPS)
175 echo Linking $@...
176 $(CC) $(LDFLAGS) -o cupsaddsmb cupsaddsmb.o $(LIBS)
177
178
179 #
180 # cupsctl
181 #
182
183 cupsctl: cupsctl.o ../cups/$(LIBCUPS)
184 echo Linking $@...
185 $(CC) $(LDFLAGS) -o cupsctl cupsctl.o $(LIBS)
186
187
188 #
189 # cupstestdsc
190 #
191
192 cupstestdsc: cupstestdsc.o ../cups/$(LIBCUPS)
193 echo Linking $@...
194 $(CC) $(LDFLAGS) -o $@ cupstestdsc.o $(LIBS)
195
196
197 #
198 # cupstestppd
199 #
200
201 cupstestppd: cupstestppd.o ../cups/$(LIBCUPS) ../filter/$(LIBCUPSIMAGE)
202 echo Linking $@...
203 $(CC) $(LDFLAGS) -o $@ cupstestppd.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
204
205 cupstestppd-static: cupstestppd.o ../cups/libcups.a ../filter/libcupsimage.a
206 echo Linking $@...
207 $(CC) $(LDFLAGS) -o $@ cupstestppd.o ../filter/libcupsimage.a \
208 ../cups/libcups.a $(IMGLIBS) $(LIBGSSAPI) $(LIBS) $(LIBZ)
209
210
211 #
212 # lp
213 #
214
215 lp: lp.o ../cups/$(LIBCUPS)
216 echo Linking $@...
217 $(CC) $(LDFLAGS) -o lp lp.o $(LIBS)
218
219
220 #
221 # lpadmin
222 #
223
224 lpadmin: lpadmin.o ../cups/$(LIBCUPS)
225 echo Linking $@...
226 $(CC) $(LDFLAGS) -o lpadmin lpadmin.o $(LIBZ) $(LIBS)
227
228
229 #
230 # lpinfo
231 #
232
233 lpinfo: lpinfo.o ../cups/$(LIBCUPS)
234 echo Linking $@...
235 $(CC) $(LDFLAGS) -o lpinfo lpinfo.o $(LIBS)
236
237
238 #
239 # lpmove
240 #
241
242 lpmove: lpmove.o ../cups/$(LIBCUPS)
243 echo Linking $@...
244 $(CC) $(LDFLAGS) -o lpmove lpmove.o $(LIBS)
245
246
247 #
248 # lpoptions
249 #
250
251 lpoptions: lpoptions.o ../cups/$(LIBCUPS)
252 echo Linking $@...
253 $(CC) $(LDFLAGS) -o lpoptions lpoptions.o $(LIBZ) $(LIBS)
254
255
256 #
257 # lppasswd
258 #
259
260 lppasswd: lppasswd.o ../cups/$(LIBCUPS)
261 echo Linking $@...
262 $(CC) $(LDFLAGS) -o lppasswd lppasswd.o $(LIBZ) $(LIBS)
263
264
265 #
266 # lpstat
267 #
268
269 lpstat: lpstat.o ../cups/$(LIBCUPS)
270 echo Linking $@...
271 $(CC) $(LDFLAGS) -o lpstat lpstat.o $(LIBS)
272
273
274 #
275 # Dependencies...
276 #
277
278 include Dependencies
279
280
281 #
282 # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $".
283 #