Root/nandboot/src/Makefile

1#
2# Makefile of the n-boot
3#
4# Copyright (c) 2005-2008 Ingenic Semiconductor Inc.
5#
6# This program is free software; you can redistribute it and/or
7# modify it under the terms of the GNU General Public License as
8# published by the Free Software Foundation; either version 2 of
9# the License, or (at your option) any later version.
10#
11
12OBJS := head.o nand_boot.o cpu.o jz_serial.o \
13       jz4730.o jz4730_nand.o jz4730_board.o \
14       jz4740.o jz4740_nand.o jz4740_board.o
15
16CROSS := mipsel-openwrt-linux-
17
18CFLAGS := -O2 -G 0 -mno-abicalls -fno-pic -mips32 -I../include -I../
19AFLAGS = -D__ASSEMBLY__ $(CFLAGS)
20LDFLAGS := -T ld.script -nostdlib -EL
21
22.c.o:
23    $(CROSS)gcc $(CFLAGS) -c $< -o $@
24.S.o:
25    $(CROSS)gcc $(AFLAGS) -c $< -o $@
26
27n-boot.bin: n-boot
28    $(CROSS)objdump -D n-boot $< > n-boot.dump
29    $(CROSS)objcopy -O binary $< $@
30
31n-boot: $(OBJS)
32    $(CROSS)ld $(LDFLAGS) $^ -o $@
33
34clean:
35    rm -fr *.o n-boot n-boot.bin n-boot.dump
36
37

Archive Download this file



interactive