]>
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 | # |
503b54c9 MS |
7 | # These coded instructions, statements, and computer programs are the |
8 | # property of Apple Inc. and are protected by Federal copyright | |
9 | # law. Distribution and use rights are outlined in the file "LICENSE.txt" | |
10 | # which should have been included with this file. If this file is | |
57b7b66b | 11 | # missing or damaged, see the license at "http://www.cups.org/". |
ef416fc2 | 12 | # |
13 | ||
14 | include ../Makedefs | |
15 | ||
5f64df29 | 16 | |
ef416fc2 | 17 | TARGETS = lpc lpq lpr lprm |
18 | OBJS = lpc.o lpq.o lpr.o lprm.o | |
19 | ||
20 | ||
21 | # | |
22 | # Make all targets... | |
23 | # | |
24 | ||
25 | all: $(TARGETS) | |
26 | ||
27 | ||
c9fc04c6 MS |
28 | # |
29 | # Make library targets... | |
30 | # | |
31 | ||
32 | libs: | |
33 | ||
34 | ||
5f64df29 MS |
35 | # |
36 | # Make unit tests... | |
37 | # | |
38 | ||
39 | unittests: | |
40 | ||
41 | ||
ef416fc2 | 42 | # |
43 | # Clean all object files... | |
44 | # | |
45 | ||
46 | clean: | |
47 | $(RM) $(OBJS) $(TARGETS) | |
48 | ||
49 | ||
50 | # | |
51 | # Update dependencies (without system header dependencies...) | |
52 | # | |
53 | ||
54 | depend: | |
12f89d24 | 55 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 56 | |
57 | ||
58 | # | |
59 | # Install all targets... | |
60 | # | |
61 | ||
50fe7201 MS |
62 | install: all install-data install-headers install-libs install-exec |
63 | ||
64 | ||
65 | # | |
66 | # Install data files... | |
67 | # | |
68 | ||
69 | install-data: | |
70 | ||
71 | ||
72 | # | |
73 | # Install programs... | |
74 | # | |
75 | ||
76 | install-exec: | |
e07d4801 | 77 | echo Installing Berkeley user printing commands in $(BINDIR)... |
bd7854cb | 78 | $(INSTALL_DIR) -m 755 $(BINDIR) |
ef416fc2 | 79 | $(INSTALL_BIN) lpq $(BINDIR) |
80 | $(INSTALL_BIN) lpr $(BINDIR) | |
81 | $(INSTALL_BIN) lprm $(BINDIR) | |
e07d4801 | 82 | echo Installing Berkeley admin printing commands in $(BINDIR)... |
bd7854cb | 83 | $(INSTALL_DIR) -m 755 $(SBINDIR) |
ef416fc2 | 84 | $(INSTALL_BIN) lpc $(SBINDIR) |
09a101d6 | 85 | if test "x$(SYMROOT)" != "x"; then \ |
86 | $(INSTALL_DIR) $(SYMROOT); \ | |
87 | for file in $(TARGETS); do \ | |
88 | cp $$file $(SYMROOT); \ | |
c1420c87 | 89 | dsymutil $(SYMROOT)/$$file; \ |
09a101d6 | 90 | done \ |
91 | fi | |
ef416fc2 | 92 | |
93 | ||
50fe7201 MS |
94 | # |
95 | # Install headers... | |
96 | # | |
97 | ||
98 | install-headers: | |
99 | ||
100 | ||
101 | # | |
102 | # Install libraries... | |
103 | # | |
104 | ||
105 | install-libs: | |
106 | ||
107 | ||
757d2cad | 108 | # |
109 | # Uninstall all targets... | |
110 | # | |
111 | ||
112 | uninstall: | |
113 | $(RM) $(BINDIR)/lpq | |
114 | $(RM) $(BINDIR)/lpr | |
115 | $(RM) $(BINDIR)/lprm | |
116 | $(RM) $(SBINDIR)/lpc | |
117 | -$(RMDIR) $(SBINDIR) | |
118 | -$(RMDIR) $(BINDIR) | |
119 | ||
120 | ||
ef416fc2 | 121 | # |
122 | # lpc | |
123 | # | |
124 | ||
125 | lpc: lpc.o ../cups/$(LIBCUPS) | |
126 | echo Linking $@... | |
a621d151 | 127 | $(LD_CC) $(LDFLAGS) -o lpc lpc.o $(LIBS) |
1c37b4f8 | 128 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 129 | |
130 | ||
131 | # | |
132 | # lpq | |
133 | # | |
134 | ||
135 | lpq: lpq.o ../cups/$(LIBCUPS) | |
136 | echo Linking $@... | |
a621d151 | 137 | $(LD_CC) $(LDFLAGS) -o lpq lpq.o $(LIBS) |
1c37b4f8 | 138 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 139 | |
140 | ||
141 | # | |
142 | # lpr | |
143 | # | |
144 | ||
145 | lpr: lpr.o ../cups/$(LIBCUPS) | |
146 | echo Linking $@... | |
a621d151 | 147 | $(LD_CC) $(LDFLAGS) -o lpr lpr.o $(LIBS) |
1c37b4f8 | 148 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 149 | |
150 | ||
151 | # | |
152 | # lprm | |
153 | # | |
154 | ||
155 | lprm: lprm.o ../cups/$(LIBCUPS) | |
156 | echo Linking $@... | |
a621d151 | 157 | $(LD_CC) $(LDFLAGS) -o lprm lprm.o $(LIBS) |
1c37b4f8 | 158 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
ef416fc2 | 159 | |
160 | ||
161 | # | |
162 | # Dependencies... | |
163 | # | |
164 | ||
165 | include Dependencies |