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