summaryrefslogtreecommitdiff
path: root/mkfile
blob: edfb0c9af4db24d4e4c0ea980cd711228455fc8d (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
</$objtype/mkfile

BIN=$home/bin/$objtype
TARG=3d
OFILES=\
	alloc.$O\
	main.$O\

HFILES=dat.h fns.h

LIB=\
	libobj/libobj.a$O\
	libgraphics/libgraphics.a$O\

</sys/src/cmd/mkone

libgraphics/libgraphics.a$O:
	cd libgraphics
	mk install

libobj/libobj.a$O:
	cd libobj
	mk install

nuke∅dirs:VQ:
	for(d in `{walk -d | grep -v '^\.git'})
		if(~ `{walk -f $d} '')
			rm -f $d

pulldeps:VQ: nuke∅dirs
	git/clone git://antares-labs.eu/libobj || \
	git/clone git://shithub.us/rodri/libobj || \
	git/clone https://github.com/sametsisartenep/libobj
	git/clone git://antares-labs.eu/libgraphics || \
	git/clone https://github.com/sametsisartenep/libgraphics
	@{cd libgraphics; mk $target}

clean nuke:V:
	rm -f *.[$OS] [$OS].out $TARG
	@{cd libgraphics; mk $target}
	@{cd libobj; mk $target}

uninstall:V:
	rm -f $BIN/$TARG