Separate ACL build target (#142)
author박세희/동작제어Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>
Thu, 22 Mar 2018 05:12:24 +0000 (14:12 +0900)
committerGitHub Enterprise <noreply-CODE@samsung.com>
Thu, 22 Mar 2018 05:12:24 +0000 (14:12 +0900)
* 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

Makefile
README.md

index f0676b9..189ea05 100644 (file)
--- 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
 ###
index c788ebd..a08cf31 100644 (file)
--- 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