]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
503b54c9 | 2 | # Berkeley commands makefile for CUPS. |
ef416fc2 | 3 | # |
a621d151 | 4 | # Copyright 2007-2017 by Apple Inc. |
503b54c9 | 5 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 6 | # |
e3101897 | 7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more information. |
ef416fc2 | 8 | # |
9 | ||
10 | include ../Makedefs | |
11 | ||
5f64df29 | 12 | |
ef416fc2 | 13 | TARGETS = lpc lpq lpr lprm |
14 | OBJS = lpc.o lpq.o lpr.o lprm.o | |
15 | ||
16 | ||
17 | # | |
18 | # Make all targets... | |
19 | # | |
20 | ||
21 | all: $(TARGETS) | |
22 | ||
23 | ||
c9fc04c6 MS |
24 | # |
25 | # Make library targets... | |
26 | # | |
27 | ||
28 | libs: | |
29 | ||
30 | ||
5f64df29 MS |
31 | # |
32 | # Make unit tests... | |
33 | # | |
34 | ||
35 | unittests: | |
36 | ||
37 | ||
ef416fc2 | 38 | # |
39 | # Clean all object files... | |
40 | # | |
41 | ||
42 | clean: | |
43 | $(RM) $(OBJS) $(TARGETS) | |
44 | ||
45 | ||
46 | # | |
47 | # Update dependencies (without system header dependencies...) | |
48 | # | |
49 | ||
50 | depend: | |
12f89d24 | 51 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 52 | |
53 | ||
54 | # | |
55 | # Install all targets... | |
56 | # | |
57 | ||
50fe7201 MS |
58 | install: all install-data install-headers install-libs install-exec |
59 | ||
60 | ||
61 | # | |
62 | # Install data files... | |
63 | # | |
64 | ||
65 | install-data: | |
66 | ||
67 | ||
68 | # | |
69 | # Install programs... | |
70 | # | |
71 | ||
72 | install-exec: | |
e07d4801 | 73 | echo Installing Berkeley user printing commands in $(BINDIR)... |
bd7854cb | 74 | $(INSTALL_DIR) -m 755 $(BINDIR) |
ef416fc2 | 75 | $(INSTALL_BIN) lpq $(BINDIR) |
76 | $(INSTALL_BIN) lpr $(BINDIR) | |
77 | $(INSTALL_BIN) lprm $(BINDIR) | |
e07d4801 | 78 | echo Installing Berkeley admin printing commands in $(BINDIR)... |
bd7854cb | 79 | $(INSTALL_DIR) -m 755 $(SBINDIR) |
ef416fc2 | 80 | $(INSTALL_BIN) lpc $(SBINDIR) |
09a101d6 | 81 | if test "x$(SYMROOT)" != "x"; then \ |
82 | $(INSTALL_DIR) $(SYMROOT); \ | |
83 | for file in $(TARGETS); do \ | |
84 | cp $$file $(SYMROOT); \ | |
c1420c87 | 85 | dsymutil $(SYMROOT)/$$file; \ |
09a101d6 | 86 | done \ |
87 | fi | |
ef416fc2 | 88 | |
89 | ||
50fe7201 MS |
90 | # |
91 | # Install headers... | |
92 | # | |
93 | ||
94 | install-headers: | |
95 | ||
96 | ||
97 | # | |
98 | # Install libraries... | |
99 | # | |
100 | ||
101 | install-libs: | |
102 | ||
103 | ||
757d2cad | 104 | # |
105 | # Uninstall all targets... | |
106 | # | |
107 | ||
108 | uninstall: | |
109 | $(RM) $(BINDIR)/lpq | |
110 | $(RM) $(BINDIR)/lpr | |
111 | $(RM) $(BINDIR)/lprm | |
112 | $(RM) $(SBINDIR)/lpc | |
113 | -$(RMDIR) $(SBINDIR) | |
114 | -$(RMDIR) $(BINDIR) | |
115 | ||
116 | ||
ef416fc2 | 117 | # |
118 | # lpc | |
119 | # | |
120 | ||
121 | lpc: lpc.o ../cups/$(LIBCUPS) | |
122 | echo Linking $@... | |
a621d151 | 123 | $(LD_CC) $(LDFLAGS) -o lpc lpc.o $(LIBS) |
ef416fc2 | 124 | |
125 | ||
126 | # | |
127 | # lpq | |
128 | # | |
129 | ||
130 | lpq: lpq.o ../cups/$(LIBCUPS) | |
131 | echo Linking $@... | |
a621d151 | 132 | $(LD_CC) $(LDFLAGS) -o lpq lpq.o $(LIBS) |
ef416fc2 | 133 | |
134 | ||
135 | # | |
136 | # lpr | |
137 | # | |
138 | ||
139 | lpr: lpr.o ../cups/$(LIBCUPS) | |
140 | echo Linking $@... | |
a621d151 | 141 | $(LD_CC) $(LDFLAGS) -o lpr lpr.o $(LIBS) |
ef416fc2 | 142 | |
143 | ||
144 | # | |
145 | # lprm | |
146 | # | |
147 | ||
148 | lprm: lprm.o ../cups/$(LIBCUPS) | |
149 | echo Linking $@... | |
a621d151 | 150 | $(LD_CC) $(LDFLAGS) -o lprm lprm.o $(LIBS) |
ef416fc2 | 151 | |
152 | ||
153 | # | |
154 | # Dependencies... | |
155 | # | |
156 | ||
157 | include Dependencies |