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