LWN-Simulator icon indicating copy to clipboard operation
LWN-Simulator copied to clipboard

Proposal for Makefile with GNU Make 4.4.1 Built for Windows

Open zplorer52 opened this issue 9 months ago • 0 comments

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

zplorer52 avatar May 23 '24 06:05 zplorer52