aboutsummaryrefslogtreecommitdiff
path: root/cs/Makefile
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-06 22:13:14 -0500
committerJoel Martin <github@martintribe.org>2014-04-06 22:13:14 -0500
commit53beaa0a6ddd9d8a5fb531f97c44a9c7129d1de7 (patch)
treeaad0aa97a9a7f54aed1cc26561aa22cea931f2fe /cs/Makefile
parentb2ff794a97a80f8acac1914c679222fda5a3355c (diff)
downloadmal-53beaa0a6ddd9d8a5fb531f97c44a9c7129d1de7.tar.gz
mal-53beaa0a6ddd9d8a5fb531f97c44a9c7129d1de7.zip
CS: add step1_read_print
Diffstat (limited to 'cs/Makefile')
-rw-r--r--cs/Makefile33
1 files changed, 14 insertions, 19 deletions
diff --git a/cs/Makefile b/cs/Makefile
index c03e6c9..0028096 100644
--- a/cs/Makefile
+++ b/cs/Makefile
@@ -2,37 +2,32 @@
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
+SOURCES = readline.cs types.cs reader.cs printer.cs \
+ step0_repl.cs step1_read_print.cs
+OTHER_SOURCES = getline.cs
#####################
-SRCS = step0_repl.cs
-OBJS = $(SRCS:%.cs=%.exe)
-BINS = $(OBJS:%.o=%)
-OTHER_OBJS = getline.dll
+FLAGS = -debug+
+
+OBJS =
+LIB_SRCS = $(filter-out step%,$(OTHER_SOURCES) $(SOURCES))
#####################
-all: $(BINS) mal.exe
+all: mal.exe $(patsubst %.cs,%.exe,$(filter step%,$(SOURCES)))
-mal.exe: $(word $(words $(OBJS)),$(OBJS))
+mal.exe: $(patsubst %.cs,%.exe,$(word $(words $(SOURCES)),$(SOURCES)))
cp $< $@
-$(OTHER_OBJS): %.dll: %.cs
- mcs -target:library -out:$@ $+
-
-$(OBJS): %.exe: %.cs $(OTHER_OBJS)
- mcs $(foreach lib,$(OTHER_OBJS),-r:$(lib)) $(@:%.exe=%.cs)
+mal.dll: $(LIB_SRCS)
+ mcs $(FLAGS) -target:library $+ -out:$@
-#$(patsubst %.o,%,$(filter step%,$(OBJS))): $(OTHER_OBJS)
-#$(BINS): %: %.o
-# gcc $+ -o $@ $(LDFLAGS)
+%.exe: %.cs mal.dll
+ mcs $(FLAGS) -r:mal.dll $<
clean:
- rm -f $(OBJS) $(OTHER_OBJS) mal.exe
+ rm -f *.dll *.exe *.mbd
.PHONY: stats tests $(TESTS)