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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [orpmon/] [config.mk] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 809 simons
#########################################################################
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
HOSTCFLAGS      = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
9
 
10 872 simons
#
11
# Specify the path to the tool chain
12
#
13 878 rherveille
TOOL_PREFIX = /tools/or32-uclinux
14 872 simons
 
15 809 simons
#########################################################################
16
 
17
#
18
# Include the make variables (CC, etc...)
19
#
20
AS      = $(CROSS_COMPILE)as
21
LD      = $(CROSS_COMPILE)ld
22
CC      = $(CROSS_COMPILE)gcc
23
AR      = $(CROSS_COMPILE)ar
24
NM      = $(CROSS_COMPILE)nm
25
STRIP   = $(CROSS_COMPILE)strip
26
OBJCOPY = $(CROSS_COMPILE)objcopy
27
OBJDUMP = $(CROSS_COMPILE)objdump
28
RANLIB  = $(CROSS_COMPILE)ranlib
29
 
30 1312 jurem
CFLAGS += -I$(TOPDIR)/include -DOR1K -Wall -Wstrict-prototypes
31
CFLAGS += -Werror-implicit-function-declaration -fomit-frame-pointer
32
CFLAGS += -fno-strength-reduce -O2 -g -pipe -fno-builtin
33
#CFLAGS += -msoft-mul -msoft-div -nostdlib
34
CFLAGS += -nostdlib
35 809 simons
 
36 1312 jurem
LIBGCC := $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
37
LDFLAGS+= $(LIBGCC)
38 872 simons
 
39 809 simons
#########################################################################
40
 
41
export  CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE \
42
        AS LD CC AR NM STRIP OBJCOPY OBJDUMP \
43 833 simons
        MAKE CFLAGS ASFLAGS
44 809 simons
 
45
#########################################################################
46
 
47
%.o:    %.S
48 833 simons
        $(CC) $(CFLAGS) -c -o $@ $(CURDIR)/$<
49 809 simons
%.o:    %.c
50
        $(CC) $(CFLAGS) -c -o $@ $<
51
 
52
%.bin: %.or32
53
        or32-rtems-objcopy -O binary $< $@
54
 
55
%.img: %.bin
56
        utils/bin2flimg 1 $< > $@
57
 
58
%.srec: %.bin
59
        utils/bin2srec $< > $@
60
 
61
#########################################################################

powered by: WebSVN 2.1.0

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