forked from M-Labs/artiq
firmware: clean up makefiles.
This commit is contained in:
parent
e14626e432
commit
3ba82cf19c
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue