source: rtems/c/src/automake/compile.am @ d158c16

4.104.114.84.95
Last change on this file since d158c16 was 11cafc0, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/12/04 at 12:10:29

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

  • wrapup/Makefile.am: Don't include lib.am.
  • automake/compile.am: Use automake compilation rules.
  • Property mode set to 100644
File size: 3.4 KB
RevLine 
[11a26b9]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
41
42## gcc >= 2.8.x
43GCCSPECS = $(GCC_SPECS) $(RTEMS_BSP_SPECS)
44else
45## fall back to the old style compilers/*.cfg
46## CONFIG.CC is supposed to be provided by <BSP>.cfg
47include $(CONFIG.CC)
48endif # RTEMS_USE_GCC
49
50DEFS = @DEFS@
51
[11cafc0]52CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES)
53CFLAGS   = @RTEMS_CFLAGS@
[11a26b9]54## FIXME: This should be correct, but is not supported, yet
55# CXXFLAGS = @RTEMS_CXXFLAGS@ $(XCXXFLAGS)
56## Fall back to using RTEMS_CFLAGS for C++
57CXXFLAGS = @RTEMS_CFLAGS@ $(XCXXFLAGS)
58ASFLAGS  = $(CPU_ASFLAGS) $(CPU_CFLAGS) $(XASFLAGS)
59
[11cafc0]60depend:
[11a26b9]61
62if RTEMS_USE_GCC
63## gcc >= 2.8
[9480bb42]64RTEMS_RELLDFLAGS = -qnolinkcmds -nostdlib -Wl,-r
[11a26b9]65define make-rel
[9480bb42]66        $(LINK) $(RTEMS_RELLDFLAGS) $^
[11a26b9]67endef
68else
69## non-gcc
70define make-rel
[9480bb42]71        $(LINK) $(RTEMS_RELLDFLAGS) $^
[11a26b9]72endef
73endif
74
75## -------------------------------------------------------------------------
76
77## translate VARIANT into VARIANT_V
78VARIANT = OPTIMIZE
79
80VARIANT_OPTIMIZE_V = OPTIMIZE
81VARIANT_DEBUG_V = DEBUG
82VARIANT_optimize_V = OPTIMIZE
83VARIANT_debug_V = DEBUG
84
85VARIANT_V = $(VARIANT_$(VARIANT)_V)
86
87## Setup the library suffix
88LIBSUFFIX_OPTIMIZE_V =
89LIBSUFFIX_DEBUG_V = _g
90LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V)
91
92LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V)
93
94## These are supposed to be set in make/custom/<bsp>.cfg
95CPU_CFLAGS = @CPU_CFLAGS@
96CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@
97CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@
98CFLAGS__V = $(CFLAGS_OPTIMIZE_V)
99
100## ------------------------------------------------------------------------
101## Setup hard-coded flags
102if RTEMS_USE_GCC
103## gcc >= gcc-2.8
104RTEMS_CFLAGS_OPTIMIZE_V =
105RTEMS_CFLAGS_DEBUG_V = -qrtems_debug -Wno-unused
106
107## non-gcc
108## We can't guess what flags might be required here.
109## Pass the values from the environment if you want to apply them.
110endif
111RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V)
112
113## -------------------------------------------------------------------------
114
115CC = @CC@ $(GCCSPECS)
116CXX = @CXX@ $(GCCSPECS)
117CPP = @CPP@ $(GCCSPECS)
118
119LD = @LD@
120OBJCOPY = @OBJCOPY@
121NM = @NM@
122SIZE = @SIZE@
123STRIP = @STRIP@
124
125##
126AM_CPPFLAGS = $(RTEMS_CPPFLAGS)
127AM_CFLAGS =
128AM_CXXFLAGS =
[11cafc0]129AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_CCASFLAGS)
Note: See TracBrowser for help on using the repository browser.