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

Subversion Repositories or1k

[/] [or1k/] [branches/] [oc/] [orpmon/] [Makefile] - Rev 1765

Compare with Previous | Blame | View Log

ifndef CROSS_COMPILE
CROSS_COMPILE = or32-uclinux-
endif

export  CROSS_COMPILE

#########################################################################

TOPDIR  := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
export  TOPDIR

include $(TOPDIR)/config.mk

# order is important here:
SUBDIRS = drivers common cmds services 

LIBS  = common/common_o.o cmds/cmds.o services/services.o drivers/drivers.o

#########################################################################

all: orpmon.or32 orpmon-flash.or32

reset.o: reset.S Makefile
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=0

reset-flash.o: reset.S Makefile
        $(CC) -c -o $@ $< $(CFLAGS) -DIN_FLASH=1

orpmon.or32: depend subdirs reset.o $(LIBS) Makefile
        $(LD) -Tram.ld -o $@ reset.o $(LIBS)

orpmon-flash.or32: depend subdirs reset-flash.o $(LIBS) Makefile
        $(LD) -Tflash.ld -o $@ reset-flash.o $(LIBS)

System.map:     orpmon.or32

                @$(NM) $< | \
                grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
                sort > System.map

#########################################################################

depend dep:
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir .depend ; done

subdirs:
        @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir || exit 1 ; done

clean:
        find . -type f \
                \( -name 'core' -o -name '*.bak' -o -name '*~' \
                -o -name '*.o'  -o -name '*.a' \
                -o -name '*.or32' -o -name '*.bin' -o -name '*.srec' \
                -o -name '*.mem' -o -name '*.img' \) -print \
                | xargs rm -f
        rm -f System.map

distclean: clean
        find . -type f \
                \( -name .depend -o -name '*.srec' -o -name '*.bin' \) \
                -print | xargs rm -f
        rm -f $(OBJS) *.bak tags TAGS
        rm -fr *.*~

#########################################################################

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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