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