-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmkfile
More file actions
45 lines (37 loc) · 1.13 KB
/
mkfile
File metadata and controls
45 lines (37 loc) · 1.13 KB
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
</$objtype/mkfile
## FIXME checking function type signatures with -T leads to linker errors 'incompatible type signatures ...'
RES_PREFIX="/lib/sis"
CFLAGS=-p -I. -I3rd-party/ -I/sys/include/npe -I/sys/include/npe/SDL2 -D__plan9__ -D__${objtype}__ -DNO_THREADING -DSW_ONLY -DRES_PREFIX=$RES_PREFIX
B = build
BIN=/$objtype/bin
OBJ=sis.$O stbimg.$O algorithm.$O get_opt.$O 3rd-party/cwalk.$O
TARG = $B/sis $B/sisui
LDLIBS=-lnpe_sdl2 -lnpe
ASSETDIR = /lib/sis/assets
DEPTHDIR = /lib/sis/depthmaps
TEXDIR = /lib/sis/textures
all:V: $B $TARG
$B:V:
mkdir -p $B
clean:V:
rm -f main.$O mainui.$O $OBJ 3rd-party/cwalk.$O 3rd-party/nanovg_xc.$O $B/sis $B/sisui
%.$O: %.c
$CC $CFLAGS -o $target $prereq
$B/sis: main.$O $OBJ
$LD -o $target $prereq $LDLIBS
$B/sisui: mainui.$O $OBJ 3rd-party/nanovg_xc.$O
$LD -o $target $prereq $LDLIBS
install: all
for (i in $TARG)
cp $i $BIN
mkdir -p $ASSETDIR $DEPTHDIR $TEXDIR
dircp assets $ASSETDIR
dircp depthmaps $DEPTHDIR
dircp textures $TEXDIR
cp doc/sis.1 /sys/man/1/sis
uninstall:
for (i in $TARG)
rm -f $BIN/`{basename $i}
rm -rf $ASSETDIR $DEPTHDIR $TEXDIR
rm -f /sys/man/1/sis
rm -rf /lib/sis