about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
authorCase Duckworth2024-05-18 21:15:54 -0500
committerCase Duckworth2024-05-18 21:15:54 -0500
commit727995a409632d4c143ba4b6b088c7df40f074e7 (patch)
tree3b2f291b2353314971288c0c3ad86d3825c6f825 /Makefile
parentRemove old code (diff)
downloadjimmy-727995a409632d4c143ba4b6b088c7df40f074e7.tar.gz
jimmy-727995a409632d4c143ba4b6b088c7df40f074e7.zip
Scheme bit!
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0b8e141 --- /dev/null +++ b/Makefile
@@ -0,0 +1,40 @@
1NAME = jimmy
2
3CSC = /usr/bin/csc
4CSI = /usr/bin/csi
5CSC_OPTIONS = \
6 -host \
7 -D compiling-extension \
8 -emit-all-import-libraries \
9 -dynamic \
10 -regenerate-import-libraries \
11 -setup-mode \
12 -I $(PWD) \
13 -C -I$(PWD) \
14
15CSC_OPTIONS_EXTRA = \
16 -X utf8 \
17 -X module-declarations
18
19BUILD = $(PWD)/build
20
21.PHONY: all test
22build: $(patsubst src/%.scm,$(BUILD)/%.so,$(wildcard src/*.scm))
23
24test: build
25 $(CSI) -s $(PWD)/tests/run.scm $(NAME)
26
27# Program!
28
29# Libraries!
30
31$(BUILD)/%.so: src/%.scm
32 mkdir -p "$(dir $@)"
33 $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@
34
35## Library dependency graph
36# here's a convenience macro
37lib = $(BUILD)/$(NAME).$(1).so
38
39$(call lib,read): $(call lib,util)
40$(call lib,emit): $(call lib,util)