Commit | Line | Data |
---|---|---|
447a09bd OM |
1 | ifneq ($(shell which xcrun),) |
2 | SWIFT = xcrun -sdk macosx swiftc | |
3 | else | |
4 | SWIFT = swiftc | |
5 | endif | |
6 | ||
7 | STEP3_DEPS = Sources/types.swift Sources/reader.swift Sources/printer.swift Sources/env.swift | |
8 | STEP4_DEPS = $(STEP3_DEPS) Sources/core.swift | |
9 | ||
10 | STEPS = step0_repl step1_read_print step2_eval step3_env \ | |
11 | step4_if_fn_do step5_tco step6_file step7_quote \ | |
12 | step8_macros step9_try stepA_mal | |
13 | ||
14 | all: $(STEPS) | |
15 | ||
16 | dist: mal | |
17 | ||
18 | mal: stepA_mal | |
19 | cp $< $@ | |
20 | ||
21 | step1_read_print step2_eval step3_env: $(STEP3_DEPS) | |
22 | step4_if_fn_do step5_tco step6_file step7_quote step8_macros step9_try stepA_mal: $(STEP4_DEPS) | |
23 | ||
24 | step%: Sources/step%/main.swift | |
25 | $(SWIFT) $+ -o $@ | |
26 | ||
27 | clean: | |
28 | rm -f $(STEPS) mal | |
29 |