mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-10 04:19:38 +02:00
89031c1bab
No more commented out code, and the finished product actually runs now. Also updated the readme to reflect the new build rules.
50 lines
1.3 KiB
Makefile
50 lines
1.3 KiB
Makefile
# Build tool for Factorio Server Manager
|
|
|
|
NODE_ENV:=production
|
|
|
|
#TODO add support for a mac build maybe?
|
|
UNAME := $(shell uname)
|
|
ifeq ($(UNAME), Linux)
|
|
release := build/factorio-server-manager-linux.zip
|
|
else
|
|
release := build/factorio-server-manager-windows.zip
|
|
endif
|
|
|
|
build: $(release)
|
|
|
|
$(shell mkdir -p build)
|
|
build/factorio-server-manager-%.zip: app/bundle.js factorio-server-manager-%
|
|
@echo "Packaging Build - $@"
|
|
@cp -r app/ factorio-server-manager/
|
|
@cp conf.json.example factorio-server-manager/conf.json
|
|
@zip -r $@ factorio-server-manager > /dev/null
|
|
@rm -r factorio-server-manager
|
|
|
|
app/bundle.js:
|
|
@echo "Building Frontend"
|
|
@cd ui && npm install && npm run build
|
|
|
|
factorio-server-manager-linux: godeps
|
|
@echo "Building Backend - Linux"
|
|
@GOPATH="${GOPATH}:${PDW}"
|
|
@mkdir -p factorio-server-manager
|
|
@GOOS=linux GOARCH=amd64 go build -o factorio-server-manager/factorio-server-manager ./src
|
|
|
|
factorio-server-manager-windows: godeps
|
|
@echo "Building Backend - Windows"
|
|
@GOPATH="${GOPATH}:${PDW}"
|
|
@mkdir -p factorio-server-manager
|
|
@GOOS=windows GOARCH=386 go build -o factorio-server-manager/factorio-server-manager.exe ./src
|
|
|
|
godeps:
|
|
@echo "Installing Packages"
|
|
@cat gopkglist | xargs go get
|
|
|
|
gen_release: build/factorio-server-manager-linux.zip build/factorio-server-manager-windows.zip
|
|
@echo "Done"
|
|
|
|
clean:
|
|
@echo "Cleaning"
|
|
@rm -r build/
|
|
@rm app/bundle.js
|