diff options
| author | Mistivia <i@mistivia.com> | 2025-07-22 18:51:39 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-07-22 18:51:39 +0800 |
| commit | 9ab3d5ebfa4970d9e8bad73ff38c1e0aa157e6c0 (patch) | |
| tree | b576af9385a9a6a2644bfa2711cfc381c9b687b2 /Makefile | |
| parent | ea5c15cbd628953e7b9d17b45ea685006a582cd4 (diff) | |
update makefile
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),) |
