Skip to content

Commit

Permalink
Simplify makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyfdecyf committed Jan 29, 2013
1 parent 11363d1 commit d4ce55c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Makefile
@@ -1,26 +1,22 @@
# Use shadowsocks as command prefix to avoid name conflict
# Maybe ss-local/server is better because easier to type
PREFIX := shadowsocks
LOCAL := $(GOBIN)/$(PREFIX)-local
SERVER := $(GOBIN)/$(PREFIX)-server
LOCAL := $(GOPATH)/bin/$(PREFIX)-local
SERVER := $(GOPATH)/bin/$(PREFIX)-server
CGO := CGO_ENABLED=0

# TODO define the install package path for use in clean and detect whether
# package need re-build

all: $(LOCAL) $(SERVER) $(TEST)

.PHONY: clean

clean:
rm -rf $(LOCAL) $(SERVER) $(TEST)
rm -f $(LOCAL) $(SERVER) $(TEST)

# -a option is needed to ensure we disabled CGO
$(LOCAL): shadowsocks/*.go cmd/$(PREFIX)-local/*.go
cd shadowsocks; go install
cd cmd/$(PREFIX)-local; $(CGO) go install -a

$(SERVER): shadowsocks/*.go cmd/$(PREFIX)-server/*.go
cd shadowsocks; go install
cd cmd/$(PREFIX)-server; $(CGO) go install -a

local: $(LOCAL)
Expand Down

0 comments on commit d4ce55c

Please sign in to comment.