From 90e68d703113a619f01b2a7af719fe418746fe6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Thu, 29 Aug 2019 15:57:15 +0800 Subject: [PATCH] =?UTF-8?q?Mod=20=20aaa-12=20=E4=BF=AE=E6=94=B9Makefile?= =?UTF-8?q?=E8=84=9A=E6=9C=AC=EF=BC=8C=E6=A0=B9=E6=8D=AE=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=99=A8=E9=80=89=E6=8B=A9=E5=B9=B3=E5=8F=B0=E5=90=8E=E7=BC=80?= =?UTF-8?q?=20RCA=EF=BC=9A=20SOL=EF=BC=9A=20=E4=BF=AE=E6=94=B9=E4=BA=BA?= =?UTF-8?q?=EF=BC=9Ahuangxin=20=E6=A3=80=E8=A7=86=E4=BA=BA=EF=BC=9Ahuangxi?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Common/common.Makefile | 18 ++---------------- Common/def.Makefile | 18 ++++++++++++++++++ Platform/build/module.cfgrcv.Makefile | 1 + Platform/build/module.conntrack.api.Makefile | 1 + Platform/build/module.conntrack.demoA.Makefile | 1 + Platform/build/module.conntrack.test.Makefile | 1 + Platform/build/module.klog_api.api.Makefile | 1 + Platform/build/module.klog_api.test.Makefile | 1 + Platform/build/module.netlink_api.Makefile | 1 + Platform/build/module.pdelivery.Makefile | 1 + Platform/build/module.rpdb.Makefile | 1 + Platform/build/module.trace_relay.Makefile | 1 + Platform/build/user.cfg2kernel.Makefile | 5 +++-- Platform/build/user.configm.Makefile | 5 +++-- Platform/build/user.configmapi.Makefile | 5 +++-- Platform/build/user.configmtest.Makefile | 5 +++-- Platform/build/user.database.Makefile | 1 + Platform/build/user.freeauth.Makefile | 5 +++-- Platform/build/user.logging.Makefile | 5 +++-- Platform/build/user.netlink_uapi.Makefile | 1 + Platform/build/user.openrpc.Makefile | 1 + Platform/build/user.pdeliv.rcvtest.Makefile | 5 +++-- Platform/build/user.pdeliv_u.Makefile | 5 +++-- Platform/build/user.pdelivrcv.test.Makefile | 1 + Platform/build/user.redismq.Makefile | 1 + Platform/build/user.rpdb.Makefile | 1 + Platform/build/user.trace.api.Makefile | 5 +++-- Platform/build/user.trace.test.Makefile | 5 +++-- Platform/build/user.ulog.api.Makefile | 1 + Platform/build/user.ulog.log_sched.Makefile | 5 +++-- Platform/build/user.ulog.ulog-test.Makefile | 5 +++-- Product/build/module.demo.Makefile | 1 + Product/build/module.khash.Makefile | 1 + Product/build/module.matchrule.Makefile | 1 + Product/build/user.demo.Makefile | 1 + Product/build/user.usermanager-auth.Makefile | 5 +++-- Product/build/user.usermanager-test.Makefile | 5 +++-- Product/build/user.web-auth.Makefile | 5 +++-- 38 files changed, 86 insertions(+), 46 deletions(-) create mode 100644 Common/def.Makefile diff --git a/Common/common.Makefile b/Common/common.Makefile index f53fb2e86..d053c24e5 100755 --- a/Common/common.Makefile +++ b/Common/common.Makefile @@ -21,20 +21,6 @@ ENABLE_MAKE_LOG ?= FALSE # 调试信息分离开关,默认开启 TARGET_STRIP ?= TRUE -# 定义各个平台编译工具,建议设置编译工具路径到 PATH 环境变量 -# CC : Cross Build Tools -# LD : Cross Link Tools -CC := gcc -OBJCOPY := objcopy -STRIP := strip -AR := ar - -ARM64_CROSS_CC := aarch64-linux-gnu-gcc -ARM64_CROSS_OBJCOPY := aarch64-linux-gnu-objcopy -ARM64_CROSS_STRIP := aarch64-linux-gnu-strip -ARM64_CROSS_AR := aarch64-linux-gnu-ar -ARM64_CROSS_AS := aarch64-linux-gnu-as - ifeq ($(TARGET_TYPE), KO) ARM64_CROSS_LD := aarch64-linux-gnu-ld LINUX_CROSS_LD := ld @@ -336,8 +322,8 @@ BUILD_TARGET := ifneq ($(UNMAKE_PROCESS), TRUE) # 定义最终生成目标文件名 -PLAT_ARM64_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-arm64$(TARGET_EXT) -PLAT_LINUX_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-linux$(TARGET_EXT) +PLAT_ARM64_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-$(ARM64_OBJ_TARGET)$(TARGET_EXT) +PLAT_LINUX_TARGET := $(TARGET_PREFIX)$(TARGET_NAME)-$(LINUX_OBJ_TARGET)$(TARGET_EXT) # ARM64 平台生成目标、编译参数、链接参数、依赖库 ifeq ($(PLAT_ARM64), TRUE) diff --git a/Common/def.Makefile b/Common/def.Makefile new file mode 100644 index 000000000..47e330957 --- /dev/null +++ b/Common/def.Makefile @@ -0,0 +1,18 @@ +SHELL := /bin/sh + +# 定义各个平台编译工具,建议设置编译工具路径到 PATH 环境变量 +# CC : Cross Build Tools +# LD : Cross Link Tools +CC := gcc +OBJCOPY := objcopy +STRIP := strip +AR := ar + +ARM64_CROSS_CC := aarch64-linux-gnu-gcc +ARM64_CROSS_OBJCOPY := aarch64-linux-gnu-objcopy +ARM64_CROSS_STRIP := aarch64-linux-gnu-strip +ARM64_CROSS_AR := aarch64-linux-gnu-ar +ARM64_CROSS_AS := aarch64-linux-gnu-as + +ARM64_OBJ_TARGET = $(shell $(ARM64_CROSS_CC) -print-multiarch | awk -F '-' '{print $$1}') +LINUX_OBJ_TARGET = $(shell $(CC) -print-multiarch | awk -F '-' '{print $$1}') \ No newline at end of file diff --git a/Platform/build/module.cfgrcv.Makefile b/Platform/build/module.cfgrcv.Makefile index b428b0b39..2a0a9cab3 100755 --- a/Platform/build/module.cfgrcv.Makefile +++ b/Platform/build/module.cfgrcv.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=cfgrcv diff --git a/Platform/build/module.conntrack.api.Makefile b/Platform/build/module.conntrack.api.Makefile index 89e768c1d..9df61aeea 100755 --- a/Platform/build/module.conntrack.api.Makefile +++ b/Platform/build/module.conntrack.api.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=conntrack_api diff --git a/Platform/build/module.conntrack.demoA.Makefile b/Platform/build/module.conntrack.demoA.Makefile index db84671d4..b3ed34ebd 100755 --- a/Platform/build/module.conntrack.demoA.Makefile +++ b/Platform/build/module.conntrack.demoA.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=demoA diff --git a/Platform/build/module.conntrack.test.Makefile b/Platform/build/module.conntrack.test.Makefile index be779e9c3..83809119e 100755 --- a/Platform/build/module.conntrack.test.Makefile +++ b/Platform/build/module.conntrack.test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=test diff --git a/Platform/build/module.klog_api.api.Makefile b/Platform/build/module.klog_api.api.Makefile index 2159eac97..28f884186 100644 --- a/Platform/build/module.klog_api.api.Makefile +++ b/Platform/build/module.klog_api.api.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=klog_api diff --git a/Platform/build/module.klog_api.test.Makefile b/Platform/build/module.klog_api.test.Makefile index 0d4bfa64b..b63019871 100644 --- a/Platform/build/module.klog_api.test.Makefile +++ b/Platform/build/module.klog_api.test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=test_klog_api diff --git a/Platform/build/module.netlink_api.Makefile b/Platform/build/module.netlink_api.Makefile index 0a40ed018..3cfec469a 100755 --- a/Platform/build/module.netlink_api.Makefile +++ b/Platform/build/module.netlink_api.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=netlink diff --git a/Platform/build/module.pdelivery.Makefile b/Platform/build/module.pdelivery.Makefile index 7737dfba7..d46f356c0 100755 --- a/Platform/build/module.pdelivery.Makefile +++ b/Platform/build/module.pdelivery.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=pdeliv diff --git a/Platform/build/module.rpdb.Makefile b/Platform/build/module.rpdb.Makefile index a11fcfa4e..8ece21501 100755 --- a/Platform/build/module.rpdb.Makefile +++ b/Platform/build/module.rpdb.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=rpdb diff --git a/Platform/build/module.trace_relay.Makefile b/Platform/build/module.trace_relay.Makefile index 869a01bc0..6006ae893 100755 --- a/Platform/build/module.trace_relay.Makefile +++ b/Platform/build/module.trace_relay.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=trace_relay diff --git a/Platform/build/user.cfg2kernel.Makefile b/Platform/build/user.cfg2kernel.Makefile index ba686650e..571d939b8 100755 --- a/Platform/build/user.cfg2kernel.Makefile +++ b/Platform/build/user.cfg2kernel.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=cfgchannel_sample @@ -41,8 +42,8 @@ PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS) PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) -ARM64_LIBS := -lnetlinku-arm64 -LINUX_LIBS := -lnetlinku-linux +ARM64_LIBS := -lnetlinku-$(ARM64_OBJ_TARGET) +LINUX_LIBS := -lnetlinku-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.configm.Makefile b/Platform/build/user.configm.Makefile index 9536bcef2..a4674a41a 100755 --- a/Platform/build/user.configm.Makefile +++ b/Platform/build/user.configm.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=configm @@ -60,10 +61,10 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lnetlinku-arm64 -lredismq-arm64 -lulogapi-arm64 -ldatabase-arm64 +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) ARM64_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev -ldl -LINUX_LIBS := -lopenrpc-linux -lnetlinku-linux -lredismq-linux -lulogapi-linux -ldatabase-linux +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lnetlinku-$(LINUX_OBJ_TARGET) -lredismq-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) LINUX_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev -ldl diff --git a/Platform/build/user.configmapi.Makefile b/Platform/build/user.configmapi.Makefile index 4088ab60c..be67dc2b3 100644 --- a/Platform/build/user.configmapi.Makefile +++ b/Platform/build/user.configmapi.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libconfigmapi @@ -43,8 +44,8 @@ PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lpthread -lm -lev -LINUX_LIBS := -lopenrpc-linux -lpthread -lm -lev +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lpthread -lm -lev +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lpthread -lm -lev # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.configmtest.Makefile b/Platform/build/user.configmtest.Makefile index 869359e99..df2ff7dfb 100644 --- a/Platform/build/user.configmtest.Makefile +++ b/Platform/build/user.configmtest.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=configmtest @@ -42,8 +43,8 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lconfigmapi-arm64 -lpthread -lm -lev -LINUX_LIBS := -lopenrpc-linux -lconfigmapi-linux -lpthread -lm -lev +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lconfigmapi-$(ARM64_OBJ_TARGET) -lpthread -lm -lev +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lconfigmapi-$(LINUX_OBJ_TARGET) -lpthread -lm -lev # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.database.Makefile b/Platform/build/user.database.Makefile index 7397e9a01..e569fc771 100644 --- a/Platform/build/user.database.Makefile +++ b/Platform/build/user.database.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libdatabase diff --git a/Platform/build/user.freeauth.Makefile b/Platform/build/user.freeauth.Makefile index 28241f7a1..f97de4cec 100755 --- a/Platform/build/user.freeauth.Makefile +++ b/Platform/build/user.freeauth.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=freeauth @@ -42,10 +43,10 @@ PLAT_ARM64_LDFLAGS := -L ../../Platform/build/debug PLAT_LINUX_LDFLAGS := $(PLAT_LINUX_LDFLAGS) #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lnetlinku-arm64 -lredismq-arm64 -lulogapi-arm64 -ldatabase-arm64 +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) ARM64_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lev -LINUX_LIBS := -lopenrpc-linux -lnetlinku-linux -lredismq-linux -lulogapi-linux -ldatabase-linux +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lnetlinku-$(LINUX_OBJ_TARGET) -lredismq-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) LINUX_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lev # this line must be at below of thus, because of... diff --git a/Platform/build/user.logging.Makefile b/Platform/build/user.logging.Makefile index 8d9cbaf1f..da17f5570 100755 --- a/Platform/build/user.logging.Makefile +++ b/Platform/build/user.logging.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=logging @@ -42,8 +43,8 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lulogapi-arm64 -lconfigmapi-arm64 -lpthread -lcjson -lev -lm -LINUX_LIBS := -lopenrpc-linux -lulogapi-linux -lconfigmapi-linux -lpthread -lcjson -lev -lm +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -lconfigmapi-$(ARM64_OBJ_TARGET) -lpthread -lcjson -lev -lm +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -lconfigmapi-$(LINUX_OBJ_TARGET) -lpthread -lcjson -lev -lm # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.netlink_uapi.Makefile b/Platform/build/user.netlink_uapi.Makefile index 08240686d..c59f1c27d 100755 --- a/Platform/build/user.netlink_uapi.Makefile +++ b/Platform/build/user.netlink_uapi.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libnetlinku diff --git a/Platform/build/user.openrpc.Makefile b/Platform/build/user.openrpc.Makefile index e4b1fb3db..19e50a6d1 100755 --- a/Platform/build/user.openrpc.Makefile +++ b/Platform/build/user.openrpc.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libopenrpc diff --git a/Platform/build/user.pdeliv.rcvtest.Makefile b/Platform/build/user.pdeliv.rcvtest.Makefile index 503f60ba0..5544ade56 100644 --- a/Platform/build/user.pdeliv.rcvtest.Makefile +++ b/Platform/build/user.pdeliv.rcvtest.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=pdeliv_rcvtest @@ -41,8 +42,8 @@ PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS) PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) -ARM64_LIBS := -lnetlinku-arm64 -LINUX_LIBS := -lnetlinku-linux +ARM64_LIBS := -lnetlinku-$(ARM64_OBJ_TARGET) +LINUX_LIBS := -lnetlinku-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.pdeliv_u.Makefile b/Platform/build/user.pdeliv_u.Makefile index f46ead352..c8c06f2ef 100755 --- a/Platform/build/user.pdeliv_u.Makefile +++ b/Platform/build/user.pdeliv_u.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=pdeliv @@ -41,8 +42,8 @@ PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS) PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) -ARM64_LIBS := -lnetlinku-arm64 -LINUX_LIBS := -lnetlinku-linux +ARM64_LIBS := -lnetlinku-$(ARM64_OBJ_TARGET) +LINUX_LIBS := -lnetlinku-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.pdelivrcv.test.Makefile b/Platform/build/user.pdelivrcv.test.Makefile index ad63b7564..d2133d60d 100644 --- a/Platform/build/user.pdelivrcv.test.Makefile +++ b/Platform/build/user.pdelivrcv.test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=pdeliv diff --git a/Platform/build/user.redismq.Makefile b/Platform/build/user.redismq.Makefile index 45f888b52..14bbdbdb1 100644 --- a/Platform/build/user.redismq.Makefile +++ b/Platform/build/user.redismq.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libredismq diff --git a/Platform/build/user.rpdb.Makefile b/Platform/build/user.rpdb.Makefile index ccbbc55e2..f17a52c3c 100644 --- a/Platform/build/user.rpdb.Makefile +++ b/Platform/build/user.rpdb.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=librpdb diff --git a/Platform/build/user.trace.api.Makefile b/Platform/build/user.trace.api.Makefile index e48e37742..741818d2a 100755 --- a/Platform/build/user.trace.api.Makefile +++ b/Platform/build/user.trace.api.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libtraceapi @@ -43,8 +44,8 @@ PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -lnetlinku-arm64 -LINUX_LIBS := -lnetlinku-linux +ARM64_LIBS := -lnetlinku-$(ARM64_OBJ_TARGET) +LINUX_LIBS := -lnetlinku-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.trace.test.Makefile b/Platform/build/user.trace.test.Makefile index d750b6bf4..ebc8d06f8 100755 --- a/Platform/build/user.trace.test.Makefile +++ b/Platform/build/user.trace.test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=test-trace @@ -41,8 +42,8 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := #gcc libs -ARM64_LIBS := -ltraceapi-arm64 -lnetlinku-arm64 -lpthread -LINUX_LIBS := -ltraceapi-linux -lnetlinku-linux -lpthread +ARM64_LIBS := -ltraceapi-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lpthread +LINUX_LIBS := -ltraceapi-$(LINUX_OBJ_TARGET) -lnetlinku-$(LINUX_OBJ_TARGET) -lpthread # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.ulog.api.Makefile b/Platform/build/user.ulog.api.Makefile index e0cad6646..0284820e9 100755 --- a/Platform/build/user.ulog.api.Makefile +++ b/Platform/build/user.ulog.api.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libulogapi diff --git a/Platform/build/user.ulog.log_sched.Makefile b/Platform/build/user.ulog.log_sched.Makefile index 721d9168b..17b204275 100755 --- a/Platform/build/user.ulog.log_sched.Makefile +++ b/Platform/build/user.ulog.log_sched.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=log-sched @@ -42,8 +43,8 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lulogapi-arm64 -lpthread -lm -lev -LINUX_LIBS := -lopenrpc-linux -lulogapi-linux -lpthread -lm -lev +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -lpthread -lm -lev +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -lpthread -lm -lev # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Platform/build/user.ulog.ulog-test.Makefile b/Platform/build/user.ulog.ulog-test.Makefile index 4986b5f72..ce5b2b291 100644 --- a/Platform/build/user.ulog.ulog-test.Makefile +++ b/Platform/build/user.ulog.ulog-test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=test_ulog_api @@ -42,8 +43,8 @@ PLAT_ARM64_LDFLAGS := PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -lopenrpc-arm64 -lulogapi-arm64 -lpthread -lm -lev -LINUX_LIBS := -lopenrpc-linux -lulogapi-linux -lpthread -lm -lev +ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -lpthread -lm -lev +LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -lpthread -lm -lev # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Product/build/module.demo.Makefile b/Product/build/module.demo.Makefile index d2f9ad978..e5fa94657 100755 --- a/Product/build/module.demo.Makefile +++ b/Product/build/module.demo.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=demo diff --git a/Product/build/module.khash.Makefile b/Product/build/module.khash.Makefile index e8420b73c..268df0d58 100644 --- a/Product/build/module.khash.Makefile +++ b/Product/build/module.khash.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=khashtable diff --git a/Product/build/module.matchrule.Makefile b/Product/build/module.matchrule.Makefile index 37f78e158..3031ea56c 100755 --- a/Product/build/module.matchrule.Makefile +++ b/Product/build/module.matchrule.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=matchrule diff --git a/Product/build/user.demo.Makefile b/Product/build/user.demo.Makefile index 808e00df3..05e4cfc79 100755 --- a/Product/build/user.demo.Makefile +++ b/Product/build/user.demo.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=demo diff --git a/Product/build/user.usermanager-auth.Makefile b/Product/build/user.usermanager-auth.Makefile index 5a47c305a..adb7c499d 100644 --- a/Product/build/user.usermanager-auth.Makefile +++ b/Product/build/user.usermanager-auth.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=libuserauthapi @@ -43,10 +44,10 @@ PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) PLATLIB_DIR := ../../Platform/build/debug #gcc libs -ARM64_LIBS := -ldatabase-arm64 +ARM64_LIBS := -ldatabase-$(ARM64_OBJ_TARGET) ARM64_LIBS += -lcjson -lpthread -lm -lodbc -LINUX_LIBS := -ldatabase-linux +LINUX_LIBS := -ldatabase-$(LINUX_OBJ_TARGET) LINUX_LIBS += -lcjson -lpthread -lm -lodbc # this line must be at below of thus, because of... diff --git a/Product/build/user.usermanager-test.Makefile b/Product/build/user.usermanager-test.Makefile index 298b67fae..dc1171f0e 100644 --- a/Product/build/user.usermanager-test.Makefile +++ b/Product/build/user.usermanager-test.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=usermanager-test @@ -54,10 +55,10 @@ PLATLIB_DIR := ../../Platform/build/debug COMMON_LIBS := -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -ldl #gcc libs ARM64_LIBS := $(COMMON_LIBS) -ARM64_LIBS += -luserauthapi-arm64 -lredismq-arm64 -ldatabase-arm64 +ARM64_LIBS += -luserauthapi-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) LINUX_LIBS := $(COMMON_LIBS) -LINUX_LIBS += -luserauthapi-linux -lredismq-linux -ldatabase-linux +LINUX_LIBS += -luserauthapi-$(LINUX_OBJ_TARGET) -lredismq-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile diff --git a/Product/build/user.web-auth.Makefile b/Product/build/user.web-auth.Makefile index b33eb9878..9a1d05000 100644 --- a/Product/build/user.web-auth.Makefile +++ b/Product/build/user.web-auth.Makefile @@ -1,3 +1,4 @@ +include ../../Common/def.Makefile # target name, the target name must have the same name of c source file TARGET_NAME=webauth @@ -42,8 +43,8 @@ PLAT_ARM64_LDFLAGS := -L ../../Platform/build/debug PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) #gcc libs -ARM64_LIBS := -luserauthapi-arm64 -ldatabase-arm64 -LINUX_LIBS := -lcjson -luserauthapi-linux -ldatabase-linux +ARM64_LIBS := -luserauthapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) +LINUX_LIBS := -lcjson -luserauthapi-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) # this line must be at below of thus, because of... include ../../Common/common.Makefile