summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index cf4ae0d..a43c231 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+RELEASE_GOOS = openbsd
+RELEASE_GOARCH = amd64
+
SENSOR_SRC = SensorStation/SensorStation.ino
HVAC_SRC = HvacStation/HvacStation.ino
SERVER_SRC = server/*.go
@@ -14,6 +17,9 @@ server/server: ${SERVER_SRC}
go build -o $@ $^
gofmt -l -s -w $^
+release:
+ GOOS=${RELEASE_GOOS} GOARCH=${RELEASE_GOARCH} go build -o server/server ${SERVER_SRC}
+
SensorStation/build: ${SENSOR_SRC}
arduino-cli compile ${CFLAGS} SensorStation
echo "" > $@
@@ -35,4 +41,4 @@ upload_hvac: HvacStation/build
monitor:
arduino-cli monitor -b ${BOARD} -p ${PORT}
-.PHONY: monitor upload_sensor upload_hvac
+.PHONY: monitor upload_sensor upload_hvac release