Skip to content

Commit 06e3e45

Browse files
committed
Update kgc in makefile
1 parent 8173f63 commit 06e3e45

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ COLOUR_BLUE=\033[0;34m
2828
END_COLOUR=\033[0m
2929

3030
# Plugins
31-
NHP_PLUGINS = server/plugins
31+
NHP_PLUGINS = server/plugins
3232

3333
generate-version-and-build:
3434
@echo "$(COLOUR_BLUE)[OpenNHP] Start building... $(END_COLOUR)"
@@ -42,6 +42,7 @@ generate-version-and-build:
4242
@$(MAKE) serverd
4343
@$(MAKE) agentsdk
4444
@$(MAKE) devicesdk
45+
@$(MAKE) kgc
4546
@$(MAKE) plugins
4647
@$(MAKE) archive
4748
@echo "$(COLOUR_GREEN)[OpenNHP] Build for platform ${OS_NAME} successfully done!$(END_COLOUR)"
@@ -75,6 +76,15 @@ ifeq ($(OS_NAME), linux)
7576
# 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
7677
endif
7778

79+
# kgc module build rules
80+
kgc:
81+
@echo "$(COLOUR_BLUE)[KGC] Building KGC module... $(END_COLOUR)"
82+
mkdir -p ./release/kgc/etc
83+
@cd kgc/main && go build -trimpath -ldflags ${LD_FLAGS} -v -o ../../release/kgc/kgc ./main.go
84+
cp ./kgc/main/etc/*.toml ./release/kgc/etc/ 2>/dev/null || true
85+
@echo "$(COLOUR_GREEN)[KGC] Build completed!$(END_COLOUR)"
86+
87+
7888
plugins:
7989
@if test -d $(NHP_PLUGINS); then $(MAKE) -C $(NHP_PLUGINS); fi
8090

0 commit comments

Comments
 (0)