From 68f128944a63cba79c533646432f913b1a96a94f Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 27 Dec 2017 23:04:40 +0000 Subject: [PATCH] firmware: clean up makefiles. --- artiq/firmware/ksupport/Makefile | 12 ++---------- artiq/firmware/runtime/Makefile | 18 +++++------------- artiq/firmware/satman/Makefile | 16 ++++------------ conda/artiq-dev/meta.yaml | 2 +- 4 files changed, 12 insertions(+), 36 deletions(-) diff --git a/artiq/firmware/ksupport/Makefile b/artiq/firmware/ksupport/Makefile index 718b2c639..ff93ec31f 100644 --- a/artiq/firmware/ksupport/Makefile +++ b/artiq/firmware/ksupport/Makefile @@ -5,7 +5,6 @@ CFLAGS += \ -I$(LIBUNWIND_DIRECTORY) \ -I$(LIBUNWIND_DIRECTORY)/../unwinder/include \ -I$(MISOC_DIRECTORY)/software/include/dyld -CFLAGS += -DNDEBUG LDFLAGS += --eh-frame-hdr \ -L../libcompiler-rt \ @@ -15,22 +14,15 @@ LDFLAGS += --eh-frame-hdr \ RUSTFLAGS += -Cpanic=unwind -all: ksupport.elf +all:: ksupport.elf .PHONY: $(RUSTOUT)/libksupport.a $(RUSTOUT)/libksupport.a: $(cargo) --manifest-path $(KSUPPORT_DIRECTORY)/Cargo.toml ksupport.elf: $(RUSTOUT)/libksupport.a glue.o - $(LD) $(LDFLAGS) -T $(KSUPPORT_DIRECTORY)/ksupport.ld -o $@ $^ \ + $(link) -T $(KSUPPORT_DIRECTORY)/ksupport.ld \ -lunwind-elf -lcompiler-rt -lbase -lm - @chmod -x $@ %.o: $(KSUPPORT_DIRECTORY)/%.c $(compile) - -clean: - $(RM) *.o ksupport.elf - $(RM) -rf cargo - -.PHONY: all clean diff --git a/artiq/firmware/runtime/Makefile b/artiq/firmware/runtime/Makefile index 187793ae4..8e33691d2 100644 --- a/artiq/firmware/runtime/Makefile +++ b/artiq/firmware/runtime/Makefile @@ -3,36 +3,28 @@ include $(MISOC_DIRECTORY)/software/common.mak CFLAGS += \ -I$(LIBUNWIND_DIRECTORY) \ - -I$(LIBUNWIND_DIRECTORY)/../unwinder/include \ + -I$(LIBUNWIND_DIRECTORY)/../unwinder/include LDFLAGS += -L../libbase \ -L../libunwind RUSTFLAGS += -Cpanic=abort -all: runtime.bin runtime.fbi +all:: runtime.bin runtime.fbi .PHONY: $(RUSTOUT)/libruntime.a $(RUSTOUT)/libruntime.a: $(cargo) --manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o - $(LD) $(LDFLAGS) -T $(RUNTIME_DIRECTORY)/runtime.ld -o $@ $^ \ + $(link) -T $(RUNTIME_DIRECTORY)/runtime.ld \ -lunwind-bare - @chmod -x $@ ksupport_data.o: ../ksupport/ksupport.elf $(LD) -r -b binary -o $@ $< %.bin: %.elf - $(OBJCOPY) -O binary $< $@ - @chmod -x $@ + $(objcopy) -O binary %.fbi: %.bin - @echo " MSCIMG " $@ && $(PYTHON) -m misoc.tools.mkmscimg -f -o $@ $< - -clean: - $(RM) *.o runtime.elf runtime.bin runtime.fbi - $(RM) -rf cargo - -.PHONY: all clean + $(mscimg) -f diff --git a/artiq/firmware/satman/Makefile b/artiq/firmware/satman/Makefile index 703490663..b96938d1b 100644 --- a/artiq/firmware/satman/Makefile +++ b/artiq/firmware/satman/Makefile @@ -5,25 +5,17 @@ LDFLAGS += -L../libbase RUSTFLAGS += -Cpanic=abort -all: satman.bin satman.fbi +all:: satman.bin satman.fbi .PHONY: $(RUSTOUT)/libsatman.a $(RUSTOUT)/libsatman.a: $(cargo) --manifest-path $(SATMAN_DIRECTORY)/Cargo.toml satman.elf: $(RUSTOUT)/libsatman.a - $(LD) $(LDFLAGS) -T $(SATMAN_DIRECTORY)/satman.ld -o $@ $^ - @chmod -x $@ + $(link) -T $(SATMAN_DIRECTORY)/satman.ld %.bin: %.elf - $(OBJCOPY) -O binary $< $@ - @chmod -x $@ + $(objcopy) -O binary %.fbi: %.bin - @echo " MSCIMG " $@ && $(PYTHON) -m misoc.tools.mkmscimg -f -o $@ $< - -clean: - $(RM) satman.elf satman.bin satman.fbi - $(RM) -rf cargo - -.PHONY: all clean + $(mscimg) -f diff --git a/conda/artiq-dev/meta.yaml b/conda/artiq-dev/meta.yaml index 23f86a710..63cc5b328 100644 --- a/conda/artiq-dev/meta.yaml +++ b/conda/artiq-dev/meta.yaml @@ -15,7 +15,7 @@ requirements: - python >=3.5.3,<3.6 - setuptools 33.1.1 - migen 0.6.dev py35_50+git82b06ee - - misoc 0.8.dev py35_35+git6845fc0a + - misoc 0.8.dev py35_39+git4126dedf - jesd204b 0.4 - binutils-or1k-linux >=2.27 - llvm-or1k 4.0.1