Modify the build method of TizenRT target

Introduced a cmake/toolchain_mcu_artik053.cmake file that defines
all the target specific compiler options.

Modified the Makefile.tizenrt to do not copy the created static
libraries to the TizenRT folder. Instead, the application builder
Makefile (tizenrt-artik053/apps/jerryscript/Makefile) copies the
required static libraries to TizenRT.

JerryScript-DCO-1.0-Signed-off-by: Roland Takacs [email protected]
This commit is contained in:
Roland Takacs authored and yichoi committed 2018-01-16 10:57:37 +09:00
1 parent ded0d5a846
commit 680bafdc8c
6 files changed
+63 -70

No files matched your search

+3 -18
View File
@@ -13,15 +13,8 @@
# limitations under the License.
JERRYHEAP ?= 16
BUILD_DIR ?= build/tizenrt-artik053
LIBTARGET_DIR ?= $(abspath $(PWD)/../TizenRT/build/output/libraries)
BUILD_DIR ?= build
EXT_CFLAGS += -mcpu=cortex-r4 -mfpu=vfpv3
EXT_CFLAGS += -fno-builtin -fno-strict-aliasing
EXT_CFLAGS += -fomit-frame-pointer
EXT_CFLAGS += -fno-strength-reduce
EXT_CFLAGS += -Wall -Werror -Wshadow
EXT_CFLAGS += -Wno-error=conversion
EXT_CFLAGS += -I. -isystem ../TizenRT/os/include
.PHONY: libjerry clean
@@ -29,25 +22,17 @@ EXT_CFLAGS += -I. -isystem ../TizenRT/os/include
all: libjerry
libjerry:
mkdir -p $(BUILD_DIR)
mkdir -p $(LIBTARGET_DIR)
cmake -B$(BUILD_DIR) -H./ \
-DCMAKE_SYSTEM_NAME=TizenRT \
-DCMAKE_SYSTEM_PROCESSOR=armv7l \
-DCMAKE_C_COMPILER=arm-none-eabi-gcc \
-DCMAKE_C_COMPILER_WORKS=TRUE \
-DENABLE_LTO=OFF \
-DENABLE_ALL_IN_ONE=OFF \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP) \
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_mcu_artik053.cmake
make -C$(BUILD_DIR) jerry-core jerry-libm jerry-ext
cp $(BUILD_DIR)/lib/libjerry-core.a $(LIBTARGET_DIR)
cp $(BUILD_DIR)/lib/libjerry-libm.a $(LIBTARGET_DIR)
cp $(BUILD_DIR)/lib/libjerry-ext.a $(LIBTARGET_DIR)
clean:
rm -rf $(BUILD_DIR)