diff options
author | Case Duckworth | 2024-06-05 09:21:25 -0500 |
---|---|---|
committer | Case Duckworth | 2024-06-05 09:21:25 -0500 |
commit | 423ac382f9e73bf1ca7fc6b400f98db087cd7d22 (patch) | |
tree | 1992e3dc7e71cd40eb7cdbc0b6d0c3cdf82c4332 /Makefile | |
parent | Update README, add COPYING (diff) | |
download | jimmy-423ac382f9e73bf1ca7fc6b400f98db087cd7d22.tar.gz jimmy-423ac382f9e73bf1ca7fc6b400f98db087cd7d22.zip |
Write executable
This involved moving `src' to `lib' and making `bin'. `bin' holds the program, which only imports `jimmy.main' from lib.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 44 |
1 files changed, 27 insertions, 17 deletions
diff --git a/Makefile b/Makefile index 8eead3a..d2a1003 100644 --- a/Makefile +++ b/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | 2 | ||
3 | NAME = jimmy | 3 | NAME = jimmy |
4 | CSC = /usr/bin/csc | 4 | CSC = /usr/bin/csc |
5 | CSC_OPTIONS = -setup-mode -host -I $(PWD) -C -I$(PWD) | 5 | CSC_OPTIONS = -setup-mode -host -I $(PWD) -C -I$(BUILD) |
6 | CSC_LIB_OPTIONS = -D compiling-extension -emit-all-import-libraries -dynamic -regenerate-import-libraries | 6 | CSC_LIB_OPTIONS = -D compiling-extension -emit-all-import-libraries -dynamic -regenerate-import-libraries |
7 | CSC_OPTIONS_EXTRA = -X utf8 -X module-declarations | 7 | CSC_OPTIONS_EXTRA = -X utf8 -X module-declarations |
8 | CSI = /usr/bin/csi | 8 | CSI = /usr/bin/csi |
@@ -12,7 +12,7 @@ TEST_ENV = env BUILD=$(BUILD) TESTS=$(TESTS) | |||
12 | TEST_ENV_EXTRA = TEST_USE_ANSI=0 | 12 | TEST_ENV_EXTRA = TEST_USE_ANSI=0 |
13 | 13 | ||
14 | .PHONY: all test clean install uninstall | 14 | .PHONY: all test clean install uninstall |
15 | all: build/jimmy.util.so build/jimmy.read.so build/jimmy.emit.so build/jimmy.html.so build/jimmy.wrap.so | 15 | all: build/jimmy.util.so build/jimmy.read.so build/jimmy.emit.so build/jimmy.html.so build/jimmy.wrap.so build/jimmy.main.so build/jimmy |
16 | test: all | 16 | test: all |
17 | cd $(BUILD) && $(TEST_ENV) $(TEST_ENV_EXTRA) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME) | 17 | cd $(BUILD) && $(TEST_ENV) $(TEST_ENV_EXTRA) $(CSI) -setup-mode -s $(TESTS)/run.scm $(NAME) |
18 | clean: | 18 | clean: |
@@ -24,28 +24,38 @@ uninstall: | |||
24 | 24 | ||
25 | # jimmy | 25 | # jimmy |
26 | 26 | ||
27 | build/jimmy.util.so: src/util.scm | 27 | build/jimmy.util.so: lib/util.scm |
28 | @mkdir -p $(BUILD) | 28 | @mkdir -p $(BUILD) |
29 | cd $(BUILD) && \ | 29 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ |
30 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F) | ||
31 | @test -f jimmy.util.import.scm &&mv jimmy.util.import.scm $(BUILD)/||true | 30 | @test -f jimmy.util.import.scm &&mv jimmy.util.import.scm $(BUILD)/||true |
32 | build/jimmy.read.so: src/read.scm src/util.scm | 31 | |
32 | build/jimmy.read.so: lib/read.scm lib/util.scm | ||
33 | @mkdir -p $(BUILD) | 33 | @mkdir -p $(BUILD) |
34 | cd $(BUILD) && \ | 34 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ |
35 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F) | ||
36 | @test -f jimmy.read.import.scm &&mv jimmy.read.import.scm $(BUILD)/||true | 35 | @test -f jimmy.read.import.scm &&mv jimmy.read.import.scm $(BUILD)/||true |
37 | build/jimmy.emit.so: src/emit.scm src/util.scm | 36 | |
37 | build/jimmy.emit.so: lib/emit.scm lib/util.scm | ||
38 | @mkdir -p $(BUILD) | 38 | @mkdir -p $(BUILD) |
39 | cd $(BUILD) && \ | 39 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ |
40 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F) | ||
41 | @test -f jimmy.emit.import.scm &&mv jimmy.emit.import.scm $(BUILD)/||true | 40 | @test -f jimmy.emit.import.scm &&mv jimmy.emit.import.scm $(BUILD)/||true |
42 | build/jimmy.html.so: src/html.scm src/util.scm src/emit.scm | 41 | |
42 | build/jimmy.html.so: lib/html.scm lib/util.scm lib/emit.scm | ||
43 | @mkdir -p $(BUILD) | 43 | @mkdir -p $(BUILD) |
44 | cd $(BUILD) && \ | 44 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ |
45 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F) | ||
46 | @test -f jimmy.html.import.scm &&mv jimmy.html.import.scm $(BUILD)/||true | 45 | @test -f jimmy.html.import.scm &&mv jimmy.html.import.scm $(BUILD)/||true |
47 | build/jimmy.wrap.so: src/wrap.scm src/util.scm src/emit.scm | 46 | |
47 | build/jimmy.wrap.so: lib/wrap.scm lib/util.scm lib/emit.scm | ||
48 | @mkdir -p $(BUILD) | 48 | @mkdir -p $(BUILD) |
49 | cd $(BUILD) && \ | 49 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ |
50 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) ../$< -o $(@F) | ||
51 | @test -f jimmy.wrap.import.scm &&mv jimmy.wrap.import.scm $(BUILD)/||true | 50 | @test -f jimmy.wrap.import.scm &&mv jimmy.wrap.import.scm $(BUILD)/||true |
51 | |||
52 | build/jimmy.main.so: lib/main.scm lib/util.scm lib/emit.scm lib/read.scm lib/wrap.scm | ||
53 | @mkdir -p $(BUILD) | ||
54 | $(CSC) $(CSC_OPTIONS) $(CSC_LIB_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ | ||
55 | @test -f jimmy.main.import.scm &&mv jimmy.main.import.scm $(BUILD)/||true | ||
56 | |||
57 | build/jimmy: bin/jimmy.scm lib/main.scm | ||
58 | @mkdir -p $(BUILD) | ||
59 | $(CSC) $(CSC_OPTIONS) $(CSC_OPTIONS_EXTRA) $< -o $@ | ||
60 | @test -f jimmy.import.scm &&mv jimmy.import.scm $(BUILD)/||true | ||
61 | |||