Mod aaa-12 规范化Makefile文件

RCA:
SOL:
修改人:huangxin
检视人:huangxin
This commit is contained in:
黄昕 2019-08-29 16:21:07 +08:00
parent 90e68d7031
commit 7adce9a857
9 changed files with 99 additions and 63 deletions

View File

@ -1,5 +1,5 @@
include ../../Common/def.Makefile
include ../../Common/def.Makefile
# target name, the target name must have the same name of c source file
TARGET_NAME=configm
@ -23,7 +23,13 @@ DEBUG = TRUE
PLAT_LINUX ?= TRUE
PLAT_ARM64 ?= TRUE
VPATH = ../user/configm/config-server
VPATH = ../user/configm/config-server \
../user/configm/config-server/netconfig/bridge \
../user/configm/config-server/web_config \
../user/configm/config-server/dhcp_config \
../user/configm/config-server/user_manager_config \
../user/configm/config-server/log_config
# source code
# set the source file, don't used .o because of ...
@ -31,18 +37,39 @@ VPATH = ../user/configm/config-server
COMMON_SRCS = configserver.c \
netconfig/parsefile.c netconfig/ifconfig.c netconfig/netmain.c\
netconfig/ipconfig/ipconfig.c \
netconfig/bridge/brconfig.c netconfig/bridge/brnetlink.c \
netconfig/bridge/libbridge/libbridge_if.c netconfig/bridge/libbridge/libbridge_init.c netconfig/bridge/libbridge/libbridge_devif.c\
web_config/config-adm/user_authpara.c \
web_config/config-adm/user_authfree.c \
web_config/authfree.c web_config/auth_parameters.c web_config/auth_recover_config.c \
user_manager_config/user_recover_config.c user_manager_config/user_group_config.c user_manager_config/user_account_config.c user_manager_config/usermanager-server/array_index.c \
user_manager_config/usermanager-server/user_group.c user_manager_config/usermanager-server/user_mod.c user_manager_config/usermanager-server/user.c \
log_config/log_config_console.c log_config/log_config_init.c log_config/log_config_cm.c log_config/log_config_monitor.c log_config/log_config_remote.c log_config/log_config_file.c \
brconfig.c \
brnetlink.c \
libbridge/libbridge_if.c \
libbridge/libbridge_init.c \
libbridge/libbridge_devif.c\
config-adm/user_authpara.c \
config-adm/user_authfree.c \
authfree.c \
auth_parameters.c \
auth_recover_config.c \
user_recover_config.c \
user_group_config.c \
user_account_config.c \
usermanager-server/array_index.c \
usermanager-server/user_group.c \
usermanager-server/user_mod.c \
usermanager-server/user.c \
log_config_console.c \
log_config_init.c \
log_config_cm.c \
log_config_monitor.c \
log_config_remote.c \
log_config_file.c \
nat_config/natconfig.c \
vlan_config/vlan_config.c \
dhcp_config/dhcp_client_config.c dhcp_config/dhcp_dhcpd_lease.c dhcp_config/dhcp_host_config.c dhcp_config/dhcp_lib.c dhcp_config/dhcp_relay_config.c dhcp_config/dhcp_shared_network_config.c dhcp_config/dhcp_subnet_config.c\
static_routing_config/static_routing_config.c \
dhcp_client_config.c \
dhcp_dhcpd_lease.c \
dhcp_host_config.c \
dhcp_lib.c \
dhcp_relay_config.c \
dhcp_shared_network_config.c \
dhcp_subnet_config.c\
static_routing_config/static_routing_config.c
@ -51,7 +78,11 @@ PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
COMMOM_CFLAGS = -I../user/configm/config-server/include -I../../Common -I../common/redismq -I../common/database -I../common/configm -I../common/rpc -I../common/rpc/hashtable -I../common/ulog -I../user/configm/config-server/netconfig/ -I../user/configm/config-server/netconfig/bridge/include
COMMOM_CFLAGS = -I../user/configm/config-server/include \
-I../../Common -I../common/redismq -I../common/database \
-I../common/configm -I../common/rpc -I../common/rpc/hashtable \
-I../common/ulog -I../user/configm/config-server/netconfig/ \
-I../user/configm/config-server/netconfig/bridge/include
# gcc CFLAGS
PLAT_ARM64_CFLAGS := $(COMMOM_CFLAGS)
@ -60,12 +91,13 @@ PLAT_LINUX_CFLAGS := $(COMMOM_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS :=
COMMON_STD_LIB := -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev -ldl
#gcc libs
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
ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET)
ARM64_LIBS += -lulogapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) $(COMMON_STD_LIB)
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
LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lnetlinku-$(LINUX_OBJ_TARGET) -lredismq-$(LINUX_OBJ_TARGET)
LINUX_LIBS += -lulogapi-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) $(COMMON_STD_LIB)
# this line must be at below of thus, because of...

View File

@ -2,19 +2,19 @@ include ../../Common/def.Makefile
# target name, the target name must have the same name of c source file
TARGET_NAME=freeauth
# target
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = EXE
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = APP
# custom install dir
TARGET_BOX =
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
@ -34,7 +34,7 @@ COMMON_SRCS = auth_parameters.c \
PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
COMMOM_CFLAGS = -DUSED_MAIN -I../user/configm/config-server/include -I../../Common -I../common/redismq -I../common/database -I../common/configm -I../common/rpc -I../common/rpc/hashtable -I../common/ulog -I../user/configm/config-server/netconfig/ -I../user/configm/config-server/netconfig/bridge/include
COMMOM_CFLAGS = -DUSED_MAIN -I../user/configm/config-server/include -I../../Common -I../common/redismq -I../common/database -I../common/configm -I../common/rpc -I../common/rpc/hashtable -I../common/ulog -I../user/configm/config-server/netconfig/ -I../user/configm/config-server/netconfig/bridge/include
# gcc CFLAGS
PLAT_ARM64_CFLAGS := $(COMMOM_CFLAGS) -I../thirdparty/arm64/usr/local/include
PLAT_LINUX_CFLAGS := $(COMMOM_CFLAGS) -I../thirdparty/x86_64/usr/local/include
@ -42,14 +42,15 @@ PLAT_LINUX_CFLAGS := $(COMMOM_CFLAGS) -I../thirdparty/x86_64/usr/local/include
PLAT_ARM64_LDFLAGS := -L ../../Platform/build/debug
PLAT_LINUX_LDFLAGS := $(PLAT_LINUX_LDFLAGS)
COMMON_STD_LIB := -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lev
#gcc libs
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
ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lnetlinku-$(ARM64_OBJ_TARGET) -lredismq-$(ARM64_OBJ_TARGET)
ARM64_LIBS += -lulogapi-$(ARM64_OBJ_TARGET) -ldatabase-$(ARM64_OBJ_TARGET) $(COMMON_STD_LIB)
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
LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lnetlinku-$(LINUX_OBJ_TARGET) -lredismq-$(LINUX_OBJ_TARGET)
LINUX_LIBS += -lulogapi-$(LINUX_OBJ_TARGET) -ldatabase-$(LINUX_OBJ_TARGET) $(COMMON_STD_LIB)
# this line must be at below of thus, because of...
# this line must be at below of thus, because of...
include ../../Common/common.Makefile
ifneq ($(MAKECMDGOALS), clean)

View File

@ -35,16 +35,18 @@ PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
PLAT_ARM64_CFLAGS := -fPIC -I../../Common -I../common -I../common/rpc -I../common/configm -I../common/ulog -I../user/ulog -I../user/configm/config-server/include
PLAT_ARM64_CFLAGS := -fPIC -I../../Common -I../common -I../common/rpc -I../common/configm \
-I../common/ulog -I../user/ulog -I../user/configm/config-server/include
PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS)
COMMON_STD_LIB := -lpthread -lcjson -lev -lm
#gcc libs
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
ARM64_LIBS := -lopenrpc-$(ARM64_OBJ_TARGET) -lulogapi-$(ARM64_OBJ_TARGET) -lconfigmapi-$(ARM64_OBJ_TARGET) $(COMMON_STD_LIB)
LINUX_LIBS := -lopenrpc-$(LINUX_OBJ_TARGET) -lulogapi-$(LINUX_OBJ_TARGET) -lconfigmapi-$(LINUX_OBJ_TARGET) $(COMMON_STD_LIB)
# this line must be at below of thus, because of...
include ../../Common/common.Makefile

View File

@ -38,7 +38,7 @@ PLAT_ARM64_SRCS = $(COMMON_SRCS)
PLAT_ARM64_CFLAGS := -I../user/trace/trace-api -I../../Common -I../common/trace
PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS :=
#gcc libs

View File

@ -2,19 +2,19 @@ include ../../Common/def.Makefile
# target name, the target name must have the same name of c source file
TARGET_NAME=demo
# target
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = KO
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = DRV
# custom install dir
TARGET_BOX =
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
@ -37,7 +37,7 @@ PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
# this line must be at below of thus, because of...
# this line must be at below of thus, because of...
include ../../Common/common.Makefile
ifeq ($(MAKECMDGOALS), )

View File

@ -2,19 +2,19 @@ include ../../Common/def.Makefile
# target name, the target name must have the same name of c source file
TARGET_NAME=khashtable
# target
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = KO
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = DRV
# custom install dir
TARGET_BOX =
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
@ -35,20 +35,20 @@ PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
PLAT_ARM64_CFLAGS := -I../../Common -I../common
PLAT_ARM64_CFLAGS := -I../../Common -I../common
PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS)
#gcc libs
ARM64_LIBS :=
LINUX_LIBS :=
ARM64_LIBS :=
LINUX_LIBS :=
ifeq ($(PLAT_ARM64), TRUE)
DEPEND_LIB +=
DEPEND_LIB +=
USER_CLEAN_ITEMS +=
endif
@ -57,7 +57,7 @@ DEPEND_LIB +=
USER_CLEAN_ITEMS +=
endif
# this line must be at below of thus, because of...
# this line must be at below of thus, because of...
include ../../Common/common.Makefile
ifneq ($(MAKECMDGOALS), clean)

View File

@ -2,19 +2,19 @@ include ../../Common/def.Makefile
# target name, the target name must have the same name of c source file
TARGET_NAME=matchrule
# target
# target
# for linux module driver: KO
# for application: EXE
# for dynamic library: DLL
TARGET_TYPE = KO
# target object
# for application: APP
# for device driver: DRV
TARGET_OBJ = DRV
# custom install dir
TARGET_BOX =
TARGET_BOX =
#debug mode or release mode
DEBUG = TRUE
@ -35,20 +35,20 @@ PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
PLAT_ARM64_CFLAGS := -I../../Common -I../common
PLAT_ARM64_CFLAGS := -I../../Common -I../common
PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS)
PLAT_ARM64_LDFLAGS :=
PLAT_ARM64_LDFLAGS :=
PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS)
#gcc libs
ARM64_LIBS :=
LINUX_LIBS :=
ARM64_LIBS :=
LINUX_LIBS :=
ifeq ($(PLAT_ARM64), TRUE)
DEPEND_LIB +=
DEPEND_LIB +=
USER_CLEAN_ITEMS +=
endif
@ -57,7 +57,7 @@ DEPEND_LIB +=
USER_CLEAN_ITEMS +=
endif
# this line must be at below of thus, because of...
# this line must be at below of thus, because of...
include ../../Common/common.Makefile
ifneq ($(MAKECMDGOALS), clean)

View File

@ -43,12 +43,10 @@ PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS)
PLATLIB_DIR := ../../Platform/build/debug
COMMON_STD_LIB := -lcjson -lpthread -lm -lodbc
#gcc libs
ARM64_LIBS := -ldatabase-$(ARM64_OBJ_TARGET)
ARM64_LIBS += -lcjson -lpthread -lm -lodbc
LINUX_LIBS := -ldatabase-$(LINUX_OBJ_TARGET)
LINUX_LIBS += -lcjson -lpthread -lm -lodbc
ARM64_LIBS := -ldatabase-$(ARM64_OBJ_TARGET) $(COMMON_STD_LIB)
LINUX_LIBS := -ldatabase-$(LINUX_OBJ_TARGET) $(COMMON_STD_LIB)
# this line must be at below of thus, because of...
include ../../Common/common.Makefile

View File

@ -36,14 +36,17 @@ PLAT_LINUX_SRCS = $(COMMON_SRCS)
PLAT_ARM64_SRCS = $(COMMON_SRCS)
# gcc CFLAGS
PLAT_ARM64_CFLAGS := -I../../Platform/user/configm/config-server/user_manager_config -I../../Platform/user/configm/config-server/user_manager_config/usermanager-server/include -I../../Common -I../common \
-I../../Platform/user/configm/config-server/include -I../../Platform/common/database -I../../Platform/common/redismq -I../../Platform/common/configm -I../../Platform/common/rpc -I../../Platform/common/rpc/hashtable \
PLAT_ARM64_CFLAGS := -I../../Platform/user/configm/config-server/user_manager_config \
-I../../Platform/user/configm/config-server/user_manager_config/usermanager-server/include \
-I../../Common -I../common \
-I../../Platform/user/configm/config-server/include \
-I../../Platform/common/database -I../../Platform/common/redismq \
-I../../Platform/common/configm -I../../Platform/common/rpc \
-I../../Platform/common/rpc/hashtable \
-I../user/user_manager/usermanager-auth \
-I../../Platform/thirdparty/arm64/usr/local/include
PLAT_LINUX_CFLAGS := -I../../Platform/user/configm/config-server/user_manager_config -I../../Platform/user/configm/config-server/user_manager_config/usermanager-server/include -I../../Common -I../common \
-I../../Platform/user/configm/config-server/include -I../../Platform/common/database -I../../Platform/common/redismq -I../../Platform/common/configm -I../../Platform/common/rpc -I../../Platform/common/rpc/hashtable \
-I../user/user_manager/usermanager-auth \
PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS) \
-I../../Platform/thirdparty/x86_64/usr/local/include