source: trunk/loader/a800/Makefile @ 1723

Revision 1723, 990 bytes checked in by reyalp, 2 years ago (diff)

a800 100a port from mland, patch by waterwings in http://chdk.setepontos.com/index.php?topic=650.msg81174#msg81174

  • Property svn:eol-style set to LF
Line 
1curdir=./
2topdir=../../
3
4include $(topdir)makefile.inc
5SUBDIRS=resetcode
6
7LDLIBS=
8LDOPTS=-nostdlib -Wl,--allow-shlib-undefined -Wl,--no-define-common,-EL,-T,$(topdir)tools/link-boot.ld
9LDOPTS+=-Wl,-N,-Ttext,$(MEMBASEADDR)
10
11CPPFLAGS+=-I.
12
13CORE_FILE=$(topdir)core/main.bin
14RESET_FILE=$(curdir)resetcode/main.bin
15
16CPPFLAGS+=-DCORE_FILE=\"$(CORE_FILE)\"
17CPPFLAGS+=-DRESET_FILE=\"$(RESET_FILE)\"
18
19all: all-recursive main.bin
20
21OBJS=entry.o main.o blobs.o
22
23main.bin: main.elf
24        @echo $< \-\> $@
25        $(OBJDUMP) -z -d main.elf > main.dump
26        $(OBJCOPY) -O binary main.elf main.bin
27
28main.elf: $(OBJS)
29        @echo \-\> $@
30        $(CC) $(CFLAGS) -o $@ $^   $(LDLIBS) $(LDFLAGS) $(LDOPTS)
31        ( $(NM) $@ | grep ' U ' > $@.syms ) && exit 1 || exit 0
32
33clean: clean-recursive
34        rm -f $(OBJS) main.bin main.elf main.dump main.elf.syms
35
36distclean: distclean-recursive
37        rm -f $(OBJS) main.bin main.elf main.dump main.elf.syms
38        rm -f reboot_core.h copy_and_reset.h
39
40blobs.o: $(RESET_FILE) $(CORE_FILE)
41
42include $(topdir)bottom.inc
Note: See TracBrowser for help on using the repository browser.