fiux
This commit is contained in:
parent
6abc6f4021
commit
3eb2c0df0d
28
Makefile
28
Makefile
@ -1,7 +1,9 @@
|
|||||||
REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
REPO=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||||
REPO_GOPATH=$(REPO)/go
|
REPO_GOPATH=$(REPO)/go
|
||||||
MINIFY=$(REPO_GOPATH)/bin/minify
|
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
|
CONTRIB_JS=$(REPO)/contrib/js/contrib
|
||||||
LOCAL_JS=$(REPO)/contrib/js/nntpchan
|
LOCAL_JS=$(REPO)/contrib/js/nntpchan
|
||||||
VENDOR_JS=$(REPO)/contrib/js/vendor
|
VENDOR_JS=$(REPO)/contrib/js/vendor
|
||||||
@ -15,15 +17,12 @@ NNTPD=$(REPO)/nntpd
|
|||||||
GOROOT=$(shell go env GOROOT)
|
GOROOT=$(shell go env GOROOT)
|
||||||
GO=$(GOROOT)/bin/go
|
GO=$(GOROOT)/bin/go
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
GOPHERJS_GOROOT ?= $(GOROOT)
|
GOPHERJS_GOROOT ?= $(GOROOT)
|
||||||
GOPHERJS_GO = $(GOPHERJS_GOROOT)/bin/go
|
GOPHERJS_GO = $(GOPHERJS_GOROOT)/bin/go
|
||||||
|
|
||||||
GOPHERJS_GOPATH=$(REPO)/gopherjs_go
|
GOPHERJS_GOPATH=$(REPO)/gopherjs_go
|
||||||
GOPHERJS=$(GOPHERJS_GOPATH)/bin/gopherjs
|
GOPHERJS=$(GOPHERJS_GOPATH)/bin/gopherjs
|
||||||
|
|
||||||
=======
|
|
||||||
>>>>>>> parent of c342687... re add pow captcha (initial)
|
|
||||||
all: clean build
|
all: clean build
|
||||||
|
|
||||||
build: js srnd
|
build: js srnd
|
||||||
@ -37,24 +36,19 @@ js: $(JS)
|
|||||||
srnd: $(SRND)
|
srnd: $(SRND)
|
||||||
|
|
||||||
$(MINIFY):
|
$(MINIFY):
|
||||||
<<<<<<< HEAD
|
|
||||||
GOPATH=$(REPO_GOPATH) $(GO) get -v github.com/tdewolff/minify/cmd/minify
|
GOPATH=$(REPO_GOPATH) $(GO) get -v github.com/tdewolff/minify/cmd/minify
|
||||||
|
|
||||||
$(GOPHERJS):
|
$(GOPHERJS):
|
||||||
GOROOT=$(GOPHERJS_GOROOT) GOPATH=$(GOPHERJS_GOPATH) $(GOPHERJS_GO) get -v github.com/gopherjs/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)
|
$(MINER_JS): $(GOPHERJS) $(MINIFY)
|
||||||
|
rm -rf $(GOPHERJS_GOPATH)/pkg/
|
||||||
cp -rf $(SRND_DIR)/src/github.com $(GOPHERJS_GOPATH)/src/
|
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
|
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.js
|
$(MINIFY) --mime=text/javascript > $(STATIC_DIR)/miner-js.js < miner.js
|
||||||
rm -f miner_js.js.map miner_js.js
|
rm -f miner.js.map miner.js
|
||||||
=======
|
|
||||||
GOPATH=$(REPO_GOPATH) go get -v github.com/tdewolff/minify/cmd/minify
|
|
||||||
|
|
||||||
js-deps: $(MINIFY)
|
|
||||||
>>>>>>> parent of c342687... re add pow captcha (initial)
|
|
||||||
|
|
||||||
$(JS): js-deps
|
$(JS): js-deps
|
||||||
rm -f $(JS)
|
rm -f $(JS)
|
||||||
@ -94,16 +88,16 @@ test-native:
|
|||||||
GOROOT=$(GOROOT) $(MAKE) -C $(NNTPCHAN_DAEMON_DIR) test
|
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:
|
clean-srnd:
|
||||||
rm -f $(SRND)
|
rm -f $(SRND)
|
||||||
GOROOT=$(GOROOT) $(MAKE) -C $(SRND_DIR) clean
|
GOROOT=$(GOROOT) $(MAKE) -C $(SRND_DIR) clean
|
||||||
|
|
||||||
clean-js:
|
clean-js:
|
||||||
rm -f $(JS)
|
rm -f $(JS) $(MINER_JS)
|
||||||
|
|
||||||
clean-beta:
|
clean-beta:
|
||||||
rm -f $(NNTPCHAND)
|
rm -f $(NNTPCHAND)
|
||||||
|
Reference in New Issue
Block a user