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

Subversion Repositories openrisc

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

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

powered by: WebSVN 2.1.0

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