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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [config.mk] - Blame information for rev 457

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

Line No. Rev Author Line
1 2 marcus.erl
#########################################################################
2
 
3
CONFIG_SHELL    := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
4
                    else if [ -x /bin/bash ]; then echo /bin/bash; \
5
                    else echo sh; fi ; fi)
6
 
7
HOSTCC          = cc
8 246 julius
HOSTCFLAGS      = -Wall -Wstrict-prototypes -fno-omit-frame-pointer
9 2 marcus.erl
 
10
 
11
#########################################################################
12
 
13
#
14
# Include the make variables (CC, etc...)
15
#
16
AS      = $(CROSS_COMPILE)as
17
LD      = $(CROSS_COMPILE)ld
18
CC      = $(CROSS_COMPILE)gcc
19
AR      = $(CROSS_COMPILE)ar
20
NM      = $(CROSS_COMPILE)nm
21
STRIP   = $(CROSS_COMPILE)strip
22
OBJCOPY = $(CROSS_COMPILE)objcopy
23
OBJDUMP = $(CROSS_COMPILE)objdump
24
RANLIB  = $(CROSS_COMPILE)ranlib
25
 
26 355 julius
XCFLAGS += -I$(TOPDIR)/include -DOR1K -Wall -Wstrict-prototypes
27
XCFLAGS += -Werror-implicit-function-declaration
28 419 julius
XCFLAGS += -fno-omit-frame-pointer
29
#XCFLAGS += -fomit-frame-pointer
30
#XCFLAGS += -O0
31
XCFLAGS += -O2
32
#XCFLAGS += -O3
33
#XCFLAGS += -Os
34
XCFLAGS += -fno-strength-reduce -pipe -fno-builtin
35 375 julius
# Use all software flags, so is compatible with minimal implementation
36 355 julius
#XCFLAGS += -mhard-mul -mhard-div -msoft-float
37 419 julius
XCFLAGS += -mhard-mul -msoft-div -msoft-float
38
#XCFLAGS += -msoft-mul -msoft-div -msoft-float
39 355 julius
XCFLAGS += -nostdlib
40
#XCFLAGS += -DDEBUG
41 2 marcus.erl
 
42 355 julius
# For CoreMark:
43
FLAGS_STR ="$(XCFLAGS)"
44
# Add back to CFLAGS
45
CFLAGS += $(XCFLAGS) -DFLAGS_STR=\"$(FLAGS_STR)\"
46 140 julius
 
47 2 marcus.erl
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
48
LDFLAGS+= $(LIBGCC)
49
 
50
#########################################################################
51
 
52
export  CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE \
53
        AS LD CC AR NM STRIP OBJCOPY OBJDUMP \
54
        MAKE CFLAGS ASFLAGS
55
 
56
#########################################################################
57
 
58
%.o:    %.S
59
        $(CC) $(CFLAGS) -c -o $@ $(CURDIR)/$<
60
%.o:    %.c
61
        $(CC) $(CFLAGS) -c -o $@ $<
62
 
63
%.bin: %.or32
64
        or32-rtems-objcopy -O binary $< $@
65
 
66
%.img: %.bin
67
        utils/bin2flimg 1 $< > $@
68
 
69
%.srec: %.bin
70
        utils/bin2srec $< > $@
71
 
72
#########################################################################

powered by: WebSVN 2.1.0

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