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