1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-26 14:12:28 +02:00

more Makefile

This commit is contained in:
shiyele 2009-06-25 02:29:19 +00:00
parent 3aea251e8c
commit 91bfa7b122

View File

@ -28,31 +28,21 @@ LIBS := -lstdc++ -lc -lm -lgcc
USBBOOTDIR := . USBBOOTDIR := .
SOURCES := ./usb_boot/main.c \
./usb_boot/udc.c \
./usb_boot/cache.c \
./usb_boot/serial.c \
./usb_boot/boothandler.c \
./nandflash/nandflash_4740.c \
./nandflash/nandflash_4750.c
CFLAGS += -I$(USBBOOTDIR)/usb_boot \ CFLAGS += -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 := main.o udc.o cache.o serial.o boothandler.o nandflash_4740.o nandflash_4750.o
APP := xburst_stage2.elf
VPATH := $(USBBOOTDIR)/usb_boot $(USBBOOTDIR)/nandflash VPATH := $(USBBOOTDIR)/usb_boot $(USBBOOTDIR)/nandflash
all: $(APP) all: xburst_stage2.elf
$(OBJCOPY) -O binary $(APP) xburst_stage2.bin $(OBJCOPY) -O binary xburst_stage2.elf xburst_stage2.bin
$(OBJDUMP) -D $(APP) > xburst_stage2.dump $(OBJDUMP) -D xburst_stage2.elf > xburst_stage2.dump
$(NM) $(APP) | sort > xburst_stage2.sym $(NM) xburst_stage2.elf | sort > xburst_stage2.sym
$(OBJDUMP) -h $(APP) > xburst_stage2.map $(OBJDUMP) -h xburst_stage2.elf > xburst_stage2.map
$(APP): head.o $(OBJS) xburst_stage2.elf: head.o $(OBJS)
$(CC) $(LDFLAGS) $^ -o $@ $(CC) $(LDFLAGS) $^ -o $@
.c.o: .c.o:
@ -64,4 +54,4 @@ $(APP): head.o $(OBJS)
clean: clean:
rm -f $(addprefix xburst_stage2., bin dump elf map sym) rm -f $(addprefix xburst_stage2., bin dump elf map sym)
rm -f $(OBJS) rm -f head.o $(OBJS)