summaryrefslogtreecommitdiff
path: root/sys/src/cmd/auth/mkfile
blob: 25c4fe2d3ed7df37d7018ec7ea183fc00a60d4b8 (plain)
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
</$objtype/mkfile
#
#		programs
#
TARG=\
	acmed\
	as\
	asaudit\
	asn1dump\
	asn12rsa\
	authsrv\
	box\
	changeuser\
	convkeys\
	cron\
	debug\
	guard.srv\
	httpauth\
	keyfs\
	login\
	netkey\
	newns\
	none\
	passwd\
	pemdecode\
	pemencode\
	printnetkey\
	readnvram\
	rsa2asn1\
	rsa2csr\
	rsa2jwk\
	rsa2pub\
	rsa2ssh\
	rsa2x509\
	rsafill\
	rsagen\
	ssh2rsa\
	uniq\
	userpasswd\
	warning\
	wrkey\
	x5092pub\

DIRS=\
	factotum\
	secstore\

OTHEROFILES=\
	challenge.$O\
	convbio.$O\
	respond.$O\
	rsa2any.$O\
	secureidcheck.$O\
	userpasswd.$O\

HFILES=/sys/include/auth.h /sys/include/authsrv.h authcmdlib.h

LIB=lib.$O.a
BIN=/$objtype/bin/auth
CLIB=`{ls lib/*.c}

UPDATE=\
	mkfile\
	$HFILES\
	rsa2any.h\
	${OTHEROFILES:%.$O=%.c}\
	${TARG:%=%.c}\

</sys/src/cmd/mkmany

$LIB:
	cd lib
	mk

all:V:	all.dirs

install:V:	install.dirs $BIN/status $BIN/enable $BIN/disable

update:V:
	update $UPDATEFLAGS $UPDATE
	for (i in lib $DIRS) @{
		cd $i
		mk 'UPDATEFLAGS='$"UPDATEFLAGS update
	}

&.lib:V:
	cd lib
	mk $stem

&.dirs:V:
	for (i in $DIRS) @{
		cd $i
		mk $stem
	}

install.dirs:V:	$LIB

all.dirs:V:	$LIB

clean.dirs:V:	clean.lib

nuke.dirs:V:	nuke.lib

clean:V:
	mk clean.dirs
	rm -f *.[$OS] *.[$OS].a [$OS].* y.tab.? y.debug y.output $TARG

nuke:V:
	mk nuke.dirs
	rm -f *.[$OS] *.[$OS].a [$OS].* y.tab.? y.debug y.output $TARG *.acid

$O.%:	$LIB
$O.rsa2asn1 $O.rsa2ssh $O.rsafill $O.rsa2x509 $O.rsa2pub $O.rsa2csr $O.rsa2jwk: rsa2any.$O
$O.authsrv $O.guard.srv: secureidcheck.$O

rsa2asn1.$O rsa2ssh.$O rsafill.$O rsa2x509.$O rsa2pub.$O rsa2csr.$O rsa2jwk.$O: rsa2any.h

$BIN/netkey:V:	$O.netkey
	cp $O.netkey /$objtype/bin/netkey

$BIN/passwd:V:	$O.passwd
	cp $O.passwd /$objtype/bin/passwd

$BIN/status:V:
	cp status $target

$BIN/enable:V:
	cp enable $target

$BIN/disable:V:
	cp disable $target