2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

satman: simplify Makefile.

This commit is contained in:
whitequark 2017-02-23 10:29:25 +00:00
parent 623a605d3b
commit 907589fb58

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