]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
bc44d920 | 2 | # "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $" |
ef416fc2 | 3 | # |
4 | # CGI makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
bc44d920 | 6 | # Copyright 2007 by Apple Inc. |
bd7854cb | 7 | # Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 8 | # |
9 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 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/". | |
ef416fc2 | 14 | # |
15 | ||
16 | include ../Makedefs | |
17 | ||
18 | CGIS = admin.cgi classes.cgi help.cgi jobs.cgi printers.cgi | |
bd7854cb | 19 | TARGETS = libcgi.a $(CGIS) testcgi testhi testtemplate |
ef416fc2 | 20 | LIBOBJS = help-index.o html.o ipp-var.o search.o template.o var.o |
21 | OBJS = $(LIBOBJS) admin.o classes.o help.o \ | |
bd7854cb | 22 | jobs.o printers.o testcgi.o testhi.o testtemplate.o |
ef416fc2 | 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) | |
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 | |
bd7854cb | 53 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/cgi-bin |
ef416fc2 | 54 | for file in $(CGIS); do \ |
55 | $(INSTALL_BIN) $$file $(SERVERBIN)/cgi-bin; \ | |
56 | done | |
09a101d6 | 57 | if test "x$(SYMROOT)" != "x"; then \ |
58 | $(INSTALL_DIR) $(SYMROOT); \ | |
59 | for file in $(TARGETS); do \ | |
60 | cp $$file $(SYMROOT); \ | |
61 | done \ | |
62 | fi | |
ef416fc2 | 63 | |
64 | ||
757d2cad | 65 | # |
66 | # Uninstall all targets... | |
67 | # | |
68 | ||
69 | uninstall: | |
70 | for file in $(CGIS); do \ | |
71 | $(RM) $(SERVERBIN)/cgi-bin/$$file; \ | |
72 | done | |
73 | -$(RMDIR) $(SERVERBIN)/cgi-bin | |
74 | ||
75 | ||
ef416fc2 | 76 | # |
77 | # libcgi.a | |
78 | # | |
79 | ||
80 | libcgi.a: $(LIBOBJS) | |
81 | echo Archiving $@... | |
82 | $(RM) $@ | |
83 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
84 | $(RANLIB) $@ | |
85 | ||
86 | ||
87 | # | |
88 | # admin.cgi | |
89 | # | |
90 | ||
91 | admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
92 | echo Linking $@... | |
93 | $(CC) $(LDFLAGS) -o $@ admin.o libcgi.a $(LIBS) | |
94 | ||
95 | ||
96 | # | |
97 | # classes.cgi | |
98 | # | |
99 | ||
100 | classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
101 | echo Linking $@... | |
102 | $(CC) $(LDFLAGS) -o $@ classes.o libcgi.a $(LIBS) | |
103 | ||
104 | ||
105 | # | |
106 | # help.cgi | |
107 | # | |
108 | ||
109 | help.cgi: help.o ../Makedefs libcgi.a | |
110 | echo Linking $@... | |
111 | $(CC) $(LDFLAGS) -o $@ help.o libcgi.a $(LIBS) | |
112 | ||
113 | ||
114 | # | |
115 | # jobs.cgi | |
116 | # | |
117 | ||
118 | jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
119 | echo Linking $@... | |
120 | $(CC) $(LDFLAGS) -o $@ jobs.o libcgi.a $(LIBS) | |
121 | ||
122 | ||
123 | # | |
124 | # printers.cgi | |
125 | # | |
126 | ||
127 | printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
128 | echo Linking $@... | |
129 | $(CC) $(LDFLAGS) -o $@ printers.o libcgi.a $(LIBS) | |
130 | ||
131 | ||
132 | # | |
133 | # testcgi | |
134 | # | |
135 | ||
ecdc0628 | 136 | testcgi: testcgi.o ../Makedefs libcgi.a ../cups/libcups.a |
ef416fc2 | 137 | echo Linking $@... |
ecdc0628 | 138 | $(CC) $(LDFLAGS) -o $@ testcgi.o libcgi.a ../cups/libcups.a \ |
f7deaa1a | 139 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) |
ef416fc2 | 140 | |
141 | ||
142 | # | |
143 | # testhi | |
144 | # | |
145 | ||
ecdc0628 | 146 | testhi: testhi.o ../Makedefs libcgi.a ../cups/libcups.a |
ef416fc2 | 147 | echo Linking $@... |
ecdc0628 | 148 | $(CC) $(LDFLAGS) -o $@ testhi.o libcgi.a ../cups/libcups.a \ |
f7deaa1a | 149 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) |
ef416fc2 | 150 | |
151 | ||
bd7854cb | 152 | # |
153 | # testtemplate | |
154 | # | |
155 | ||
ecdc0628 | 156 | testtemplate: testtemplate.o ../Makedefs libcgi.a ../cups/libcups.a |
bd7854cb | 157 | echo Linking $@... |
ecdc0628 | 158 | $(CC) $(LDFLAGS) -o $@ testtemplate.o libcgi.a ../cups/libcups.a \ |
f7deaa1a | 159 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI) |
bd7854cb | 160 | |
161 | ||
ef416fc2 | 162 | # |
163 | # Dependencies... | |
164 | # | |
165 | ||
166 | include Dependencies | |
167 | ||
168 | ||
169 | # | |
bc44d920 | 170 | # End of "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $". |
ef416fc2 | 171 | # |