diff --git a/Makefile b/Makefile index 92b6d12..f7c1272 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) REPO_GOPATH=$(REPO)/go MINIFY=$(REPO_GOPATH)/bin/minify -JS=$(REPO)/contrib/static/nntpchan.js +STATIC_DIR=$(REPO)/contrib/static +JS=$(STATIC_DIR)/nntpchan.js +MINER_JS=$(STATIC_DIR)/miner-js.js CONTRIB_JS=$(REPO)/contrib/js/contrib LOCAL_JS=$(REPO)/contrib/js/nntpchan VENDOR_JS=$(REPO)/contrib/js/vendor @@ -15,15 +17,12 @@ NNTPD=$(REPO)/nntpd GOROOT=$(shell go env GOROOT) GO=$(GOROOT)/bin/go -<<<<<<< HEAD GOPHERJS_GOROOT ?= $(GOROOT) GOPHERJS_GO = $(GOPHERJS_GOROOT)/bin/go GOPHERJS_GOPATH=$(REPO)/gopherjs_go GOPHERJS=$(GOPHERJS_GOPATH)/bin/gopherjs -======= ->>>>>>> parent of c342687... re add pow captcha (initial) all: clean build build: js srnd @@ -32,29 +31,24 @@ full: clean full-build full-build: srnd beta native -js: $(JS) +js: $(JS) srnd: $(SRND) $(MINIFY): -<<<<<<< HEAD GOPATH=$(REPO_GOPATH) $(GO) get -v github.com/tdewolff/minify/cmd/minify $(GOPHERJS): GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS_GO) get -v github.com/gopherjs/gopherjs -js-deps: $(MINIFY) $(MINER_JS) +js-deps: $(MINIFY) $(MINER_JS): $(GOPHERJS) $(MINIFY) + rm -rf $(GOPHERJS_GOPATH)/pkg/ cp -rf $(SRND_DIR)/src/github.com $(GOPHERJS_GOPATH)/src/ - GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS) -m -v build github.com/ZiRo-/cuckgo/miner_js - $(MINIFY) --mime=text/javascript > $(STATIC_DIR)/miner-js.js < miner_js.js - rm -f miner_js.js.map miner_js.js -======= - GOPATH=$(REPO_GOPATH) go get -v github.com/tdewolff/minify/cmd/minify - -js-deps: $(MINIFY) ->>>>>>> parent of c342687... re add pow captcha (initial) + GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS) -m -v build github.com/ZiRo-/cuckgo/miner_js -o miner.js + $(MINIFY) --mime=text/javascript > $(STATIC_DIR)/miner-js.js < miner.js + rm -f miner.js.map miner.js $(JS): js-deps rm -f $(JS) @@ -94,16 +88,16 @@ test-native: GOROOT=$(GOROOT) $(MAKE) -C $(NNTPCHAN_DAEMON_DIR) test -clean: clean-js clean-srnd +clean: clean-srnd clean-js -clean-full: clean clean-beta clean-native +clean-full: clean clean-beta clean-native clean-js clean-srnd: rm -f $(SRND) GOROOT=$(GOROOT) $(MAKE) -C $(SRND_DIR) clean clean-js: - rm -f $(JS) + rm -f $(JS) $(MINER_JS) clean-beta: rm -f $(NNTPCHAND)