From: 박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 Date: Thu, 22 Mar 2018 05:12:24 +0000 (+0900) Subject: Separate ACL build target (#142) X-Git-Tag: 0.1~633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93e988bc0db321780c25b1f388fd7892d419df97;p=platform%2Fcore%2Fml%2Fnnfw.git Separate ACL build target (#142) * Separate ACL build target This will separate ACL build to a target in the Makefile - ACL mostly will be reused after a single build - Only dependency check in scons takses several seconds - This will speed up for arm cross build * use lib --- diff --git a/Makefile b/Makefile index f0676b9..189ea05 100644 --- a/Makefile +++ b/Makefile @@ -15,9 +15,6 @@ 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 @@ -70,6 +67,8 @@ install: $(TIMESTAMP_INSTALL) clean: rm -rf $(WORKDIR) +acl: internal_acl + ### ### Command (internal) ### @@ -83,26 +82,24 @@ configure_internal: touch $(TIMESTAMP_CONFIGURE) build_internal: $(BUILD_ROOT) -ifeq ($(BUILD_ACL),1) - cd $(ACL_FOLDER) && $(ACL_COMMAND) -endif cd $(BUILD_ROOT) && make -j $(NPROCS) all rm -rf $(BUILD_ALIAS) ln -s $(BUILD_FOLDER) $(BUILD_ALIAS) touch $(TIMESTAMP_BUILD) install_internal: -ifeq ($(BUILD_ACL),1) - @mkdir -vp $(INSTALL_PATH)/bin - @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 cd $(BUILD_ROOT) && make install rm -rf $(INSTALL_ALIAS) ln -s $(INSTALL_FOLDER) $(INSTALL_ALIAS) touch $(TIMESTAMP_INSTALL) +internal_acl: + cd $(ACL_FOLDER) && $(ACL_COMMAND) + @mkdir -vp $(INSTALL_PATH)/lib + @cp -v $(ACL_FOLDER)/build/libarm_compute_core.so $(INSTALL_PATH)/lib/. + @cp -v $(ACL_FOLDER)/build/libarm_compute_graph.so $(INSTALL_PATH)/lib/. + @cp -v $(ACL_FOLDER)/build/libarm_compute.so $(INSTALL_PATH)/lib/. + ### ### Timestamps ### diff --git a/README.md b/README.md index c788ebd..a08cf31 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,14 @@ sudo ./tools/cross/build_rootfs.sh arm --skipproxy ## Cross build for ARM +Build and install ARM Compute Library +``` +TARGET_ARCH=armv7l make acl +``` +Mostly you only need once of ACL build. This will build and install to +`Product/(target_arch-os)/out/bin` folder. +- this is required for ARM on Ubuntu + Give `TARGET_ARCH` variable to set the target architecture ``` CROSS_BUILD=1 TARGET_ARCH=armv7l make