From cdbf962bf55c9b68793c06e604cd137b8d9d4907 Mon Sep 17 00:00:00 2001 From: harshabose Date: Sun, 13 Jul 2025 15:22:29 +0530 Subject: [PATCH] added delivery targets to Makefile --- Makefile | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Makefile b/Makefile index db715ca..9153bb7 100644 --- a/Makefile +++ b/Makefile @@ -392,6 +392,19 @@ run-fpv-drone: check-cgo-enabled cd $(BUILD_DIR)/fpv/drone && \ $(CGO_RUNTIME_ENV) ./skyline_sonata.fpv.drone +build-delivery-drone: check check-cgo-enabled + echo "Building fpv drone binary with CGO support..." + rm -rf $(BUILD_DIR)/delivery/drone + mkdir -p $(BUILD_DIR)/delivery/drone + cd $(CMD_DIR)/delivery/drone && \ + $(CGO_RUNTIME_ENV) go build -tags cgo_enabled -o $(BUILD_DIR)/delivery/drone/skyline_sonata.delivery.drone $(LDFLAGS) . || (echo "Build failed"; exit 1) + echo "Delivery drone binary built successfully at $(BUILD_DIR)/delivery/drone" + +run-delivery-drone: check-cgo-enabled + echo "Running delivery drone with CGO support..." + cd $(BUILD_DIR)/delivery/drone && \ + $(CGO_RUNTIME_ENV) ./skyline_sonata.delivery.drone + # Non-CGO build targets build-fpv-gcs: check echo "Building fpv gcs binary without CGO..." @@ -406,6 +419,19 @@ run-fpv-gcs: cd $(BUILD_DIR)/fpv/gcs && \ $(RUNTIME_ENV) ./skyline_sonata.fpv.gcs +build-delivery-gcs: check + echo "Building delivery gcs binary without CGO..." + rm -rf $(BUILD_DIR)/delivery/gcs + mkdir -p $(BUILD_DIR)/delivery/gcs + cd $(CMD_DIR)/delivery/gcs && \ + $(RUNTIME_ENV) CGO_ENABLED=0 go build -o $(BUILD_DIR)/delivery/gcs/skyline_sonata.delivery.gcs $(LDFLAGS) . || (echo "Build failed"; exit 1) + echo "Delivery gcs binary built successfully at $(BUILD_DIR)/delivery/gcs" + +run-delivery-gcs: + echo "Running delivery gcs without CGO..." + cd $(BUILD_DIR)/delivery/gcs && \ + $(RUNTIME_ENV) ./skyline_sonata.delivery.gcs + build-simple-rtsp-server: echo "Building simple rtsp server" rm -rf $(BUILD_DIR)/rtsp/server