UniCT-ARSLab / LWN-Simulator

A LoRaWAN nodes' and network simulator that works with a real LoRaWAN environment (such as Chirpstack) and equipped with a web interface for real-time interaction.
MIT License
81 stars 50 forks source link

Proposal for Makefile with GNU Make 4.4.1 Built for Windows #33

Closed zplorer52 closed 4 weeks ago

zplorer52 commented 5 months ago

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
LightDestory commented 4 weeks ago

This issue has been addressed with https://github.com/UniCT-ARSLab/LWN-Simulator/commit/2649658d77db7afb84495ed05034d710afaefd86

Wait for the next release!