aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
blob: d2c106eda168049fa7276dd1bc7abd54f1c7a9b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
srcfiles := drhstrings.c forthmachine.c forthmachine_optable.c forth.c stack.c

nativeexe := ./forth

ifneq (, $(shell which clang))
	CC := clang
endif

build:
	${CC} ${srcfiles} -o ${nativeexe} -Wall
run:
	${nativeexe}
run-rlwrap:
	rlwrap -r -f rlwrapcompletions.forth ${nativeexe}
build-wasm:
	emcc ${srcfiles} -Wall -o forthlib.js -s NO_EXIT_RUNTIME=1 -s "EXPORTED_RUNTIME_METHODS=['ccall']"