URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 140 |
Rev 175 |
?rev1line? |
?rev2line? |
|
#########################################################################
|
|
|
|
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
|
else if [ -x /bin/bash ]; then echo /bin/bash; \
|
|
else echo sh; fi ; fi)
|
|
|
|
HOSTCC = cc
|
|
#HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
|
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fno-omit-frame-pointer -g
|
|
|
|
#
|
|
# Specify the path to the tool chain
|
|
#
|
|
TOOL_PREFIX = /tools/or32-uclinux
|
|
|
|
#########################################################################
|
|
|
|
#
|
|
# Include the make variables (CC, etc...)
|
|
#
|
|
AS = $(CROSS_COMPILE)as
|
|
LD = $(CROSS_COMPILE)ld
|
|
CC = $(CROSS_COMPILE)gcc
|
|
AR = $(CROSS_COMPILE)ar
|
|
NM = $(CROSS_COMPILE)nm
|
|
STRIP = $(CROSS_COMPILE)strip
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
RANLIB = $(CROSS_COMPILE)ranlib
|
|
|
|
CFLAGS += -I$(TOPDIR)/include -DOR1K -Wall -Wstrict-prototypes
|
|
CFLAGS += -Werror-implicit-function-declaration -fno-omit-frame-pointer
|
|
CFLAGS += -fno-strength-reduce -O2 -g -pipe -fno-builtin
|
|
#CFLAGS += -msoft-mul -msoft-div -nostdlib
|
|
CFLAGS += -nostdlib
|
|
#CFLAGS += -DDEBUG
|
|
|
|
|
|
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
|
|
LDFLAGS+= $(LIBGCC)
|
|
|
|
#########################################################################
|
|
|
|
export CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE \
|
|
AS LD CC AR NM STRIP OBJCOPY OBJDUMP \
|
|
MAKE CFLAGS ASFLAGS
|
|
|
|
#########################################################################
|
|
|
|
%.o: %.S
|
|
$(CC) $(CFLAGS) -c -o $@ $(CURDIR)/$<
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
%.bin: %.or32
|
|
or32-rtems-objcopy -O binary $< $@
|
|
|
|
%.img: %.bin
|
|
utils/bin2flimg 1 $< > $@
|
|
|
|
%.srec: %.bin
|
|
utils/bin2srec $< > $@
|
|
|
|
#########################################################################
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.