From 4b9022a55e295a83b96ee8a5ca6bf5532052d08e Mon Sep 17 00:00:00 2001 From: Kelvin Lawson Date: Wed, 18 Sep 2013 22:56:21 +0100 Subject: [PATCH] dm36x: Add libatomthreads.a build target for linking to external applications. --- ports/arm/platforms/dm36x/Makefile | 5 +++++ ports/arm/platforms/qemu_integratorcp/Makefile | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/ports/arm/platforms/dm36x/Makefile b/ports/arm/platforms/dm36x/Makefile index eae663b..e64d01f 100644 --- a/ports/arm/platforms/dm36x/Makefile +++ b/ports/arm/platforms/dm36x/Makefile @@ -14,6 +14,7 @@ TESTS_DIR=../../../../tests PORT_DIR=../.. CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy +ARCHIVE=arm-none-eabi-ar # Location of TFTP root folder for running tests via U-Boot/TFTP. # Note, you may need to run the Makefile as root in order to write @@ -81,6 +82,10 @@ endif # All tests all: $(BUILD_DIR) $(TEST_ELFS) $(TEST_BINS) $(TEST_UIMAGES) Makefile +# Build archive for linking with external application +libatomthreads.a: $(BUILD_DIR) $(ALL_OBJECTS) Makefile + $(ARCHIVE) cr $(BUILD_DIR)/$@ $(BUILT_OBJECTS) + # Make build/output directory $(BUILD_DIR): mkdir $(BUILD_DIR) diff --git a/ports/arm/platforms/qemu_integratorcp/Makefile b/ports/arm/platforms/qemu_integratorcp/Makefile index 290e92c..ef8daad 100644 --- a/ports/arm/platforms/qemu_integratorcp/Makefile +++ b/ports/arm/platforms/qemu_integratorcp/Makefile @@ -14,6 +14,7 @@ TESTS_DIR=../../../../tests PORT_DIR=../.. CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy +ARCHIVE=arm-none-eabi-ar QEMU=qemu-system-arm # Enable stack-checking. @@ -71,6 +72,10 @@ endif # All tests all: $(BUILD_DIR) $(TEST_ELFS) Makefile +# Build archive for linking with external application +libatomthreads.a: $(BUILD_DIR) $(ALL_OBJECTS) Makefile + $(ARCHIVE) cr $(BUILD_DIR)/$@ $(BUILT_OBJECTS) + # Make build/output directory $(BUILD_DIR): mkdir $(BUILD_DIR)