blob: c03e6c91cf1909edaface1b436256b35161dde06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#####################
TESTS =
SOURCES = readline.h readline.c types.h types.c \
reader.h reader.c printer.h printer.c \
env.c core.h core.c interop.h interop.c \
stepA_more.c
#####################
SRCS = step0_repl.cs
OBJS = $(SRCS:%.cs=%.exe)
BINS = $(OBJS:%.o=%)
OTHER_OBJS = getline.dll
#####################
all: $(BINS) mal.exe
mal.exe: $(word $(words $(OBJS)),$(OBJS))
cp $< $@
$(OTHER_OBJS): %.dll: %.cs
mcs -target:library -out:$@ $+
$(OBJS): %.exe: %.cs $(OTHER_OBJS)
mcs $(foreach lib,$(OTHER_OBJS),-r:$(lib)) $(@:%.exe=%.cs)
#$(patsubst %.o,%,$(filter step%,$(OBJS))): $(OTHER_OBJS)
#$(BINS): %: %.o
# gcc $+ -o $@ $(LDFLAGS)
clean:
rm -f $(OBJS) $(OTHER_OBJS) mal.exe
.PHONY: stats tests $(TESTS)
stats: $(SOURCES)
@wc $^
tests: $(TESTS)
$(TESTS):
@echo "Running $@"; \
./$@ || exit 1; \
|