Subversion Repositories Projects

Rev

Rev 235 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
234 dhylands 1
###########################################################################
2
#
3
# 	mkEnv-gcc.mk
4
#
5
# 	This file contains variables which are common to gcc toolchains.
6
#
7
###########################################################################
8
 
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
 
33
AR		= $(MK_CROSS_COMPILE)ar
34
AS		= $(MK_CROSS_COMPILE)gcc
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
 
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
 
235 dhylands 57
CXXFLAGS += \
58
	-Wall \
59
	-Wimplicit \
60
	-Wpointer-arith \
61
	-Wswitch \
62
	-Wredundant-decls \
63
	-Wreturn-type \
64
	-Wshadow \
65
	-Wunused \
239 dhylands 66
	-Wcast-qual
235 dhylands 67
 
234 dhylands 68
ifeq ($(MK_ADD_SYMBOLS),1)
69
CXXFLAGS += -ggdb
70
CFLAGS += -ggdb
71
LDFLAGS += -ggdb
72
endif
73
 
74
LDFLAGS += -Wl,-Map,$(basename $@).map $(LDFLAGS_RDYNAMIC)
75
 
76
DEP_OUTPUT_OPTION = -MMD -MF $(@:.o=.d)
77