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

Subversion Repositories or1k

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

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
        ../utils/bin2flimg 4 $@.tmp > $@.mem
42 809 simons
 
43 820 markom
gencrc: gencrc.c
44
        $(HOSTCC) -o gencrc -g gencrc.c
45
 
46 832 markom
System.map: orpmon.or32
47
        @$(NM) $< | \
48 809 simons
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
49
                sort > System.map
50
 
51
#########################################################################
52
 
53
depend dep:
54
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
55
 
56
subdirs:
57
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
58
 
59
clean:
60
        find . -type f \
61
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
62 880 mohor
                -o -name '*.o'  -o -name '*.tmp' \
63 809 simons
                -o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \
64 832 markom
                -o -name '*.mem' -o -name '*.img' -o -name '*.out' \
65
                -o -name '*.aux' -o -name '*.log' \) -print \
66 809 simons
                | xargs rm -f
67
        rm -f System.map
68
 
69
distclean: clean
70
        find . -type f \
71 832 markom
                \( -name .depend -o -name '*.srec' -o -name '*.bin' \
72
                -o -name '*.pdf' \) \
73 809 simons
                -print | xargs rm -f
74
        rm -f $(OBJS) *.bak tags TAGS
75
        rm -fr *.*~
76
 
77
#########################################################################

powered by: WebSVN 2.1.0

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