Skip to content

Build fix for RIOT target after the modifications of the build system… #1228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions targets/riot-stm32f4/Makefile.riot
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

TYPE ?= release
INTERM ?= build/obj-riot-stm32f4
OUTPUT ?= build/bin/$(TYPE).riotstm32f4
COPYTARGET ?= targets/riot-stm32f4/bin/
BUILD_DIR ?= build/riotstm32f4
COPYTARGET ?= targets/riot-stm32f4/bin

JERRYHEAP ?= 16

Expand All @@ -29,24 +27,24 @@ EXT_CFLAGS += -Wno-error=format=
all: libjerry riot-jerry

libjerry:
mkdir -p $(INTERM)
mkdir -p $(OUTPUT)
mkdir -p $(BUILD_DIR)
mkdir -p $(COPYTARGET)
cmake -B$(INTERM) -H./ \
-DEXTERNAL_PORT_DIR=UNDEFINED \
cmake -B$(BUILD_DIR) -H./ \
-DENABLE_LTO=OFF \
-DENABLE_VALGRIND=OFF \
-DCMAKE_TOOLCHAIN_FILE=build/configs/toolchain_external.cmake \
-DFEATURE_VALGRIND=OFF \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain_external.cmake \
-DJERRY_LIBC=OFF \
-DJERRY_CMDLINE=OFF \
-DCOMPILER_DEFAULT_LIBC=ON \
-DENABLE_ALL_IN_ONE=OFF \
-DEXTERNAL_CMAKE_SYSTEM_PROCESSOR=armv7l-hf \
-DEXTERNAL_CMAKE_C_COMPILER=arm-none-eabi-gcc \
-DEXTERNAL_CMAKE_C_COMPILER_ID=GNU \
-DEXTERNAL_COMPILE_FLAGS="$(EXT_CFLAGS)" \
-DEXTERNAL_MEM_HEAP_SIZE_KB=$(JERRYHEAP)
-DMEM_HEAP_SIZE_KB=$(JERRYHEAP)

make -C $(INTERM) $(TYPE).external
cp `cat $(INTERM)/$(TYPE).external/list` $(OUTPUT)/.
cp $(OUTPUT)/lib$(TYPE).jerry-core.a $(COPYTARGET)/libjerrycore.a
make -C$(BUILD_DIR) jerry-core
cp $(BUILD_DIR)/lib/libjerry-core.a $(COPYTARGET)/libjerrycore.a
Copy link
Contributor

@polaroi8d polaroi8d Jul 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(BUILD_DIR) = build/riotstm32f4/ So after the cp command ..//lib/libjerry-core.a ... is it okey?
edit: Ditto at $(COPYTARGET)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, but really ugly, I fixed it, thanks.


riot-jerry: libjerry
make -f ./targets/riot-stm32f4/Makefile
Expand All @@ -55,7 +53,6 @@ flash: libjerry
make -f ./targets/riot-stm32f4/Makefile flash

clean:
rm -rf $(INTERM)
rm -rf $(OUTPUT)
rm -rf $(COPYTARGET)
make -f ./targets/riot-stm32f4/Makefile clean