mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-12-23 17:59:32 +02:00
[flash-tool] fix Makefile format, delete space at the end of line
This commit is contained in:
parent
308372ddc7
commit
6fda698e00
@ -1,82 +1,82 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2006 Ingenic Semiconductor Inc.
|
# Copyright (C) 2006 Ingenic Semiconductor Inc.
|
||||||
# By Lucifer
|
# By Lucifer
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
#
|
#
|
||||||
|
|
||||||
FLASH_TOOL_BIN_PATH = ../bin
|
FLASH_TOOL_BIN_PATH = ../bin
|
||||||
FLASH_TOOL_SRC_PATH = ../src
|
FLASH_TOOL_SRC_PATH = ../src
|
||||||
|
|
||||||
ifeq ($(CROSS_COMPILE),)
|
ifeq ($(CROSS_COMPILE),)
|
||||||
$(error CROSS_COMPILE variable not set)
|
$(error CROSS_COMPILE variable not set)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC := $(CROSS_COMPILE)gcc
|
CC := $(CROSS_COMPILE)gcc
|
||||||
AR := $(CROSS_COMPILE)ar rcsv
|
AR := $(CROSS_COMPILE)ar rcsv
|
||||||
LD := $(CROSS_COMPILE)ld
|
LD := $(CROSS_COMPILE)ld
|
||||||
OBJCOPY := $(CROSS_COMPILE)objcopy
|
OBJCOPY := $(CROSS_COMPILE)objcopy
|
||||||
NM := $(CROSS_COMPILE)nm
|
NM := $(CROSS_COMPILE)nm
|
||||||
OBJDUMP := $(CROSS_COMPILE)objdump
|
OBJDUMP := $(CROSS_COMPILE)objdump
|
||||||
|
|
||||||
CFLAGS := -mips32 -O2 -FPIC \
|
CFLAGS := -mips32 -O2 -FPIC \
|
||||||
-fno-exceptions -ffunction-sections \
|
-fno-exceptions -ffunction-sections \
|
||||||
-fomit-frame-pointer -msoft-float -G 0
|
-fomit-frame-pointer -msoft-float -G 0
|
||||||
|
|
||||||
#CFLAGS := -mips32 -O2 -FPIC -mno-abicalls -fno-builtin \
|
#CFLAGS := -mips32 -O2 -FPIC -mno-abicalls -fno-builtin \
|
||||||
|
|
||||||
LDFLAGS := -nostdlib -T target.ld $(CFLAGS)
|
LDFLAGS := -nostdlib -T target.ld $(CFLAGS)
|
||||||
|
|
||||||
LIBS := -lstdc++ -lc -lm -lgcc
|
LIBS := -lstdc++ -lc -lm -lgcc
|
||||||
|
|
||||||
USBBOOTDIR := .
|
USBBOOTDIR := .
|
||||||
|
|
||||||
LIBDIR :=
|
LIBDIR :=
|
||||||
|
|
||||||
#SOURCES += $(wildcard $(USBBOOTDIR)/usb_boot/*.c)
|
#SOURCES += $(wildcard $(USBBOOTDIR)/usb_boot/*.c)
|
||||||
|
|
||||||
SOURCES := ./usb_boot/main.c \
|
SOURCES := ./usb_boot/main.c \
|
||||||
./usb_boot/udc.c \
|
./usb_boot/udc.c \
|
||||||
./usb_boot/cache.c \
|
./usb_boot/cache.c \
|
||||||
./usb_boot/serial.c \
|
./usb_boot/serial.c \
|
||||||
./usb_boot/boothandler.c
|
./usb_boot/boothandler.c
|
||||||
SOURCES += $(wildcard $(USBBOOTDIR)/nandflash/*.c)
|
SOURCES += $(wildcard $(USBBOOTDIR)/nandflash/*.c)
|
||||||
SOURCES += $(wildcard $(USBBOOTDIR)/usb_boot/*.S)
|
SOURCES += $(wildcard $(USBBOOTDIR)/usb_boot/*.S)
|
||||||
|
|
||||||
HEADS := $(SOCDIR)/head.S
|
HEADS := $(SOCDIR)/head.S
|
||||||
|
|
||||||
CFLAGS += -I$(SOCDIR)/include -I$(USBBOOTDIR)/usb_boot \
|
CFLAGS += -I$(SOCDIR)/include -I$(USBBOOTDIR)/usb_boot \
|
||||||
-I$(USBBOOTDIR)/nandflash -I$(USBBOOTDIR)/include \
|
-I$(USBBOOTDIR)/nandflash -I$(USBBOOTDIR)/include \
|
||||||
-I$(FLASH_TOOL_SRC_PATH)
|
-I$(FLASH_TOOL_SRC_PATH)
|
||||||
|
|
||||||
OBJS := $(addsuffix .o , $(basename $(notdir $(SOURCES))))
|
OBJS := $(addsuffix .o , $(basename $(notdir $(SOURCES))))
|
||||||
HEADO := $(addsuffix .o , $(basename $(notdir $(HEADS))))
|
HEADO := $(addsuffix .o , $(basename $(notdir $(HEADS))))
|
||||||
|
|
||||||
TARGET := usb_boot
|
TARGET := usb_boot
|
||||||
APP := $(TARGET).elf
|
APP := $(TARGET).elf
|
||||||
|
|
||||||
VPATH := $(ARCHDIR) $(SOCDIR) $(OSDIR) $(USBBOOTDIR)/usb_boot \
|
VPATH := $(ARCHDIR) $(SOCDIR) $(OSDIR) $(USBBOOTDIR)/usb_boot \
|
||||||
$(USBBOOTDIR)/norflash $(USBBOOTDIR)/nandflash
|
$(USBBOOTDIR)/norflash $(USBBOOTDIR)/nandflash
|
||||||
|
|
||||||
all: $(APP)
|
all: $(APP)
|
||||||
$(OBJCOPY) -O binary $(APP) $(TARGET).bin
|
$(OBJCOPY) -O binary $(APP) $(TARGET).bin
|
||||||
$(OBJDUMP) -D $(APP) > $(TARGET).dump
|
$(OBJDUMP) -D $(APP) > $(TARGET).dump
|
||||||
$(NM) $(APP) | sort > $(TARGET).sym
|
$(NM) $(APP) | sort > $(TARGET).sym
|
||||||
$(OBJDUMP) -h $(APP) > $(TARGET).map
|
$(OBJDUMP) -h $(APP) > $(TARGET).map
|
||||||
mkdir -p $(FLASH_TOOL_BIN_PATH)
|
mkdir -p $(FLASH_TOOL_BIN_PATH)
|
||||||
cp $(TARGET).bin $(FLASH_TOOL_BIN_PATH)
|
cp $(TARGET).bin $(FLASH_TOOL_BIN_PATH)
|
||||||
|
|
||||||
$(APP): $(HEADO) $(OBJS) $(EXTLIBS)
|
$(APP): $(HEADO) $(OBJS) $(EXTLIBS)
|
||||||
$(CC) $(LDFLAGS) $^ -o $@
|
$(CC) $(LDFLAGS) $^ -o $@
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||||||
.cpp.o:
|
.cpp.o:
|
||||||
$(CC) $(CFLAGS) -fno-rtti -fvtable-gc -o $@ -c $<
|
$(CC) $(CFLAGS) -fno-rtti -fvtable-gc -o $@ -c $<
|
||||||
.S.o:
|
.S.o:
|
||||||
$(CC) $(CFLAGS) -o $@ -c $<
|
$(CC) $(CFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr *.o $(APP) $(OBJS) core $(OTHER) *.sym *.map *.dump *.bin *.lib *.~ *.\#
|
rm -fr *.o $(APP) $(OBJS) core $(OTHER) *.sym *.map *.dump *.bin *.lib *~ *.\#
|
||||||
|
Loading…
Reference in New Issue
Block a user