simplified Makefile
This commit is contained in:
@@ -30,7 +30,10 @@ MAPFILE=bas.map
|
|||||||
LDCFILE=bas.lk
|
LDCFILE=bas.lk
|
||||||
LDCSRC=bas.lk.S
|
LDCSRC=bas.lk.S
|
||||||
|
|
||||||
EXEC=bas.s19
|
# this Makefile can create the BaS to flash or an arbitrary ram address (for BDM debugging). See
|
||||||
|
# below for the definition of TARGET_ADDRESS
|
||||||
|
FLASH_EXEC=bas.s19
|
||||||
|
RAM_EXEC=ram.s19
|
||||||
|
|
||||||
CSRCS= \
|
CSRCS= \
|
||||||
$(SRCDIR)/sysinit.c \
|
$(SRCDIR)/sysinit.c \
|
||||||
@@ -54,20 +57,18 @@ AOBJS=$(patsubst $(SRCDIR)/%.o,$(OBJDIR)/%.o,$(patsubst %.S,%.o,$(ASRCS)))
|
|||||||
|
|
||||||
OBJS=$(COBJS) $(AOBJS)
|
OBJS=$(COBJS) $(AOBJS)
|
||||||
|
|
||||||
.PHONY all: $(EXEC)
|
.PHONY all: $(FLASH_EXEC)
|
||||||
|
.PHONY ram: $(RAM_EXEC)
|
||||||
.PHONY clean:
|
.PHONY clean:
|
||||||
@ rm -f $(EXEC) $(STRT_OBJ) $(OBJS) $(MAPFILE) $(LDCFILE) depend
|
@ rm -f $(FLASH_EXEC) $(RAM_EXEC) $(STRT_OBJ) $(OBJS) $(MAPFILE) $(LDCFILE) depend
|
||||||
|
|
||||||
|
$(FLASH_EXEC): TARGET_ADDRESS=0xe0000000
|
||||||
|
$(RAM_EXEC): TARGET_ADDRESS=0x01000000
|
||||||
|
|
||||||
$(EXEC): $(STRT_OBJ) $(OBJS) $(LDCSRC)
|
$(FLASH_EXEC) $(RAM_EXEC): $(STRT_OBJ) $(OBJS)
|
||||||
$(CPP) -P -DTARGET_ADDRESS=0xe0000000 $(LDCSRC) -o $(LDCFILE)
|
$(CPP) -P -DTARGET_ADDRESS=$(TARGET_ADDRESS) $(LDCSRC) -o $(LDCFILE)
|
||||||
$(LD) --oformat srec -Map $(MAPFILE) --cref -T $(LDCFILE) -s -o $@
|
$(LD) --oformat srec -Map $(MAPFILE) --cref -T $(LDCFILE) -s -o $@
|
||||||
|
|
||||||
ram: $(STRT_OBJ) $(OBJS) $(LDCSRC)
|
|
||||||
$(CPP) -P -DTARGET_ADDRESS=0x01000000 $(LDCSRC) -o $(LDCFILE)
|
|
||||||
$(LD) --oformat srec -Map $(MAPFILE) --cref -T $(LDCFILE) -s -o $@.s19
|
|
||||||
|
|
||||||
# compile init_fpga with -mbitfield for testing purposes
|
# compile init_fpga with -mbitfield for testing purposes
|
||||||
$(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield
|
$(OBJDIR)/init_fpga.o: CFLAGS += -mbitfield
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user