From 631213a688a2372c21b3e826933188821c167f8e Mon Sep 17 00:00:00 2001 From: wuhuanzheng Date: Wed, 28 Aug 2019 15:30:41 +0800 Subject: [PATCH] OCT commit rpdb --- Platform/build/module.rpdb.Makefile | 50 +++++++++++++++++++++ Platform/build/user.rpdb.Makefile | 67 +++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100755 Platform/build/module.rpdb.Makefile create mode 100644 Platform/build/user.rpdb.Makefile diff --git a/Platform/build/module.rpdb.Makefile b/Platform/build/module.rpdb.Makefile new file mode 100755 index 000000000..a11fcfa4e --- /dev/null +++ b/Platform/build/module.rpdb.Makefile @@ -0,0 +1,50 @@ +# target name, the target name must have the same name of c source file +TARGET_NAME=rpdb + +# 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 = + +#debug mode or release mode +DEBUG = TRUE + +PLAT_LINUX ?= TRUE +PLAT_ARM64 ?= TRUE + +VPATH = ../modules + +# source code + +# set the source file, don't used .o because of ... + +COMMON_SRCS = ./rpdb/dpi_trie_cache.c + +# MRS Board Source Files +PLAT_LINUX_SRCS = $(COMMON_SRCS) +PLAT_ARM64_SRCS = $(COMMON_SRCS) + +# gcc CFLAGS +PLAT_ARM64_CFLAGS := +PLAT_LINUX_CFLAGS := $(PLAT_ARM64_CFLAGS) + +# this line must be at below of thus, because of... +include ../../Common/common.Makefile + +ifeq ($(MAKECMDGOALS), ) +$(shell find ./ -name "$(TARGET)-*.ko" -delete) +else +ifeq ($(MAKECMDGOALS), all) +$(shell find ./ -name "$(TARGET)-*.ko" -delete) +endif +endif + diff --git a/Platform/build/user.rpdb.Makefile b/Platform/build/user.rpdb.Makefile new file mode 100644 index 000000000..ccbbc55e2 --- /dev/null +++ b/Platform/build/user.rpdb.Makefile @@ -0,0 +1,67 @@ +# target name, the target name must have the same name of c source file +TARGET_NAME=librpdb + +# target +# for linux module driver: KO +# for application: EXE +# for dynamic library: DLL +TARGET_TYPE = DLL + +# target object +# for application: APP +# for device driver: DRV +TARGET_OBJ = APP + +# custom install dir +TARGET_BOX = + +#debug mode or release mode +DEBUG = TRUE + +PLAT_LINUX ?= TRUE +PLAT_ARM64 ?= TRUE + +VPATH = ../user/rpdb/ + +# source code + +# set the source file, don't used .o because of ... + +COMMON_SRCS = rpdb.c + +# MRS Board Source Files +PLAT_LINUX_SRCS = $(COMMON_SRCS) +PLAT_ARM64_SRCS = $(COMMON_SRCS) + +# gcc CFLAGS +PLAT_ARM64_CFLAGS := -fPIC -I../../Common -I../common/rpdb +PLAT_LINUX_CFLAGS := -fPIC -I../../Common -I../common/rpdb + + +PLAT_ARM64_LDFLAGS := -fPIC -shared +PLAT_LINUX_LDFLAGS := $(PLAT_ARM64_LDFLAGS) + + +#gcc libs +ARM64_LIBS := +LINUX_LIBS := + +# this line must be at below of thus, because of... +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 +