File: Makefile

package info (click to toggle)
cvm 0.11-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 492 kB
  • ctags: 215
  • sloc: ansic: 1,777; makefile: 48; sh: 12
file content (283 lines) | stat: -rw-r--r-- 10,096 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# Don't edit Makefile!  Use conf-* for configuration.
#
# Generated by spac see http://untroubled.org/spac/

SHELL=/bin/sh

DEFAULT: all

all: programs installer instcheck instshow

choose: warn-auto.sh choose.sh
	cat warn-auto.sh choose.sh >choose
	chmod 755 choose

client.a: makelib client.o client_domain.o client_setugid.o client_setenv.o facts.o
	./makelib client.a client.o client_domain.o client_setugid.o client_setenv.o facts.o

client.o: compile client.c socket/socket.h fork.h client.h facts.h errors.h iopoll.h
	./compile client.c

client_domain.o: compile client_domain.c client.h facts.h errors.h
	./compile client_domain.c

client_setenv.o: compile client_setenv.c client.h facts.h errors.h setenv.h
	./compile client_setenv.c

client_setugid.o: compile client_setugid.c client.h facts.h errors.h
	./compile client_setugid.c

command.a: makelib module_command.o module_request.o module_output.o facts.o
	./makelib command.a module_command.o module_request.o module_output.o facts.o

compile: conf-cc
	( echo '#!/bin/sh'; \
	  echo 'source=$$1; shift'; \
	  echo 'base=`echo "$$source" | sed -e s:\\\\.c$$::`'; \
	  echo exec `head -1 conf-cc` '-I. -o $${base}.o -c $$source $${1+"$$@"}'; \
	) >compile
	chmod 755 compile

conf_bin.c: conf-bin
	head -1 conf-bin | \
	  sed -e 's/"/\\"/g' \
	      -e 's/^/const char conf_bin[] = "/' \
	      -e 's/$$/";/' >conf_bin.c

crypt.lib: compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lcrypt ) >/dev/null 2>&1 \
	  && echo -lcrypt || exit 0 ) >crypt.lib
	rm -f trylib.o trylib

cvm-benchclient: load cvm-benchclient.o client.a socket/socket.a iopoll.o setenv.o
	./load cvm-benchclient client.a socket/socket.a iopoll.o setenv.o 

cvm-benchclient.o: compile cvm-benchclient.c client.h facts.h errors.h
	./compile cvm-benchclient.c

cvm-checkpassword: load cvm-checkpassword.o client.a setenv.o socket/socket.a iopoll.o
	./load cvm-checkpassword client.a setenv.o socket/socket.a iopoll.o 

cvm-checkpassword.o: compile cvm-checkpassword.c client.h facts.h errors.h
	./compile cvm-checkpassword.c

cvm-pwfile: load cvm-pwfile.o command.a pwcmp/client.a crypt.lib
	./load cvm-pwfile command.a pwcmp/client.a `cat crypt.lib` 

cvm-pwfile-local: load cvm-pwfile-local.o local.a socket/socket.a pwcmp/client.a crypt.lib
	./load cvm-pwfile-local local.a socket/socket.a pwcmp/client.a `cat crypt.lib` 

cvm-pwfile-local.o: compile cvm-pwfile-local.c cvm-pwfile.c pwcmp/client.h module.h facts.h errors.h
	./compile cvm-pwfile-local.c

cvm-pwfile-udp: load cvm-pwfile-udp.o udp.a socket/socket.a pwcmp/client.a crypt.lib
	./load cvm-pwfile-udp udp.a socket/socket.a pwcmp/client.a `cat crypt.lib` 

cvm-pwfile-udp.o: compile cvm-pwfile-udp.c cvm-pwfile.c pwcmp/client.h module.h facts.h errors.h
	./compile cvm-pwfile-udp.c

cvm-pwfile.o: compile cvm-pwfile.c pwcmp/client.h module.h facts.h errors.h
	./compile cvm-pwfile.c

cvm-testclient: load cvm-testclient.o client.a socket/socket.a iopoll.o setenv.o
	./load cvm-testclient client.a socket/socket.a iopoll.o setenv.o 

cvm-testclient.o: compile cvm-testclient.c client.h facts.h errors.h
	./compile cvm-testclient.c

cvm-unix: load cvm-unix.o getpwnam.o command.a crypt.lib shadow.lib s.lib
	./load cvm-unix getpwnam.o command.a `cat crypt.lib` `cat shadow.lib` `cat s.lib` 

cvm-unix-local: load cvm-unix-local.o getpwnam.o local.a socket/socket.a crypt.lib shadow.lib s.lib
	./load cvm-unix-local getpwnam.o local.a socket/socket.a `cat crypt.lib` `cat shadow.lib` `cat s.lib` 

cvm-unix-local.o: compile cvm-unix-local.c cvm-unix.c hasspnam.h hasuserpw.h module.h facts.h errors.h
	./compile cvm-unix-local.c

cvm-unix-udp: load cvm-unix-udp.o getpwnam.o udp.a socket/socket.a crypt.lib shadow.lib s.lib
	./load cvm-unix-udp getpwnam.o udp.a socket/socket.a `cat crypt.lib` `cat shadow.lib` `cat s.lib` 

cvm-unix-udp.o: compile cvm-unix-udp.c cvm-unix.c hasspnam.h hasuserpw.h module.h facts.h errors.h
	./compile cvm-unix-udp.c

cvm-unix.o: compile cvm-unix.c hasspnam.h hasuserpw.h module.h facts.h errors.h
	./compile cvm-unix.c

facts.o: compile facts.c facts.h
	./compile facts.c

fork.h: compile load fork.h1 fork.h2 tryvfork.c
	( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null 2>&1 \
	  && cat fork.h2 || cat fork.h1 ) > fork.h
	rm -f tryvfork.o tryvfork

getpwnam.o: compile getpwnam.c module.h facts.h errors.h hasspnam.h hasuserpw.h
	./compile getpwnam.c

hasspnam.h: compile load tryspnam.c
	( ( ./compile tryspnam.c && ./load tryspnam ) >/dev/null 2>&1 \
	  && echo \#define HASGETSPNAM 1 || exit 0 ) > hasspnam.h
	rm -f tryspnam.o tryspnam

hasuserpw.h: s.lib compile load tryuserpw.c
	( ( ./compile tryuserpw.c && ./load tryuserpw `cat s.lib` ) >/dev/null 2>&1 \
	  && echo \#define HASGETUSERPW 1 || exit 0 ) > hasuserpw.h
	rm -f tryuserpw.o tryuserpw

installer: load installer.o insthier.o
	./load installer insthier.o

installer.o: compile installer.c installer.h
	./compile installer.c

instcheck: load instcheck.o insthier.o
	./load instcheck insthier.o

instcheck.o: compile instcheck.c installer.h
	./compile instcheck.c

insthier.o: compile insthier.c installer.h conf_bin.c
	./compile insthier.c

instshow: load instshow.o insthier.o
	./load instshow insthier.o

instshow.o: compile instshow.c installer.h
	./compile instshow.c

iopoll.h: choose compile load trypoll.c iopoll.h1 iopoll.h2 iopoll.c
	./choose clr trypoll iopoll.h1 iopoll.h2 > iopoll.h

iopoll.o: compile iopoll.c iopoll.h select.h
	./compile iopoll.c

load: conf-ld
	( echo '#!/bin/sh';\
	  echo 'main="$$1"; shift';\
	  echo exec `head -1 conf-ld` '-o "$$main" "$$main.o" $${1+"$$@"}';\
	) >load
	chmod 755 load

local.a: makelib module_local.o module_request.o module_output.o module_log.o facts.o
	./makelib local.a module_local.o module_request.o module_output.o module_log.o facts.o

makelib: 
	( echo '#!/bin/sh'; \
	  echo 'main="$$1"; shift';\
	  echo 'rm -f "$$main"';\
	  echo 'ar cr "$$main" $${1+"$$@"}';\
	  echo 'ranlib "$$main"';\
	) >makelib
	chmod 755 makelib

module_command.o: compile module_command.c module.h facts.h errors.h
	./compile module_command.c

module_local.o: compile module_local.c socket/socket.h module.h facts.h errors.h
	./compile module_local.c

module_log.o: compile module_log.c module.h facts.h errors.h
	./compile module_log.c

module_output.o: compile module_output.c module.h facts.h errors.h
	./compile module_output.c

module_request.o: compile module_request.c module.h facts.h errors.h
	./compile module_request.c

module_udp.o: compile module_udp.c socket/socket.h module.h facts.h errors.h
	./compile module_udp.c

programs: cvm-unix cvm-testclient cvm-pwfile-local cvm-pwfile-udp cvm-pwfile cvm-unix-udp cvm-unix-local cvm-benchclient cvm-checkpassword

pwcmp/client.a: makelib pwcmp/client.o
	./makelib pwcmp/client.a pwcmp/client.o

pwcmp/client.o: compile pwcmp/client.c fork.h client.h facts.h errors.h
	./compile pwcmp/client.c

s.lib: compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -ls ) >/dev/null 2>&1 \
	  && echo -ls || exit 0 ) >s.lib
	rm -f trylib.o trylib

select.h: choose compile trysysel.c select.h1 select.h2
	./choose c trysysel select.h1 select.h2 > select.h

setenv.h: choose compile load setenv.h1 setenv.h2 trysetenv.c
	./choose cl trysetenv setenv.h1 setenv.h2 > setenv.h

setenv.o: compile setenv.c setenv.h
	./compile setenv.c

shadow.lib: compile load trylib.c
	( ( ./compile trylib.c && ./load trylib -lshadow ) >/dev/null 2>&1 \
	  && echo -lshadow || exit 0 ) >shadow.lib
	rm -f trylib.o trylib

socket/accept4.o: compile socket/accept4.c socket/socket.h
	./compile socket/accept4.c

socket/acceptu.o: compile socket/acceptu.c socket/socket.h
	./compile socket/acceptu.c

socket/bind4.o: compile socket/bind4.c socket/socket.h
	./compile socket/bind4.c

socket/bindu.o: compile socket/bindu.c socket/socket.h
	./compile socket/bindu.c

socket/broadcast.o: compile socket/broadcast.c socket/socket.h
	./compile socket/broadcast.c

socket/connect4.o: compile socket/connect4.c socket/socket.h
	./compile socket/connect4.c

socket/connectu.o: compile socket/connectu.c socket/socket.h
	./compile socket/connectu.c

socket/getaddr4.o: compile socket/getaddr4.c socket/socket.h
	./compile socket/getaddr4.c

socket/ipv4addr.o: compile socket/ipv4addr.c socket/socket.h
	./compile socket/ipv4addr.c

socket/listen.o: compile socket/listen.c socket/socket.h
	./compile socket/listen.c

socket/recv4.o: compile socket/recv4.c socket/socket.h
	./compile socket/recv4.c

socket/recvu.o: compile socket/recvu.c socket/socket.h
	./compile socket/recvu.c

socket/reuse.o: compile socket/reuse.c socket/socket.h
	./compile socket/reuse.c

socket/send4.o: compile socket/send4.c socket/socket.h
	./compile socket/send4.c

socket/sendu.o: compile socket/sendu.c socket/socket.h
	./compile socket/sendu.c

socket/shutdown.o: compile socket/shutdown.c socket/socket.h
	./compile socket/shutdown.c

socket/socket.a: makelib socket/accept4.o socket/acceptu.o socket/bind4.o socket/bindu.o socket/broadcast.o socket/connect4.o socket/connectu.o socket/getaddr4.o socket/ipv4addr.o socket/listen.o socket/recv4.o socket/recvu.o socket/reuse.o socket/send4.o socket/sendu.o socket/shutdown.o socket/tcp.o socket/udp.o socket/unixdgm.o socket/unixstr.o
	./makelib socket/socket.a socket/accept4.o socket/acceptu.o socket/bind4.o socket/bindu.o socket/broadcast.o socket/connect4.o socket/connectu.o socket/getaddr4.o socket/ipv4addr.o socket/listen.o socket/recv4.o socket/recvu.o socket/reuse.o socket/send4.o socket/sendu.o socket/shutdown.o socket/tcp.o socket/udp.o socket/unixdgm.o socket/unixstr.o

socket/tcp.o: compile socket/tcp.c socket/socket.h
	./compile socket/tcp.c

socket/udp.o: compile socket/udp.c socket/socket.h
	./compile socket/udp.c

socket/unixdgm.o: compile socket/unixdgm.c socket/socket.h
	./compile socket/unixdgm.c

socket/unixstr.o: compile socket/unixstr.c socket/socket.h
	./compile socket/unixstr.c

udp.a: makelib module_udp.o module_request.o module_output.o module_log.o facts.o
	./makelib udp.a module_udp.o module_request.o module_output.o module_log.o facts.o