]> git.ipfire.org Git - thirdparty/cups.git/blob - cgi-bin/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / cgi-bin / Makefile
1 #
2 # "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $"
3 #
4 # CGI makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 2007 by Apple Inc.
7 # Copyright 1997-2006 by Easy Software Products.
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 CGIS = admin.cgi classes.cgi help.cgi jobs.cgi printers.cgi
19 TARGETS = libcgi.a $(CGIS) testcgi testhi testtemplate
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 \
22 jobs.o printers.o testcgi.o testhi.o testtemplate.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)
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
53 $(INSTALL_DIR) -m 755 $(SERVERBIN)/cgi-bin
54 for file in $(CGIS); do \
55 $(INSTALL_BIN) $$file $(SERVERBIN)/cgi-bin; \
56 done
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
63
64
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
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
136 testcgi: testcgi.o ../Makedefs libcgi.a ../cups/libcups.a
137 echo Linking $@...
138 $(CC) $(LDFLAGS) -o $@ testcgi.o libcgi.a ../cups/libcups.a \
139 $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
140
141
142 #
143 # testhi
144 #
145
146 testhi: testhi.o ../Makedefs libcgi.a ../cups/libcups.a
147 echo Linking $@...
148 $(CC) $(LDFLAGS) -o $@ testhi.o libcgi.a ../cups/libcups.a \
149 $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
150
151
152 #
153 # testtemplate
154 #
155
156 testtemplate: testtemplate.o ../Makedefs libcgi.a ../cups/libcups.a
157 echo Linking $@...
158 $(CC) $(LDFLAGS) -o $@ testtemplate.o libcgi.a ../cups/libcups.a \
159 $(COMMONLIBS) $(SSLLIBS) $(LIBZ) $(LIBGSSAPI)
160
161
162 #
163 # Dependencies...
164 #
165
166 include Dependencies
167
168
169 #
170 # End of "$Id: Makefile 6649 2007-07-11 21:46:42Z mike $".
171 #