fsharp: Partial step 1: lists & vectors
[jackhill/mal.git] / fsharp / Makefile
CommitLineData
1c358979
PS
1#####################
2
3DEBUG =
4
5TESTS =
6
ed3a12f5 7SOURCES_BASE = types.fs reader.fs printer.fs readline.fs
1c358979 8SOURCES_LISP =
ed3a12f5
PS
9SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
10
11TERMINAL_SOURCES = terminal.cs
1c358979
PS
12
13#####################
14
ed3a12f5 15SRCS = step0_repl.fs step1_read_print.fs
1c358979
PS
16
17FLAGS = $(if $(strip $(DEBUG)),-debug+,)
18
19#####################
20
21all: $(patsubst %.fs,%.exe,$(SRCS))
22
ed3a12f5
PS
23Mono.Terminal.dll: $(TERMINAL_SOURCES)
24 mcs $(FLAGS) -target:library $+ -out:$@
25
26mal.dll: $(SOURCES) Mono.Terminal.dll
27 fsharpc $(FLAGS) -o $@ -r Mono.Terminal.dll -a $(SOURCES)
28
29%.exe: %.fs mal.dll
30 fsharpc $(FLAGS) -o $@ -r mal.dll $<
1c358979
PS
31
32clean:
33 rm -f *.dll *.exe *.mdb
34
35.PHONY: stats tests $(TESTS)
36
37stats: $(SOURCES)
38 @wc $^
39stats-lisp: $(SOURCES_LISP)
40 @wc $^
41
42tests: $(TESTS)
43
44$(TESTS):
45 @echo "Running $@"; \
46 ./$@ || exit 1; \