1 | ## |
---|
2 | ## $Id$ |
---|
3 | ## |
---|
4 | |
---|
5 | ## ------------------------------------------------------------------------- |
---|
6 | ## NOTE: This file is rather immature and has to be considered to be |
---|
7 | ## almost experimental. |
---|
8 | ## |
---|
9 | ## Expect frequent changes -- It deserves to be cleaned up :( |
---|
10 | ## ------------------------------------------------------------------------- |
---|
11 | |
---|
12 | ## The section below is based on make/compilers/gcc-target-default.cfg |
---|
13 | ## used in former versions of RTEMS. |
---|
14 | |
---|
15 | ## |
---|
16 | ## Set up the flags for the toolchains: |
---|
17 | ## |
---|
18 | ## We are considering 3 different building schemes here: |
---|
19 | ## * Using gcc's being able to accept -specs (aka gcc-2.8 building scheme) |
---|
20 | ## * Using gcc's not being able to accept -specs (aka gcc-2.7.2 building |
---|
21 | ## scheme) |
---|
22 | ## * Using third party toolchains (aka non-gcc building scheme) |
---|
23 | ## |
---|
24 | ## Automake conditionals in use: |
---|
25 | ## RTEMS_USE_GCC .. if we are using GCC |
---|
26 | |
---|
27 | ## NOTES: |
---|
28 | ## * The gcc-2.8 building scheme is the nominal building scheme and |
---|
29 | ## is actively supported. |
---|
30 | ## * The non-gcc building scheme requires manually setting up environment |
---|
31 | ## variables and is hardly tested at all |
---|
32 | |
---|
33 | ## CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V are the values we |
---|
34 | ## would want the corresponding macros to be set to. |
---|
35 | ## |
---|
36 | ## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the |
---|
37 | ## 'VARIANT=<OPTIMIZE|DEBUG>' targets to their _V values. |
---|
38 | |
---|
39 | if RTEMS_USE_GCC |
---|
40 | ## All the stuff below is specific to gcc |
---|
41 | GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS) |
---|
42 | endif # RTEMS_USE_GCC |
---|
43 | |
---|
44 | CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) |
---|
45 | CFLAGS = @RTEMS_CFLAGS@ |
---|
46 | ## FIXME: This should be correct, but is not supported, yet |
---|
47 | # CXXFLAGS = @RTEMS_CXXFLAGS@ |
---|
48 | ## Fall back to using RTEMS_CFLAGS for C++ |
---|
49 | CXXFLAGS = @RTEMS_CFLAGS@ |
---|
50 | ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) |
---|
51 | |
---|
52 | depend: |
---|
53 | |
---|
54 | if RTEMS_USE_GCC |
---|
55 | ## gcc >= 2.8 |
---|
56 | RTEMS_RELLDFLAGS = -qnolinkcmds -nostdlib -Wl,-r |
---|
57 | endif |
---|
58 | |
---|
59 | ## ------------------------------------------------------------------------- |
---|
60 | ## These are supposed to be set in make/custom/<bsp>.cfg |
---|
61 | CPU_CFLAGS = @CPU_CFLAGS@ |
---|
62 | CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ |
---|
63 | |
---|
64 | ## ------------------------------------------------------------------------ |
---|
65 | ## Setup hard-coded flags |
---|
66 | if RTEMS_USE_GCC |
---|
67 | ## gcc >= gcc-2.8 |
---|
68 | RTEMS_CFLAGS_OPTIMIZE_V = |
---|
69 | RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused |
---|
70 | endif |
---|
71 | RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) |
---|
72 | |
---|
73 | ## ------------------------------------------------------------------------- |
---|
74 | |
---|
75 | CC = @CC@ $(GCCSPECS) |
---|
76 | CXX = @CXX@ $(GCCSPECS) |
---|
77 | CPP = @CPP@ $(GCCSPECS) |
---|
78 | |
---|
79 | ## |
---|
80 | AM_CPPFLAGS = $(RTEMS_CPPFLAGS) |
---|
81 | AM_CFLAGS = |
---|
82 | AM_CXXFLAGS = |
---|
83 | AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS) |
---|