From 06e3e4545ee9cb5321da1a7abfbdc9de0bcce9a8 Mon Sep 17 00:00:00 2001 From: Max-zs Date: Sat, 30 Nov 2024 22:08:46 +0800 Subject: [PATCH] Update kgc in makefile --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 804b915b..de5ca032 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ COLOUR_BLUE=\033[0;34m END_COLOUR=\033[0m # Plugins -NHP_PLUGINS = server/plugins +NHP_PLUGINS = server/plugins generate-version-and-build: @echo "$(COLOUR_BLUE)[OpenNHP] Start building... $(END_COLOUR)" @@ -42,6 +42,7 @@ generate-version-and-build: @$(MAKE) serverd @$(MAKE) agentsdk @$(MAKE) devicesdk + @$(MAKE) kgc @$(MAKE) plugins @$(MAKE) archive @echo "$(COLOUR_GREEN)[OpenNHP] Build for platform ${OS_NAME} successfully done!$(END_COLOUR)" @@ -75,6 +76,15 @@ ifeq ($(OS_NAME), linux) # gcc ./core/sdkdemo/nhp-device-demo.c -I ./release/nhp-device -I ./core/main -l:nhpdevice.so -L./release/nhp-device -Wl,-rpath=. -o ./release/nhp-device/nhp-device-demo endif +# kgc module build rules +kgc: + @echo "$(COLOUR_BLUE)[KGC] Building KGC module... $(END_COLOUR)" + mkdir -p ./release/kgc/etc + @cd kgc/main && go build -trimpath -ldflags ${LD_FLAGS} -v -o ../../release/kgc/kgc ./main.go + cp ./kgc/main/etc/*.toml ./release/kgc/etc/ 2>/dev/null || true + @echo "$(COLOUR_GREEN)[KGC] Build completed!$(END_COLOUR)" + + plugins: @if test -d $(NHP_PLUGINS); then $(MAKE) -C $(NHP_PLUGINS); fi