rockbox/utils/atj2137/adfuload/test_binary/lcm/Makefile
Marcin Bukat c626fe7004 atj213x: e100/150 lcd test binary
Change-Id: I3f9fa21dcb33d1cd3081d0c995adfb44e085dd7a
2014-10-18 20:18:01 +02:00

40 lines
855 B
Makefile

TARGET = lcm
TOOLCHAIN = mipsel-elf-
CC = $(TOOLCHAIN)gcc
CPP = $(TOOLCHAIN)cpp
LD = $(TOOLCHAIN)gcc
AS = $(TOOLCHAIN)as
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
CFLAGS = -Wundef -march=mips32r2 -nostdlib -Os -G0 -c
OBJS = crt0.o test_lcm.o system-atj213x.o irq_handler.o rockboxlogo.240x74x16.o
LDSCRIPT= test.lds
LDFLAGS = -Wundef -march=mips32r2 -T$(LDSCRIPT) -nostartfiles \
-nostdlib -Xlinker -Map=$(TARGET).map
all : $(TARGET).bin
ls -ls $(TARGET).bin
%.o : %.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(INCDIRS) $< -o $@
%.o : %.S
$(CC) $(CFLAGS) $< -o $@
$(TARGET).elf : $(OBJS)
$(LD) $(LDFLAGS) $(OBJS) $(LIBDIRS) $(LIBS) -o $(TARGET).elf
$(TARGET).bin : $(TARGET).elf
$(OBJCOPY) -O binary $(TARGET).elf $(TARGET).bin
clean :
rm -f $(OBJS)
rm -f $(TARGET).elf
rm -f $(TARGET).bin
rm -f $(TARGET).map