aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
blob: 80753a3a30dc75cdc0a788925fbbff0bac344b0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
srcfiles := forth.c optable.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']"