Statistics
| Branch: | Revision:

root / prex-0.9.0 / mk / gcc.mk @ 03e9c04a

History | View | Annotate | Download (914 Bytes)

1
# gcc specifc flags
2

    
3
ifndef _GCC_MK_
4
_GCC_MK_:=	1
5

    
6
OUTPUT_OPTION=	-o $@
7

    
8
DEFINES=	$(addprefix -D,$(DEFS))
9

    
10
CFLAGS+=	-c -Os -ansi -pedantic -Wall -Wundef -Wstrict-prototypes \
11
		-Wpointer-arith -nostdinc -fno-strict-aliasing $(GCCFLAGS)
12
CPPFLAGS+=	$(DEFINES) -I. $(addprefix -I,$(INCSDIR))
13
ACPPFLAGS+=	-D__ASSEMBLY__
14
LDFLAGS+=	-static -nostdlib $(addprefix -L,$(LIBSDIR))
15

    
16
ifeq ($(_DEBUG_),1)
17
CFLAGS+=	-fno-omit-frame-pointer -g
18
else
19
CFLAGS+=	-fomit-frame-pointer
20
endif
21

    
22
ifeq ($(_KERNEL_),1)
23
CFLAGS+=	-fno-builtin
24
endif
25

    
26
ifeq ($(_STRICT_),1)
27
CFLAGS+=	-Werror
28
endif
29

    
30
ifdef LDSCRIPT
31
LDFLAGS+=	-T $(LDSCRIPT)
32
endif
33

    
34
ifdef MAP
35
LDFLAGS+=	-Map $(MAP)
36
endif
37

    
38
ifeq ($(_RELOC_OBJ_),1)
39
LDFLAGS_S:=	$(LDFLAGS) --error-unresolved-symbols
40
LDFLAGS+=	-r -d
41
endif
42

    
43
ifndef LIBGCC_PATH
44
LIBGCC_PATH := $(dir $(shell $(RAWCC) -print-libgcc-file-name))
45
export LIBGCC_PATH
46
endif
47
PLATFORM_LIBS+=	-L$(LIBGCC_PATH) -lgcc
48

    
49
endif # !_GCC_MK_