2019-06-17 08:37:47 +00:00
|
|
|
# target name, the target name must have the same name of c source file
|
2019-06-18 07:54:42 +00:00
|
|
|
TARGET_NAME=configm
|
2019-06-17 08:37:47 +00:00
|
|
|
|
2019-08-14 03:33:47 +00:00
|
|
|
# target
|
2019-06-17 08:37:47 +00:00
|
|
|
# for linux module driver: KO
|
|
|
|
# for application: EXE
|
|
|
|
# for dynamic library: DLL
|
|
|
|
TARGET_TYPE = EXE
|
2019-08-14 03:33:47 +00:00
|
|
|
|
2019-06-17 08:37:47 +00:00
|
|
|
# target object
|
|
|
|
# for application: APP
|
|
|
|
# for device driver: DRV
|
|
|
|
TARGET_OBJ = APP
|
|
|
|
|
|
|
|
# custom install dir
|
2019-08-14 03:33:47 +00:00
|
|
|
TARGET_BOX =
|
2019-06-17 08:37:47 +00:00
|
|
|
|
|
|
|
#debug mode or release mode
|
|
|
|
DEBUG = TRUE
|
|
|
|
|
|
|
|
PLAT_LINUX ?= TRUE
|
|
|
|
PLAT_ARM64 ?= TRUE
|
|
|
|
|
2019-07-29 03:48:10 +00:00
|
|
|
VPATH = ../user/configm/config-server
|
2019-06-17 08:37:47 +00:00
|
|
|
# source code
|
|
|
|
|
|
|
|
# set the source file, don't used .o because of ...
|
|
|
|
|
2019-07-29 03:48:10 +00:00
|
|
|
COMMON_SRCS = configserver.c \
|
2019-08-07 03:49:31 +00:00
|
|
|
netconfig/parsefile.c netconfig/ifconfig.c netconfig/netmain.c\
|
|
|
|
netconfig/ipconfig/ipconfig.c \
|
2019-08-05 02:26:49 +00:00
|
|
|
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\
|
2019-08-12 02:27:44 +00:00
|
|
|
web_config/authfree.c web_config/auth_parameters.c\
|
2019-07-29 03:48:10 +00:00
|
|
|
user_manager_config/user_group_config.c user_manager_config/user_account_config.c user_manager_config/usermanager-server/array_index.c \
|
2019-08-02 09:58:02 +00:00
|
|
|
user_manager_config/usermanager-server/user_group.c user_manager_config/usermanager-server/user_mod.c user_manager_config/usermanager-server/user.c \
|
2019-08-13 08:25:43 +00:00
|
|
|
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
|
2019-06-17 08:37:47 +00:00
|
|
|
|
|
|
|
# MRS Board Source Files
|
|
|
|
PLAT_LINUX_SRCS = $(COMMON_SRCS)
|
|
|
|
PLAT_ARM64_SRCS = $(COMMON_SRCS)
|
|
|
|
|
2019-08-14 03:33:47 +00:00
|
|
|
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
|
2019-06-17 08:37:47 +00:00
|
|
|
# gcc CFLAGS
|
2019-07-23 02:49:58 +00:00
|
|
|
PLAT_ARM64_CFLAGS := $(COMMOM_CFLAGS) -I../thirdparty/arm64/usr/local/include
|
|
|
|
PLAT_LINUX_CFLAGS := $(COMMOM_CFLAGS) -I../thirdparty/x86_64/usr/local/include
|
2019-06-17 08:37:47 +00:00
|
|
|
|
2019-08-14 03:33:47 +00:00
|
|
|
PLAT_ARM64_LDFLAGS :=
|
|
|
|
PLAT_LINUX_LDFLAGS :=
|
2019-06-17 08:37:47 +00:00
|
|
|
|
|
|
|
#gcc libs
|
2019-08-14 03:33:47 +00:00
|
|
|
ARM64_LIBS := -lopenrpc-arm64 -lnetlinku-arm64 -lredismq-arm64 -lulogapi-arm64 -ldatabase-arm64
|
|
|
|
ARM64_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev
|
2019-07-23 02:49:58 +00:00
|
|
|
|
2019-08-14 03:33:47 +00:00
|
|
|
LINUX_LIBS := -lopenrpc-linux -lnetlinku-linux -lredismq-linux -lulogapi-linux -ldatabase-linux
|
|
|
|
LINUX_LIBS += -lpthread -lm -lcjson -levent -ljson-c -lhiredis -lodbc -lev
|
2019-06-17 08:37:47 +00:00
|
|
|
|
|
|
|
ifeq ($(PLAT_ARM64), TRUE)
|
2019-08-14 03:33:47 +00:00
|
|
|
DEPEND_LIB += ./debug/libopenrpc-arm64.so ./debug/libnetlinku-arm64.so ./debug/libredismq-arm64.so ./debug/libdatabase-arm64.so
|
2019-08-08 07:33:16 +00:00
|
|
|
USER_CLEAN_ITEMS += ./libopenrpc-arm64.so ./libnetlinku-arm64.so ./libredismq-arm64.so ./libdatabase-arm64.so
|
2019-06-17 08:37:47 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(PLAT_LINUX), TRUE)
|
2019-08-14 03:33:47 +00:00
|
|
|
DEPEND_LIB += ./debug/libopenrpc-linux.so ./libnetlinku-linux.so ./debug/libredismq-linux.so ./debug/libdatabase-linux.so
|
2019-08-08 07:33:16 +00:00
|
|
|
USER_CLEAN_ITEMS += ./libopenrpc-linux.so ./libnetlinku-linux.so ./libredismq-linux.so ./libdatabase-linux.so
|
|
|
|
|
2019-06-17 08:37:47 +00:00
|
|
|
endif
|
|
|
|
|
2019-06-18 07:54:42 +00:00
|
|
|
|
2019-08-14 03:33:47 +00:00
|
|
|
# this line must be at below of thus, because of...
|
2019-06-17 08:37:47 +00:00
|
|
|
include ../../Common/common.Makefile
|
|
|
|
|
|
|
|
ifneq ($(MAKECMDGOALS), clean)
|
|
|
|
ifneq ($(MAKECMDGOALS), cleanall)
|
|
|
|
ifneq ($(notdir $(DEPEND_LIB)), $(wildcard $(DEPEND_LIB)))
|
|
|
|
$(shell $(CP) $(DEPEND_LIB) ./)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(MAKECMDGOALS), )
|
|
|
|
$(shell find ./ -name "$(TARGET)-*.ko" -delete)
|
|
|
|
else
|
|
|
|
ifeq ($(MAKECMDGOALS), all)
|
|
|
|
$(shell find ./ -name "$(TARGET)-*.ko" -delete)
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|