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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [orpmon/] [Makefile] - Blame information for rev 1030

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

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

powered by: WebSVN 2.1.0

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