LWN-Simulator
LWN-Simulator copied to clipboard
Proposal for Makefile with GNU Make 4.4.1 Built for Windows
Install Make in Windows with chocolatey
>choco install make
--Rename folder LWN-Simulator with LWNSimulator
SUFFIX := ".exe"
clean:
@rmdir /s /q bin
install-dep:
@go install github.com/rakyll/statik
@go get -u -d ./...
build:
@echo "Building LWN Simulator"
@echo "Building User Web Interface"
@cd webserver && statik -src=public -f 1>NUL
@mkdir bin
@copy config.json bin\config.json
@echo "Building from the source.."
@go build -o bin/lwnsimulator${SUFFIX} cmd/main.go
@echo "Build Complete."
build-platform:
@echo "Building LWN Simulator"
@echo "Building User Web Interface"
@cd webserver && statik -src=public -f 1>NUL
@mkdir bin
@copy config.json bin\config.json
@echo "Building from the source.."
@go build -o bin/lwnsimulator${SUFFIX} cmd/main.go
@echo "Build Complete."
build-x64:
@make build-platform GOOS=windows GOARCH=amd64 SUFFIX="_x64.exe"
build-x86:
@make build-platform GOOS=windows GOARCH=386 SUFFIX="_x86.exe"
run:
@go run cmd/main.go