aboutsummaryrefslogtreecommitdiff
path: root/go/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'go/Makefile')
-rw-r--r--go/Makefile13
1 files changed, 7 insertions, 6 deletions
diff --git a/go/Makefile b/go/Makefile
index 85719bf..076a7aa 100644
--- a/go/Makefile
+++ b/go/Makefile
@@ -1,13 +1,14 @@
+export GOPATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
+
#####################
-SOURCES_BASE =
-SOURCES_LISP = step0_repl.go
+SOURCES_BASE = src/types/types.go src/reader/reader.go
+SOURCES_LISP = src/step1_read_print/step1_read_print.go
SOURCES = $(SOURCES_BASE) $(SOURCES_LISP)
-
#####################
-SRCS = step0_repl.go
+SRCS = step0_repl.go step1_read_print.go
BINS = $(SRCS:%.go=%)
#####################
@@ -17,8 +18,8 @@ all: $(BINS) mal
mal: $(word $(words $(BINS)),$(BINS))
cp $< $@
-$(BINS): %: %.go
- go build -o $@ $+
+$(BINS): $(SOURCES_BASE) $(SOURCES_LISP)
+ go build $@
clean:
rm -f $(BINS) mal