Line 45... |
Line 45... |
TEST ?= add
|
TEST ?= add
|
AMBER_CROSSTOOL ?= amber-crosstool-not-defined
|
AMBER_CROSSTOOL ?= amber-crosstool-not-defined
|
TOOLSPATH = ../../sw/tools
|
TOOLSPATH = ../../sw/tools
|
|
|
TGT = $(addsuffix .elf, $(basename $(TEST)))
|
TGT = $(addsuffix .elf, $(basename $(TEST)))
|
MMP = $(addsuffix _memparams.v, $(basename $(TGT)))
|
MMP32 = $(addsuffix _memparams32.v, $(basename $(TGT)))
|
|
MMP128 = $(addsuffix _memparams128.v, $(basename $(TGT)))
|
SRC = $(addsuffix .S, $(basename $(TEST)))
|
SRC = $(addsuffix .S, $(basename $(TEST)))
|
MEM = $(addsuffix .mem, $(basename $(TGT)))
|
MEM = $(addsuffix .mem, $(basename $(TGT)))
|
DIS = $(addsuffix .dis, $(basename $(TGT)))
|
DIS = $(addsuffix .dis, $(basename $(TGT)))
|
OBJ = $(addsuffix .o, $(basename $(SRC)))
|
OBJ = $(addsuffix .o, $(basename $(SRC)))
|
MAP = $(addsuffix .map, $(basename $(TGT)))
|
MAP = $(addsuffix .map, $(basename $(TGT)))
|
Line 61... |
Line 62... |
AR = $(AMBER_CROSSTOOL)-ar
|
AR = $(AMBER_CROSSTOOL)-ar
|
LD = $(AMBER_CROSSTOOL)-ld
|
LD = $(AMBER_CROSSTOOL)-ld
|
DS = $(AMBER_CROSSTOOL)-objdump
|
DS = $(AMBER_CROSSTOOL)-objdump
|
OC = $(AMBER_CROSSTOOL)-objcopy
|
OC = $(AMBER_CROSSTOOL)-objcopy
|
ELF = ../../sw/tools/amber-elfsplitter
|
ELF = ../../sw/tools/amber-elfsplitter
|
BMF = ../../sw/tools/amber-memparams.sh
|
BMF32 = ../../sw/tools/amber-memparams32.sh
|
|
BMF128 = ../../sw/tools/amber-memparams128.sh
|
|
|
ASFLAGS = -I../../sw/include
|
ASFLAGS = -I../../sw/include
|
CFLAGS = -c -march=armv2a -mno-thumb-interwork -I../../sw/include
|
CFLAGS = -c -march=armv2a -mno-thumb-interwork -I../../sw/include
|
DSFLAGS = -C -S -EL
|
DSFLAGS = -C -S -EL
|
LDFLAGS = -Bstatic -Map $(MAP) --fix-v4bx
|
LDFLAGS = -Bstatic -Map $(MAP) --fix-v4bx
|
|
|
|
|
all: $(ELF) $(MMP) $(DIS)
|
all: $(ELF) $(MMP32) $(MMP128) $(DIS)
|
|
|
$(MMP): $(MEM)
|
$(MMP32): $(MEM)
|
$(BMF) $(MEM) $(MMP)
|
$(BMF32) $(MEM) $(MMP32)
|
|
|
|
$(MMP128): $(MEM)
|
|
$(BMF128) $(MEM) $(MMP128)
|
|
|
$(MEM): $(TGT)
|
$(MEM): $(TGT)
|
$(ELF) $(TGT) > $(MEM)
|
$(ELF) $(TGT) > $(MEM)
|
|
|
$(TGT): $(OBJ)
|
$(TGT): $(OBJ)
|
Line 90... |
Line 95... |
|
|
$(ELF):
|
$(ELF):
|
$(MAKE) -C $(TOOLSPATH)
|
$(MAKE) -C $(TOOLSPATH)
|
|
|
clean:
|
clean:
|
@rm -rfv *.o *.elf *.dis *.map *.mem *_memparams.v
|
@rm -rfv *.o *.elf *.dis *.map *.mem *_memparams*.v
|
|
|