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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [hello-uart/] [Makefile] - Rev 1777

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

ifndef CROSS_COMPILE
CROSS_COMPILE = or32-uclinux-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)ld
NM = $(CROSS_COMPILE)nm
endif

export  CROSS_COMPILE

all: hello.or32

reset.o: reset.S Makefile
        $(CC) -g -c -o $@ $< $(CFLAGS)

hello.o: hello.c Makefile
        $(CC) -g -c -o $@ $< $(CFLAGS)

hello.or32: reset.o hello.o Makefile
        $(LD) -Tram.ld -o $@ reset.o hello.o $(LIBS)


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

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

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


Go to most recent revision | 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.