diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 22 |
1 files changed, 3 insertions, 19 deletions
@@ -1,10 +1,9 @@ mode ?= debug cc = gcc -includes = -DWITHREADLINE -Ilibs/ +includes = -DWITHREADLINE -libs = libs/algds/libalgds.a -ldflags = -lm -lreadline +ldflags = -lm -lreadline -lalgds ifeq ($(mode), debug) cflags = $(includes) \ -g \ @@ -21,31 +20,18 @@ tests_bin=$(tests:.c=.bin) all: bamboo-lisp -staticlib: libbamboo-lisp.a - -web: web-bamboo-lisp.js - -web-bamboo-lisp.js: $(src) - -rm web-* - emcc -Ilibs/ $(src) libs/algds/*.c -o web-bamboo-lisp.js \ - -s EXPORTED_FUNCTIONS="['_print_lisp_error', '_malloc', '_free', '_new_interp', '_lisp_to_string', _Interp_eval_string]" -s WASM=1 -s EXPORTED_RUNTIME_METHODS="['stringToUTF8', 'UTF8ToString']" - install: bamboo-lisp sudo cp bamboo-lisp /usr/local/bin/bamboo prelude.c: prelude.lisp cat prelude.lisp | python scripts/genprelude.py > prelude.c -bamboo-lisp: $(obj) main.o libs/algds/libalgds.a +bamboo-lisp: $(obj) main.o gcc $(cflags) -o $@ $^ $(ldflags) libbamboo-lisp.a: $(obj) ar cr $@ $^ -libs/algds/libalgds.a: - cd libs/algds && \ - make profile=$(mode) - test: bamboo-lisp $(tests_bin) @echo @echo "Run tests:" @@ -67,9 +53,7 @@ $(tests_bin):%.bin:%.c $(obj) $(libs) clean: -rm $(shell find tests/ -name '*.bin') -rm $(shell find . -name '*.o' -or -name '*.a' -or -name '*.d') - -rm web-bamboo-lisp* -rm bamboo-lisp - -cd libs/algds && make clean DEPS := $(shell find . -name '*.d') ifneq ($(DEPS),) |
