diff options
| author | Mistivia <i@mistivia.com> | 2025-12-14 17:41:43 +0800 |
|---|---|---|
| committer | Mistivia <i@mistivia.com> | 2025-12-14 17:41:43 +0800 |
| commit | 1232e077f5273d86600cb4a4c34269310f9f2b9f (patch) | |
| tree | e1a28eb054ed001737b7d49bd8341cb4e5d26997 /exts/Makefile | |
| parent | 724718566c384d8be60f2803e5ecd6be43c6d74b (diff) | |
add io ext
Diffstat (limited to 'exts/Makefile')
| -rw-r--r-- | exts/Makefile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/exts/Makefile b/exts/Makefile index e69de29..c80de69 100644 --- a/exts/Makefile +++ b/exts/Makefile @@ -0,0 +1,31 @@ +mode ?= debug +cc = gcc + +cflags = -DWITHREADLINE -fPIC + +ldflags = -lm -lalgds -lbamboo-lisp +ifeq ($(mode), debug) + cflags += -g +else + cflags += -O2 +endif + +objs = \ + vector.so \ + dict.so \ + io.so + +all: $(objs) + +vector.so: vector.c + gcc -shared $(cflags) -o $@ $^ $(ldflags) + +dict.so: dict.c + gcc -shared $(cflags) -o $@ $^ $(ldflags) + +io.so: io.c + gcc -shared $(cflags) -o $@ $^ $(ldflags) + +install: + mkdir -p /usr/local/share/bamboo-lisp/exts/ + cp $(objs) /usr/local/share/bamboo-lisp/exts/
\ No newline at end of file |
