2018-08-07 19:02:02 +00:00
|
|
|
-include ../../run-make-fulldeps/tools.mk
|
|
|
|
|
|
|
|
# How to run this
|
|
|
|
# $ ./x.py test --target thumbv7m-none-eabi src/test/run-make
|
2018-08-06 13:19:00 +00:00
|
|
|
|
|
|
|
ifeq ($(TARGET),thumbv7m-none-eabi)
|
|
|
|
|
2018-08-08 09:41:05 +00:00
|
|
|
# We need to be outside of 'src' dir in order to run cargo
|
|
|
|
WORK_DIR := $(RUST_TEST_TMPDIR)/run-make/$(TARGET)
|
|
|
|
|
2018-08-06 13:19:00 +00:00
|
|
|
CRATE := cortex-m
|
2018-08-08 09:41:05 +00:00
|
|
|
CRATE_VER := 0.5.0
|
|
|
|
|
2018-08-07 19:02:02 +00:00
|
|
|
RUSTC := $(RUSTC_ORIGINAL)
|
|
|
|
LD_LIBRARY_PATH := $(HOST_RPATH_DIR)
|
2018-08-06 13:19:00 +00:00
|
|
|
|
|
|
|
all:
|
2018-08-08 09:41:05 +00:00
|
|
|
env
|
|
|
|
mkdir -p $(WORK_DIR)
|
|
|
|
-cd $(WORK_DIR) && rm -rf $(CRATE)
|
|
|
|
cd $(WORK_DIR) && $(CARGO) clone $(CRATE) --vers $(CRATE_VER)
|
|
|
|
cd $(WORK_DIR) && cd $(CRATE) && $(CARGO) build -j 1 --target $(TARGET) -v
|
2018-08-06 13:19:00 +00:00
|
|
|
else
|
|
|
|
|
|
|
|
all:
|
|
|
|
|
|
|
|
endif
|