brocaar / chirpstack-simulator

Simulator utility for the ChirpStack open-source LoRaWAN Network-Server.
https://www.chirpstack.io
MIT License
64 stars 51 forks source link

Add macos build support (tested on M2) #18

Open Schoonmoeder opened 3 months ago

Schoonmoeder commented 3 months ago

I managed to build it on macos (M2) but I needed to change the Build command slightly. please add / test following code in the make file

build-macos:
    @echo "Compiling source"
    @mkdir -p build
    env GOOS=darwin GOARCH=amd64 go build $(GO_EXTRA_BUILD_ARGS) -ldflags "-s -w -X main.version=$(VERSION)" -o build/chirpstack-simulator cmd/chirpstack-simulator/main.go

run docker-compose run --rm chirpstack-simulator make clean build-macos

now you are able to start it on mac and also create configs like in the readme.