@ -1,28 +1,36 @@
TTY_SERVER = ./tty-server
TTY_SERVER = ./tty-server
TTY_SERVER_ASSETS = $( wildcard frontend/public/*)
TTY_SERVER_ASSETS = $( wildcard frontend/public/*) frontend/public/index.html
TTY_SERVER_SRC = $( wildcard *.go) assets_bundle.go
TTY_SERVER_SRC = $( wildcard *.go) assets_bundle.go
.PHONY : all frontend clean cleanfront rebuild
all : $( TTY_SERVER )
all : $( TTY_SERVER )
@echo "Done"
@echo "Done"
rebuild : clean all
# Building the server and tty-share
# Building the server and tty-share
$(TTY_SERVER) : $( TTY_SERVER_SRC )
$(TTY_SERVER) : $( TTY_SERVER_SRC )
go build -o $@
go build -o $@
assets_bundle.go : $( TTY_SERVER_ASSETS )
assets_bundle.go : $( TTY_SERVER_ASSETS )
go get github.com/go-bindata/go-bindata/...
go get github.com/go-bindata/go-bindata/...
go-bindata --prefix frontend/public/ -o $@ $^
go-bindata --prefix frontend/public/ -o $@ frontend/public/*
%.zip : %
%.zip : %
zip $@ $^
zip $@ $^
frontend : force
frontend : cleanfront frontend /public /index .html
frontend/public/index.html :
cd frontend && npm install && npm run build && cd -
cd frontend && npm install && npm run build && cd -
force :
clean :
cleanfront :
rm -fr tty-server assets_bundle.go frontend/public
rm -fr frontend/public
clean : cleanfront
rm -fr tty-server assets_bundle.go
@echo "Cleaned"
@echo "Cleaned"
## Development helper targets
## Development helper targets