OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [Makefile] - Blame information for rev 282

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 marcus.erl
ifndef CROSS_COMPILE
2
CROSS_COMPILE = or32-elf-
3
endif
4
 
5
export  CROSS_COMPILE
6
 
7 140 julius
 
8 2 marcus.erl
#########################################################################
9
 
10
TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
11
export  TOPDIR
12
 
13
include $(TOPDIR)/config.mk
14
 
15
# order is important here:
16
SUBDIRS = drivers common cmds services doc
17
 
18
LIBS  = common/common_o.o cmds/cmds.o services/services.o drivers/drivers.o
19
 
20
#########################################################################
21
 
22
 
23
all: build.h orpmon.or32 orpmon-flash.or32
24
 
25
build.h:
26
        echo "#define BUILD_VERSION \"`date`\"" > $(TOPDIR)/include/build.h
27
 
28
docs: Makefile
29
        $(MAKE) -C doc docs || exit 1
30
 
31
reset.o: reset.S Makefile
32
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=0
33
 
34
reset-flash.o: reset.S Makefile
35
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=1
36
 
37
orpmon.or32: depend subdirs reset.o $(LIBS) Makefile gencrc
38 140 julius
        $(LD) -Tram.ld -o $@ reset.o -e 256 $(LIBS) $(LDFLAGS)
39
        $(OBJCOPY) -O binary $@ $@.bin
40 2 marcus.erl
#-S -j .vectors -j .text -j .data -j .rodata
41
#       ./gencrc $@.tmp $@
42
 
43
orpmon-flash.or32: depend subdirs reset-flash.o $(LIBS) Makefile gencrc
44
        $(LD) -Tflash.ld -o $@ reset-flash.o $(LIBS) $(LDFLAGS)
45
        $(OBJCOPY) -O binary $@ $@.tmp
46
 
47
#       ../utils/bin2flimg 4 $@.tmp > $@.mem
48
 
49
gencrc: gencrc.c
50
        $(HOSTCC) -o gencrc -g gencrc.c
51
 
52
System.map: orpmon.or32
53
        @$(NM) $< | \
54
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
55
                sort > System.map
56
 
57
#########################################################################
58
 
59
depend dep:
60
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
61
 
62
subdirs:
63
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
64
 
65
clean:
66
        find . -type f \
67
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
68
                -o -name '*.o'  -o -name '*.tmp' \
69
                -o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \
70
                -o -name '*.mem' -o -name '*.img' -o -name '*.out' \
71
                -o -name '*.aux' -o -name '*.log' \) -print \
72
                | xargs rm -f
73
        rm -f System.map
74
 
75
distclean: clean
76
        find . -type f \
77
                \( -name .depend -o -name '*.srec' -o -name '*.bin' \
78
                -o -name '*.pdf' \) \
79
                -print | xargs rm -f
80
        rm -f $(OBJS) *.bak tags TAGS
81
        rm -fr *.*~
82
        rm -f gencrc
83
#########################################################################

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.