forked from M-Labs/artiq
satman: simplify Makefile.
This commit is contained in:
parent
623a605d3b
commit
907589fb58
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue