1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-22 23:21:53 +02:00

add stage1 Makefile

This commit is contained in:
xiangfu 2009-06-05 12:05:15 +00:00
parent aa3bea3a1b
commit e0ae71e850

View File

@ -0,0 +1,47 @@
#
# Makefile for the JZ4740 internal boot rom code.
#
# (C) Copyright 2009
# Author: Xiangfu Liu <xiangfu.z@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 3 as published by the Free Software Foundation.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA
FLASH_TOOL_PATH = ..
CROSS := mipsel-linux-
CFLAGS := -O2 -mips32 -fno-pic -mno-abicalls -I..
LDFLAGS := -nostdlib -EL -T target.ld
OBJS = head.o main.o common.o board_4740.o board_4750.o debug.o
all: fw.bin
fw.bin: fw.elf
$(CROSS)objcopy -O binary $< $@
$(CROSS)objdump -D $< > fw.dump
$(CROSS)objdump -h $< > fw.map
$(CROSS)nm -n $< > System.map
cp fw.bin $(FLASH_TOOL_PATH)
fw.elf: $(OBJS)
$(CROSS)ld $(LDFLAGS) $(OBJS) -o $@
.c.o:
$(CROSS)gcc $(CFLAGS) -c $< -o $@
.S.o:
$(CROSS)gcc $(CFLAGS) -c $< -o $@
clean:
rm -f *.o *.elf *.bin *.dump *.map
rm -f *~