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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [Makefile] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 809 simons
ifndef CROSS_COMPILE
2 1495 jcastillo
CROSS_COMPILE = or32-uclinux-
3 809 simons
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
 
22 1312 jurem
all: build.h orpmon.or32 orpmon-flash.or32
23
 
24
build.h:
25
        echo "#define BUILD_VERSION \"`date`\"" > $(TOPDIR)/include/build.h
26
 
27 832 markom
docs: Makefile
28
        $(MAKE) -C doc docs || exit 1
29
 
30 809 simons
reset.o: reset.S Makefile
31
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=0
32
 
33
reset-flash.o: reset.S Makefile
34
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=1
35
 
36 820 markom
orpmon.or32: depend subdirs reset.o $(LIBS) Makefile gencrc
37 1312 jurem
        $(LD) -Tram.ld -o $@ reset.o $(LIBS) $(LDFLAGS)
38 878 rherveille
#       $(OBJCOPY) -j .text -O binary $@ $@.tmp
39 822 markom
#-S -j .vectors -j .text -j .data -j .rodata
40 878 rherveille
#       ./gencrc $@.tmp $@
41 809 simons
 
42 820 markom
orpmon-flash.or32: depend subdirs reset-flash.o $(LIBS) Makefile gencrc
43 1312 jurem
        $(LD) -Tflash.ld -o $@ reset-flash.o $(LIBS) $(LDFLAGS)
44 1013 simons
        $(OBJCOPY) -O binary $@ $@.tmp
45 809 simons
 
46 1030 simons
#       ../utils/bin2flimg 4 $@.tmp > $@.mem
47
 
48 820 markom
gencrc: gencrc.c
49
        $(HOSTCC) -o gencrc -g gencrc.c
50
 
51 832 markom
System.map: orpmon.or32
52
        @$(NM) $< | \
53 809 simons
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
54
                sort > System.map
55
 
56
#########################################################################
57
 
58
depend dep:
59
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
60
 
61
subdirs:
62
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
63
 
64
clean:
65
        find . -type f \
66
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
67 880 mohor
                -o -name '*.o'  -o -name '*.tmp' \
68 809 simons
                -o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \
69 832 markom
                -o -name '*.mem' -o -name '*.img' -o -name '*.out' \
70
                -o -name '*.aux' -o -name '*.log' \) -print \
71 809 simons
                | xargs rm -f
72
        rm -f System.map
73
 
74
distclean: clean
75
        find . -type f \
76 832 markom
                \( -name .depend -o -name '*.srec' -o -name '*.bin' \
77
                -o -name '*.pdf' \) \
78 809 simons
                -print | xargs rm -f
79
        rm -f $(OBJS) *.bak tags TAGS
80
        rm -fr *.*~
81 1312 jurem
        rm -f gencrc
82 809 simons
#########################################################################

powered by: WebSVN 2.1.0

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