Subversion Repositories Projects

Rev

Rev 151 | Rev 215 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 dhylands 1
###########################################################################
2
#
3
# 	mkEnv-gcc.mk
4
#
5
# 	This file contains variables which are common to gcc toolchains.
6
#
7
###########################################################################
8
 
9 dhylands 9
ifeq ($(MK_LIB_PREFIX),)
10
MK_LIB_PREFIX	= lib
11
endif
12
 
13
ifeq ($(MK_LIB_EXT),)
14
MK_LIB_EXT    	= .a
15
endif
16
 
17
ifeq ($(MK_OBJ_EXT),)
18
MK_OBJ_EXT    	= .o
19
endif
20
 
21
ifeq ($(MK_BIN_EXT),)
22
MK_BIN_EXT    	= .bin
23
endif
24
 
25
ifeq ($(MK_ELF_EXT),)
26
MK_ELF_EXT    	= .elf
27
endif
28
 
29
ifeq ($(MK_HEX_EXT),)
30
MK_HEX_EXT		= .hex
31
endif
32
 
2 dhylands 33
AR		= $(MK_CROSS_COMPILE)ar
146 dhylands 34
AS		= $(MK_CROSS_COMPILE)gcc
2 dhylands 35
CC		= $(MK_CROSS_COMPILE)gcc
36
CXX		= $(MK_CROSS_COMPILE)g++
37
OBJCOPY	= $(MK_CROSS_COMPILE)objcopy
38
OBJDUMP	= $(MK_CROSS_COMPILE)objdump
39
SIZE	= $(MK_CROSS_COMPILE)size
40
 
9 dhylands 41
CFLAGS += \
42
	-std=gnu99 \
43
	-Wall \
44
	-Wimplicit \
45
	-Wpointer-arith \
46
	-Wswitch \
47
	-Wredundant-decls \
48
	-Wreturn-type \
49
	-Wshadow \
50
	-Wunused \
51
	-Wcast-qual \
52
	-Wnested-externs \
53
	-Wmissing-prototypes \
54
	-Wstrict-prototypes \
55
	-Wmissing-declarations
56
 
151 dhylands 57
ifeq ($(MK_ADD_SYMBOLS),1)
58
CFLAGS += -ggdb
59
LDFLAGS += -ggdb
60
endif
61
 
207 dhylands 62
LDFLAGS_RDYNAMIC = -rdynamic
63
LDFLAGS += -Wl,-Map,$(basename $@).map $(LDFLAGS_RDYNAMIC)
2 dhylands 64
 
65
DEP_OUTPUT_OPTION = -MMD -MF $(@:.o=.d)
66