From 907589fb58f8f1a740c9673dbf2aa6ba8ccdc1c4 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 23 Feb 2017 10:29:25 +0000 Subject: [PATCH] satman: simplify Makefile. --- artiq/firmware/satman/Makefile | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/artiq/firmware/satman/Makefile b/artiq/firmware/satman/Makefile index 576d69310..703490663 100644 --- a/artiq/firmware/satman/Makefile +++ b/artiq/firmware/satman/Makefile @@ -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