Skip to content

Commit ba04059

Browse files
committed
update Makefile
1 parent aa13e2d commit ba04059

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Makefile

+11-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
1-
GO?=go
2-
31
PROG=tftp-http-proxy
2+
PACKAGE=bwalex/$(PROG)
43
SOURCEDIR=.
54

5+
GO?=go
6+
GOPATH = $(CURDIR)/.gopath
7+
BASE = $(GOPATH)/src/$(PACKAGE)
8+
69
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
710

8-
dist/$(PROG): $(SOURCES)
9-
$(GO) build -o $@
11+
dist/$(PROG): $(SOURCES) | $(BASE)
12+
cd $(BASE) && GOPATH=$(GOPATH) $(GO) build -o $@
13+
14+
$(BASE):
15+
@mkdir -p $(dir $@)
16+
@ln -sf $(CURDIR) $@
1017

1118
.PHONY: clean
1219
clean:

0 commit comments

Comments
 (0)