]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
757d2cad | 2 | # "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $" |
ef416fc2 | 3 | # |
4 | # CGI makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
bd7854cb | 6 | # Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 7 | # |
8 | # These coded instructions, statements, and computer programs are the | |
9 | # property of Easy Software Products and are protected by Federal | |
10 | # copyright law. Distribution and use rights are outlined in the file | |
11 | # "LICENSE.txt" which should have been included with this file. If this | |
12 | # file is missing or damaged please contact Easy Software Products | |
13 | # at: | |
14 | # | |
15 | # Attn: CUPS Licensing Information | |
16 | # Easy Software Products | |
17 | # 44141 Airport View Drive, Suite 204 | |
18 | # Hollywood, Maryland 20636 USA | |
19 | # | |
20 | # Voice: (301) 373-9600 | |
21 | # EMail: cups-info@cups.org | |
22 | # WWW: http://www.cups.org | |
23 | # | |
24 | ||
25 | include ../Makedefs | |
26 | ||
27 | CGIS = admin.cgi classes.cgi help.cgi jobs.cgi printers.cgi | |
bd7854cb | 28 | TARGETS = libcgi.a $(CGIS) testcgi testhi testtemplate |
ef416fc2 | 29 | LIBOBJS = help-index.o html.o ipp-var.o search.o template.o var.o |
30 | OBJS = $(LIBOBJS) admin.o classes.o help.o \ | |
bd7854cb | 31 | jobs.o printers.o testcgi.o testhi.o testtemplate.o |
ef416fc2 | 32 | |
33 | ||
34 | # | |
35 | # Make all targets... | |
36 | # | |
37 | ||
38 | all: $(TARGETS) | |
39 | ||
40 | ||
41 | # | |
42 | # Clean all object files... | |
43 | # | |
44 | ||
45 | clean: | |
46 | $(RM) $(OBJS) $(TARGETS) | |
47 | ||
48 | ||
49 | # | |
50 | # Update dependencies (without system header dependencies...) | |
51 | # | |
52 | ||
53 | depend: | |
54 | makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1 | |
55 | ||
56 | ||
57 | # | |
58 | # Install all targets... | |
59 | # | |
60 | ||
61 | install: all | |
bd7854cb | 62 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/cgi-bin |
ef416fc2 | 63 | for file in $(CGIS); do \ |
64 | $(INSTALL_BIN) $$file $(SERVERBIN)/cgi-bin; \ | |
65 | done | |
66 | ||
67 | ||
757d2cad | 68 | # |
69 | # Uninstall all targets... | |
70 | # | |
71 | ||
72 | uninstall: | |
73 | for file in $(CGIS); do \ | |
74 | $(RM) $(SERVERBIN)/cgi-bin/$$file; \ | |
75 | done | |
76 | -$(RMDIR) $(SERVERBIN)/cgi-bin | |
77 | ||
78 | ||
ef416fc2 | 79 | # |
80 | # libcgi.a | |
81 | # | |
82 | ||
83 | libcgi.a: $(LIBOBJS) | |
84 | echo Archiving $@... | |
85 | $(RM) $@ | |
86 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
87 | $(RANLIB) $@ | |
88 | ||
89 | ||
90 | # | |
91 | # admin.cgi | |
92 | # | |
93 | ||
94 | admin.cgi: admin.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
95 | echo Linking $@... | |
96 | $(CC) $(LDFLAGS) -o $@ admin.o libcgi.a $(LIBS) | |
97 | ||
98 | ||
99 | # | |
100 | # classes.cgi | |
101 | # | |
102 | ||
103 | classes.cgi: classes.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
104 | echo Linking $@... | |
105 | $(CC) $(LDFLAGS) -o $@ classes.o libcgi.a $(LIBS) | |
106 | ||
107 | ||
108 | # | |
109 | # help.cgi | |
110 | # | |
111 | ||
112 | help.cgi: help.o ../Makedefs libcgi.a | |
113 | echo Linking $@... | |
114 | $(CC) $(LDFLAGS) -o $@ help.o libcgi.a $(LIBS) | |
115 | ||
116 | ||
117 | # | |
118 | # jobs.cgi | |
119 | # | |
120 | ||
121 | jobs.cgi: jobs.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
122 | echo Linking $@... | |
123 | $(CC) $(LDFLAGS) -o $@ jobs.o libcgi.a $(LIBS) | |
124 | ||
125 | ||
126 | # | |
127 | # printers.cgi | |
128 | # | |
129 | ||
130 | printers.cgi: printers.o ../Makedefs ../cups/$(LIBCUPS) libcgi.a | |
131 | echo Linking $@... | |
132 | $(CC) $(LDFLAGS) -o $@ printers.o libcgi.a $(LIBS) | |
133 | ||
134 | ||
135 | # | |
136 | # testcgi | |
137 | # | |
138 | ||
ecdc0628 | 139 | testcgi: testcgi.o ../Makedefs libcgi.a ../cups/libcups.a |
ef416fc2 | 140 | echo Linking $@... |
ecdc0628 | 141 | $(CC) $(LDFLAGS) -o $@ testcgi.o libcgi.a ../cups/libcups.a \ |
142 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) | |
ef416fc2 | 143 | |
144 | ||
145 | # | |
146 | # testhi | |
147 | # | |
148 | ||
ecdc0628 | 149 | testhi: testhi.o ../Makedefs libcgi.a ../cups/libcups.a |
ef416fc2 | 150 | echo Linking $@... |
ecdc0628 | 151 | $(CC) $(LDFLAGS) -o $@ testhi.o libcgi.a ../cups/libcups.a \ |
152 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) | |
ef416fc2 | 153 | |
154 | ||
bd7854cb | 155 | # |
156 | # testtemplate | |
157 | # | |
158 | ||
ecdc0628 | 159 | testtemplate: testtemplate.o ../Makedefs libcgi.a ../cups/libcups.a |
bd7854cb | 160 | echo Linking $@... |
ecdc0628 | 161 | $(CC) $(LDFLAGS) -o $@ testtemplate.o libcgi.a ../cups/libcups.a \ |
162 | $(COMMONLIBS) $(SSLLIBS) $(LIBZ) | |
bd7854cb | 163 | |
164 | ||
ef416fc2 | 165 | # |
166 | # Dependencies... | |
167 | # | |
168 | ||
169 | include Dependencies | |
170 | ||
171 | ||
172 | # | |
757d2cad | 173 | # End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $". |
ef416fc2 | 174 | # |