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 | ## CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V are the values we |
---|
28 | ## would want the corresponding macros to be set to. |
---|
29 | ## |
---|
30 | ## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the |
---|
31 | ## 'VARIANT=<OPTIMIZE|DEBUG>' targets to their _V values. |
---|
32 | |
---|
33 | CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) |
---|
34 | CFLAGS = @RTEMS_CFLAGS@ |
---|
35 | ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) |
---|
36 | |
---|
37 | depend: |
---|
38 | |
---|
39 | ## ------------------------------------------------------------------------- |
---|
40 | |
---|
41 | ## translate VARIANT into VARIANT_V |
---|
42 | VARIANT = OPTIMIZE |
---|
43 | |
---|
44 | VARIANT_OPTIMIZE_V = OPTIMIZE |
---|
45 | VARIANT_DEBUG_V = DEBUG |
---|
46 | VARIANT_optimize_V = OPTIMIZE |
---|
47 | VARIANT_debug_V = DEBUG |
---|
48 | |
---|
49 | VARIANT_V = $(VARIANT_$(VARIANT)_V) |
---|
50 | |
---|
51 | ## Setup the library suffix |
---|
52 | LIBSUFFIX_OPTIMIZE_V = |
---|
53 | LIBSUFFIX_DEBUG_V = _g |
---|
54 | LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) |
---|
55 | |
---|
56 | LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) |
---|
57 | |
---|
58 | ## These are supposed to be set in make/custom/<bsp>.cfg |
---|
59 | CPU_CFLAGS = @CPU_CFLAGS@ |
---|
60 | CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ |
---|
61 | CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ |
---|
62 | CFLAGS__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 = -Wno-unused |
---|
70 | |
---|
71 | ## non-gcc |
---|
72 | ## We can't guess what flags might be required here. |
---|
73 | ## Pass the values from the environment if you want to apply them. |
---|
74 | endif |
---|
75 | RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) |
---|
76 | |
---|
77 | ## ------------------------------------------------------------------------- |
---|
78 | AM_CPPFLAGS = $(RTEMS_CPPFLAGS) |
---|
79 | AM_CFLAGS = |
---|
80 | AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_ASFLAGS) |
---|