source: rtems/c/src/automake/compile.am @ 7be6ad9

4.104.114.84.95
Last change on this file since 7be6ad9 was 0724e79b, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/12/04 at 14:27:25

2004-02-12 Ralf Corsepius <corsepiu@…>

  • Makefile.am: Don't include host.am.
  • automake/compile.am: Further cleanups.
  • Property mode set to 100644
File size: 2.9 KB
Line 
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
39if RTEMS_USE_GCC
40## All the stuff below is specific to gcc
41GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS)
42endif # RTEMS_USE_GCC
43
44CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES)
45CFLAGS   = @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++
49CXXFLAGS = @RTEMS_CFLAGS@
50ASFLAGS  = $(CPU_ASFLAGS) $(CPU_CFLAGS)
51
52depend:
53
54if RTEMS_USE_GCC
55## gcc >= 2.8
56RTEMS_RELLDFLAGS = -qnolinkcmds -nostdlib -Wl,-r
57endif
58
59## -------------------------------------------------------------------------
60
61## translate VARIANT into VARIANT_V
62VARIANT = OPTIMIZE
63
64VARIANT_OPTIMIZE_V = OPTIMIZE
65VARIANT_DEBUG_V = DEBUG
66VARIANT_optimize_V = OPTIMIZE
67VARIANT_debug_V = DEBUG
68
69VARIANT_V = $(VARIANT_$(VARIANT)_V)
70
71## Setup the library suffix
72LIBSUFFIX_OPTIMIZE_V =
73LIBSUFFIX_DEBUG_V = _g
74LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V)
75
76LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V)
77
78## These are supposed to be set in make/custom/<bsp>.cfg
79CPU_CFLAGS = @CPU_CFLAGS@
80CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@
81CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@
82CFLAGS__V = $(CFLAGS_OPTIMIZE_V)
83
84## ------------------------------------------------------------------------
85## Setup hard-coded flags
86if RTEMS_USE_GCC
87## gcc >= gcc-2.8
88RTEMS_CFLAGS_OPTIMIZE_V =
89RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused
90endif
91RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V)
92
93## -------------------------------------------------------------------------
94
95CC = @CC@ $(GCCSPECS)
96CXX = @CXX@ $(GCCSPECS)
97CPP = @CPP@ $(GCCSPECS)
98
99##
100AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
101AM_CFLAGS =
102AM_CXXFLAGS =
103AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
Note: See TracBrowser for help on using the repository browser.