diff options
Diffstat (limited to 'board/trab/Makefile')
-rw-r--r-- | board/trab/Makefile | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/board/trab/Makefile b/board/trab/Makefile index 08a1dbc..f376771 100644 --- a/board/trab/Makefile +++ b/board/trab/Makefile @@ -28,9 +28,27 @@ LIB = lib$(BOARD).a OBJS := trab.o flash.o vfd.o cmd_trab.o memory.o tsc2000.o SOBJS := memsetup.o +gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) + +LOAD_ADDR = 0xc100000 + +######################################################################### + +all: $(LIB) trab_fkt.srec trab_fkt.bin + $(LIB): $(OBJS) $(SOBJS) $(AR) crv $@ $(OBJS) $(SOBJS) +trab_fkt.srec: trab_fkt.o rs485.o tsc2000.o $(LIB) + $(LD) -g -Ttext $(LOAD_ADDR) -o $(<:.o=) -e $(<:.o=) $^ $(LIB) \ + -L../../examples -lstubs \ + -L../../lib_generic -lgeneric \ + -L$(gcclibdir) -lgcc + $(OBJCOPY) -O srec $(<:.o=) $@ + +trab_fkt.bin: trab_fkt.srec + $(OBJCOPY) -O binary $< $@ 2>/dev/null + clean: rm -f $(SOBJS) $(OBJS) |