summaryrefslogtreecommitdiffstats
path: root/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'utils/atj2137/adfuload/test_binary/backlight_c/Makefile')
-rw-r--r--utils/atj2137/adfuload/test_binary/backlight_c/Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/utils/atj2137/adfuload/test_binary/backlight_c/Makefile b/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
new file mode 100644
index 0000000000..a3cc13642a
--- /dev/null
+++ b/utils/atj2137/adfuload/test_binary/backlight_c/Makefile
@@ -0,0 +1,40 @@
+
+TARGET = test_bl_c
+
+TOOLCHAIN = mipsel-elf-
+
+CC = $(TOOLCHAIN)gcc
+CPP = $(TOOLCHAIN)cpp
+LD = $(TOOLCHAIN)gcc
+AS = $(TOOLCHAIN)as
+OBJCOPY = $(TOOLCHAIN)objcopy
+OBJDUMP = $(TOOLCHAIN)objdump
+
+CFLAGS = -Wundef -march=4kec -nostdlib -Os -c
+
+OBJS = crt0.o test_bl.o
+LDSCRIPT= test_bl.lds
+
+LDFLAGS = -Wundef -march=4kec -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) -c $< -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