forked from janet-lang/janet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmkfile
96 lines (83 loc) · 2.94 KB
/
mkfile
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
</$objtype/mkfile
<|mkdir -p build/^(core c boot)
TARG=janet
HFILES=src/include/janet.h src/conf/janetconf.h
JANET_PATH=/sys/lib/janet
BIN=/$objtype/bin/
JANET_CONFIG=JANET_SINGLE_THREADED JANET_NO_DYNAMIC_MODULES JANET_NO_THREADS JANET_OS_NAME=9front JANET_ARCH_NAME=$objtype JANET_BUILD="9front" JANET_API='' JANET_NO_RETURN='' JANET_NO_EV JANET_NO_REALPATH JANET_NO_UTC_MKTIME JANET_SIMPLE_GETLINE
CFLAGS=-FTVBNcw -D _POSIX_SOURCE -D_PLAN9_SOURCE -D_BSD_EXTENSION -D_LIMITS_EXTENSION -Isrc/include -Isrc/conf -D_PLAN9_$objtype -D__plan9__
BOOT_CFLAGS=$CFLAGS -DJANET_BOOTSTRAP
CC=pcc
CLEANFILES=build/c/* build/boot/* build/core/*
JANET_LOCAL_HEADERS=src/core/features.h \
src/core/util.h \
src/core/state.h \
src/core/gc.h \
src/core/vector.h \
src/core/fiber.h \
src/core/regalloc.h \
src/core/compile.h \
src/core/emit.h \
src/core/symcache.h
JANET_CORE_SOURCES=src/core/abstract.c \
src/core/array.c \
src/core/asm.c \
src/core/buffer.c \
src/core/bytecode.c \
src/core/capi.c \
src/core/cfuns.c \
src/core/compile.c \
src/core/corelib.c \
src/core/debug.c \
src/core/emit.c \
src/core/ev.c \
src/core/ffi.c \
src/core/fiber.c \
src/core/gc.c \
src/core/inttypes.c \
src/core/io.c \
src/core/marsh.c \
src/core/math.c \
src/core/net.c \
src/core/os.c \
src/core/parse.c \
src/core/peg.c \
src/core/pp.c \
src/core/regalloc.c \
src/core/run.c \
src/core/specials.c \
src/core/state.c \
src/core/string.c \
src/core/strtod.c \
src/core/struct.c \
src/core/symcache.c \
src/core/table.c \
src/core/tuple.c \
src/core/util.c \
src/core/value.c \
src/core/vector.c \
src/core/vm.c \
src/core/wrap.c
JANET_BOOT_SOURCES=src/boot/array_test.c \
src/boot/boot.c \
src/boot/buffer_test.c \
src/boot/number_test.c \
src/boot/system_test.c \
src/boot/table_test.c
JANET_BOOT_HEADERS=src/boot/tests.h
JANET_BOOT_OBJECTS=`{echo $JANET_CORE_SOURCES $JANET_BOOT_SOURCES | sed -e 's/\.c/.boot.o/g' -e 's$src/$build/$g'}
build/%.boot.o: src/%.c $JANET_HEADERS $JANET_LOCAL_HEADERS $JANET_BOOT_HEADERS
$CC $BOOT_CFLAGS -D^$JANET_CONFIG -o $target $prereq(1)
build/boot/$O.janet: $JANET_BOOT_OBJECTS
$LD $LDFLAGS -o $target $prereq
build/c/janet.c: build/boot/$O.janet src/boot/boot.janet
build/boot/$O.janet . JANET_PATH $JANET_PATH >$target
build/c/shell.c: src/mainclient/shell.c
cp $prereq $target
$O.janet: build/janet.$O build/shell.$O
$LD $LDFLAGS -o $target $prereq
build/janet.$O: build/c/janet.c src/conf/janetconf.h src/include/janet.h
$CC $CFLAGS -D^$JANET_CONFIG -o $target $prereq(1)
build/shell.$O: src/mainclient/shell.c src/conf/janetconf.h src/include/janet.h
$CC $CFLAGS -D^$JANET_CONFIG -o $target $prereq(1)
</sys/src/cmd/mkmany