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

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [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
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
SUBDIRS = drivers common cmds services
16
 
17
LIBS  = common/common_o.o cmds/cmds.o services/services.o drivers/drivers.o
18
 
19
#########################################################################
20
 
21
all: orpmon.or32 orpmon-flash.or32
22
 
23
reset.o: reset.S Makefile
24
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=0
25
 
26
reset-flash.o: reset.S Makefile
27
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=1
28
 
29
orpmon.or32: depend subdirs reset.o $(LIBS) Makefile
30
        $(LD) -Tram.ld -o $@ reset.o $(LIBS)
31
 
32
orpmon-flash.or32: depend subdirs reset-flash.o $(LIBS) Makefile
33
        $(LD) -Tflash.ld -o $@ reset-flash.o $(LIBS)
34
 
35
System.map:     orpmon.or32
36
 
37
                @$(NM) $< | \
38
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
39
                sort > System.map
40
 
41
#########################################################################
42
 
43
depend dep:
44
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done
45
 
46
subdirs:
47
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done
48
 
49
clean:
50
        find . -type f \
51
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
52
                -o -name '*.o'  -o -name '*.a' \
53
                -o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \
54
                -o -name '*.mem' -o -name '*.img' \) -print \
55
                | xargs rm -f
56
        rm -f System.map
57
 
58
distclean: clean
59
        find . -type f \
60
                \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
61
                -print | xargs rm -f
62
        rm -f $(OBJS) *.bak tags TAGS
63
        rm -fr *.*~
64
 
65
#########################################################################

powered by: WebSVN 2.1.0

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