diff --git a/.gitmodules b/.gitmodules index 7c5a188d57d27dbe9db576664892a9b4fd77bf28..c59db5b54be8e543e43527a85b29e6d1bbddf2c0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,5 +1,5 @@ [submodule "3rd-party/cpp-tbox"] - path = 3rd-party/cpp-tbox + path = 3rd-party/cpp-tbox/src url = git@gitee.com:cpp-master/cpp-tbox.git branch = develop [submodule "3rd-party/mosquitto/src"] diff --git a/3rd-party/Makefile b/3rd-party/Makefile index 9ca7015d2e72482c3e9d785641403cd1293ae347..7e8e1d99d2ef0216ebf6e3af5dfc4a0f6dffeb0a 100644 --- a/3rd-party/Makefile +++ b/3rd-party/Makefile @@ -6,15 +6,7 @@ export PREFIX ?= targets += nlohmann targets += mosquitto - -targets += cpp-tbox/modules/base \ - cpp-tbox/modules/event \ - cpp-tbox/modules/eventx \ - cpp-tbox/modules/util \ - cpp-tbox/modules/log \ - cpp-tbox/modules/network \ - cpp-tbox/modules/terminal \ - cpp-tbox/modules/main \ +targets += cpp-tbox all test clean distclean: @for i in $(targets); do \ diff --git a/3rd-party/cpp-tbox b/3rd-party/cpp-tbox deleted file mode 160000 index ff21b3346c77d0f70e578de1997f36d38528ce5a..0000000000000000000000000000000000000000 --- a/3rd-party/cpp-tbox +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ff21b3346c77d0f70e578de1997f36d38528ce5a diff --git a/3rd-party/cpp-tbox/Makefile b/3rd-party/cpp-tbox/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..d95367a880965e76d8edca4d58ccd1422f2a1ddb --- /dev/null +++ b/3rd-party/cpp-tbox/Makefile @@ -0,0 +1,15 @@ +all: + cd src; \ + make modules RELEASE=1 + +test: + cd src; \ + make tests; + +clean: + cd src; \ + make clean + +distclean: + cd src; \ + make distclean diff --git a/3rd-party/cpp-tbox/src b/3rd-party/cpp-tbox/src new file mode 160000 index 0000000000000000000000000000000000000000..7a7fba91d4bf5f06371006f38ef281fb61a48c0e --- /dev/null +++ b/3rd-party/cpp-tbox/src @@ -0,0 +1 @@ +Subproject commit 7a7fba91d4bf5f06371006f38ef281fb61a48c0e diff --git a/platforms/host/.gitignore b/platforms/host/.gitignore index 65101391d6cd15c88c075a9bf51926549394a5b2..1f57b975cdf5823f39e8c6d556a05f1b062506b9 100644 --- a/platforms/host/.gitignore +++ b/platforms/host/.gitignore @@ -1,3 +1 @@ -/staging_files -/install_files -/build_files +/output diff --git a/tools/build_env.mk b/tools/build_env.mk index 28bfe72cffa60e405ecde7f43175c3c93c653c80..e5953c3618a6558dc4d527ad99ebbb203466e8b0 100644 --- a/tools/build_env.mk +++ b/tools/build_env.mk @@ -9,30 +9,22 @@ export CONFIGURE_HELPER ?= $(TOP_DIR)/tools/configure_helper.sh export MAKE_PATCH ?= $(TOP_DIR)/tools/make_patch.sh export COMMON_DIR ?= $(TOP_DIR)/platforms/common -export CONSTANT_DIR ?= $(PLATFORM_DIR)/constant_files -export STAGING_DIR ?= $(PLATFORM_DIR)/staging_files -export INSTALL_DIR ?= $(PLATFORM_DIR)/install_files +export CONSTANT_DIR ?= $(PLATFORM_DIR)/constant + +export STAGING_DIR ?= $(PLATFORM_DIR)/output/staging +export INSTALL_DIR ?= $(PLATFORM_DIR)/output/install export COMMON_INCLUDE := $(COMMON_DIR)/include export STAGING_INCLUDE := $(STAGING_DIR)/include export STAGING_LIB := $(STAGING_DIR)/lib +export INSTALL_LIB := $(INSTALL_DIR)/lib export CONSTANT_INCLUDE := $(CONSTANT_DIR)/include export CONSTANT_LIB := $(CONSTANT_DIR)/lib -export BUILD_DIR := $(PLATFORM_DIR)/build_files +export BUILD_DIR := $(PLATFORM_DIR)/output/build COMPILE_FLAGS := -I$(STAGING_INCLUDE) -I$(CONSTANT_INCLUDE) -I$(COMMON_INCLUDE) -LINK_FLAGS := -L$(STAGING_LIB) -L$(CONSTANT_LIB) - -ifeq ($(RELEASE), 1) -COMPILE_FLAGS += -O2 -Os -else -COMPILE_FLAGS += -DDEBUG=1 -O0 -ggdb -ifeq ($(ENABLE_ASAN), 1) -COMPILE_FLAGS += -fsanitize=address -fno-omit-frame-pointer -LINK_FLAGS += -fsanitize=address -static-libasan -endif -endif +LINK_FLAGS := -L$(STAGING_LIB) -L$(INSTALL_LIB) -L$(CONSTANT_LIB) export CFLAGS := $(COMPILE_FLAGS) export CXXFLAGS := $(COMPILE_FLAGS)