From: 박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 Date: Tue, 20 Mar 2018 23:22:25 +0000 (+0900) Subject: Enable ACL build (#99) X-Git-Tag: 0.1~652 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d658fcee710798630f45257ac3bfd4a694d5ee9;p=platform%2Fcore%2Fml%2Fnnfw.git Enable ACL build (#99) This will call ACL build when building nnfw. Output .SO files will be copied to out/bin folder with install. --- diff --git a/Makefile b/Makefile index 6cf5a59..a2333e1 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ ifneq (,$(findstring arm,$(TARGET_ARCH_BASE))) ROOTFS_ARM=$(ROOTFS_DIR) export ROOTFS_ARM endif + ifeq ($(HOST_OS),linux) + BUILD_ACL=1 + endif endif # Todo: we may set CROSS_BUILD=1 when ROOTFS_DIR is given # the toolchain file, only for cross build @@ -42,6 +45,11 @@ TIMESTAMP_CONFIGURE=$(WORKDIR)/CONFIGURE TIMESTAMP_BUILD=$(WORKDIR)/BUILD TIMESTAMP_INSTALL=$(WORKDIR)/INSTALL +ACL_FOLDER=externals/acl +ACL_COMMAND=scons Werror=1 neon=1 opencl=1 os=linux arch=armv7a examples=0 +# TODO: add these for only debug +ACL_COMMAND+=debug=1 asserts=1 + all: build ### @@ -69,6 +77,9 @@ configure_internal: touch $(TIMESTAMP_CONFIGURE) build_internal: $(BUILD_ROOT) +ifeq ($(BUILD_ACL),1) + cd $(ACL_FOLDER) && $(ACL_COMMAND) +endif cd $(BUILD_ROOT) && make all rm -rf $(BUILD_ALIAS) ln -s $(BUILD_FOLDER) $(BUILD_ALIAS) @@ -76,6 +87,11 @@ build_internal: $(BUILD_ROOT) install_internal: cd $(BUILD_ROOT) && make install +ifeq ($(BUILD_ACL),1) + @cp -v $(ACL_FOLDER)/build/libarm_compute_core.so $(INSTALL_PATH)/bin/. + @cp -v $(ACL_FOLDER)/build/libarm_compute_graph.so $(INSTALL_PATH)/bin/. + @cp -v $(ACL_FOLDER)/build/libarm_compute.so $(INSTALL_PATH)/bin/. +endif rm -rf $(INSTALL_ALIAS) ln -s $(INSTALL_FOLDER) $(INSTALL_ALIAS) touch $(TIMESTAMP_INSTALL)