forked from M-Labs/artiq
firmware: clean up makefiles.
This commit is contained in:
parent
d7cb4963e1
commit
68f128944a
|
@ -5,7 +5,6 @@ CFLAGS += \
|
||||||
-I$(LIBUNWIND_DIRECTORY) \
|
-I$(LIBUNWIND_DIRECTORY) \
|
||||||
-I$(LIBUNWIND_DIRECTORY)/../unwinder/include \
|
-I$(LIBUNWIND_DIRECTORY)/../unwinder/include \
|
||||||
-I$(MISOC_DIRECTORY)/software/include/dyld
|
-I$(MISOC_DIRECTORY)/software/include/dyld
|
||||||
CFLAGS += -DNDEBUG
|
|
||||||
|
|
||||||
LDFLAGS += --eh-frame-hdr \
|
LDFLAGS += --eh-frame-hdr \
|
||||||
-L../libcompiler-rt \
|
-L../libcompiler-rt \
|
||||||
|
@ -15,22 +14,15 @@ LDFLAGS += --eh-frame-hdr \
|
||||||
|
|
||||||
RUSTFLAGS += -Cpanic=unwind
|
RUSTFLAGS += -Cpanic=unwind
|
||||||
|
|
||||||
all: ksupport.elf
|
all:: ksupport.elf
|
||||||
|
|
||||||
.PHONY: $(RUSTOUT)/libksupport.a
|
.PHONY: $(RUSTOUT)/libksupport.a
|
||||||
$(RUSTOUT)/libksupport.a:
|
$(RUSTOUT)/libksupport.a:
|
||||||
$(cargo) --manifest-path $(KSUPPORT_DIRECTORY)/Cargo.toml
|
$(cargo) --manifest-path $(KSUPPORT_DIRECTORY)/Cargo.toml
|
||||||
|
|
||||||
ksupport.elf: $(RUSTOUT)/libksupport.a glue.o
|
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
|
-lunwind-elf -lcompiler-rt -lbase -lm
|
||||||
@chmod -x $@
|
|
||||||
|
|
||||||
%.o: $(KSUPPORT_DIRECTORY)/%.c
|
%.o: $(KSUPPORT_DIRECTORY)/%.c
|
||||||
$(compile)
|
$(compile)
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) *.o ksupport.elf
|
|
||||||
$(RM) -rf cargo
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
|
@ -3,36 +3,28 @@ include $(MISOC_DIRECTORY)/software/common.mak
|
||||||
|
|
||||||
CFLAGS += \
|
CFLAGS += \
|
||||||
-I$(LIBUNWIND_DIRECTORY) \
|
-I$(LIBUNWIND_DIRECTORY) \
|
||||||
-I$(LIBUNWIND_DIRECTORY)/../unwinder/include \
|
-I$(LIBUNWIND_DIRECTORY)/../unwinder/include
|
||||||
|
|
||||||
LDFLAGS += -L../libbase \
|
LDFLAGS += -L../libbase \
|
||||||
-L../libunwind
|
-L../libunwind
|
||||||
|
|
||||||
RUSTFLAGS += -Cpanic=abort
|
RUSTFLAGS += -Cpanic=abort
|
||||||
|
|
||||||
all: runtime.bin runtime.fbi
|
all:: runtime.bin runtime.fbi
|
||||||
|
|
||||||
.PHONY: $(RUSTOUT)/libruntime.a
|
.PHONY: $(RUSTOUT)/libruntime.a
|
||||||
$(RUSTOUT)/libruntime.a:
|
$(RUSTOUT)/libruntime.a:
|
||||||
$(cargo) --manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml
|
$(cargo) --manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml
|
||||||
|
|
||||||
runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
|
runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
|
||||||
$(LD) $(LDFLAGS) -T $(RUNTIME_DIRECTORY)/runtime.ld -o $@ $^ \
|
$(link) -T $(RUNTIME_DIRECTORY)/runtime.ld \
|
||||||
-lunwind-bare
|
-lunwind-bare
|
||||||
@chmod -x $@
|
|
||||||
|
|
||||||
ksupport_data.o: ../ksupport/ksupport.elf
|
ksupport_data.o: ../ksupport/ksupport.elf
|
||||||
$(LD) -r -b binary -o $@ $<
|
$(LD) -r -b binary -o $@ $<
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) -O binary $< $@
|
$(objcopy) -O binary
|
||||||
@chmod -x $@
|
|
||||||
|
|
||||||
%.fbi: %.bin
|
%.fbi: %.bin
|
||||||
@echo " MSCIMG " $@ && $(PYTHON) -m misoc.tools.mkmscimg -f -o $@ $<
|
$(mscimg) -f
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) *.o runtime.elf runtime.bin runtime.fbi
|
|
||||||
$(RM) -rf cargo
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
|
@ -5,25 +5,17 @@ LDFLAGS += -L../libbase
|
||||||
|
|
||||||
RUSTFLAGS += -Cpanic=abort
|
RUSTFLAGS += -Cpanic=abort
|
||||||
|
|
||||||
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) --manifest-path $(SATMAN_DIRECTORY)/Cargo.toml
|
$(cargo) --manifest-path $(SATMAN_DIRECTORY)/Cargo.toml
|
||||||
|
|
||||||
satman.elf: $(RUSTOUT)/libsatman.a
|
satman.elf: $(RUSTOUT)/libsatman.a
|
||||||
$(LD) $(LDFLAGS) -T $(SATMAN_DIRECTORY)/satman.ld -o $@ $^
|
$(link) -T $(SATMAN_DIRECTORY)/satman.ld
|
||||||
@chmod -x $@
|
|
||||||
|
|
||||||
%.bin: %.elf
|
%.bin: %.elf
|
||||||
$(OBJCOPY) -O binary $< $@
|
$(objcopy) -O binary
|
||||||
@chmod -x $@
|
|
||||||
|
|
||||||
%.fbi: %.bin
|
%.fbi: %.bin
|
||||||
@echo " MSCIMG " $@ && $(PYTHON) -m misoc.tools.mkmscimg -f -o $@ $<
|
$(mscimg) -f
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) satman.elf satman.bin satman.fbi
|
|
||||||
$(RM) -rf cargo
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ requirements:
|
||||||
- python >=3.5.3,<3.6
|
- python >=3.5.3,<3.6
|
||||||
- setuptools 33.1.1
|
- setuptools 33.1.1
|
||||||
- migen 0.6.dev py35_50+git82b06ee
|
- migen 0.6.dev py35_50+git82b06ee
|
||||||
- misoc 0.8.dev py35_35+git6845fc0a
|
- misoc 0.8.dev py35_39+git4126dedf
|
||||||
- jesd204b 0.4
|
- jesd204b 0.4
|
||||||
- binutils-or1k-linux >=2.27
|
- binutils-or1k-linux >=2.27
|
||||||
- llvm-or1k 4.0.1
|
- llvm-or1k 4.0.1
|
||||||
|
|
Loading…
Reference in New Issue