forked from M-Labs/artiq
1
0
Fork 0

satman: simplify Makefile.

This commit is contained in:
whitequark 2017-02-23 10:29:25 +00:00
parent 623a605d3b
commit 907589fb58
1 changed files with 4 additions and 15 deletions

View File

@ -1,26 +1,15 @@
include ../include/generated/variables.mak
include $(MISOC_DIRECTORY)/software/common.mak
PYTHON ?= python3
LDFLAGS += -L../libbase
RUSTOUT := cargo/or1k-unknown-none/debug
LDFLAGS += --gc-sections \
-L../libbase
RUSTFLAGS = \
-C target-feature=+mul,+div,+ffl1,+cmov,+addc \
-C opt-level=s \
-C panic=abort
export RUSTFLAGS
RUSTFLAGS += -Cpanic=abort
all: satman.bin satman.fbi
.PHONY: $(RUSTOUT)/libsatman.a
$(RUSTOUT)/libsatman.a:
CARGO_TARGET_DIR=$(realpath .)/cargo \
cargo build --target=or1k-unknown-none \
--manifest-path $(realpath $(SATMAN_DIRECTORY))/Cargo.toml
$(cargo) --manifest-path $(SATMAN_DIRECTORY)/Cargo.toml
satman.elf: $(RUSTOUT)/libsatman.a
$(LD) $(LDFLAGS) -T $(SATMAN_DIRECTORY)/satman.ld -o $@ $^
@ -34,7 +23,7 @@ satman.elf: $(RUSTOUT)/libsatman.a
@echo " MSCIMG " $@ && $(PYTHON) -m misoc.tools.mkmscimg -f -o $@ $<
clean:
$(RM) satman.elf satman.bin satman.fbi .*~ *~
$(RM) satman.elf satman.bin satman.fbi
$(RM) -rf cargo
.PHONY: all clean