LEDController-old/Makefile

22 lines
552 B
Makefile
Executable File

BUILD=`date +%FT%T%z`
LDFLAGS=-ldflags "-X main.buildDate=${BUILD}"
.PHONY: build deps static
build:
go build ${LDFLAGS} -o ledcontroller-server cmd/ledcontroller-server/main.go
emulator:
go build ${LDFLAGS} -o emulator cmd/emulator/main.go
deps:
cd cmd/ledcontroller-server ; go get ; cd ../..
deps-emulator:
cd cmd/emulator ; go get ; cd ../..
# Static only makes sense for the server
static:
CGO_ENABLED=0 GOOS=linux go build ${LDFLAGS} -a -installsuffix cgo -o ledcontroller-server cmd/ledcontroller-server/main.go