From e7d110bac375c718300815ca6f3c896c655f4691 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Wed, 7 Jan 2004 17:16:36 +0000 Subject: 2004-01-07 Ralf Corsepius * automake/amcompile.am: New. * configure.ac: Add subdir-objects, AM_PROG_CC_C_O. --- cpukit/ChangeLog | 5 +++ cpukit/automake/amcompile.am | 87 ++++++++++++++++++++++++++++++++++++++++++++ cpukit/configure.ac | 3 +- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 cpukit/automake/amcompile.am (limited to 'cpukit') diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index b9690f6546..8214091f26 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2004-01-07 Ralf Corsepius + + * automake/amcompile.am: New. + * configure.ac: Add subdir-objects, AM_PROG_CC_C_O. + 2003-12-17 Joel Sherrill * aclocal/version.m4: Updated to rtems-20031217-test. diff --git a/cpukit/automake/amcompile.am b/cpukit/automake/amcompile.am new file mode 100644 index 0000000000..d53d7bfdb1 --- /dev/null +++ b/cpukit/automake/amcompile.am @@ -0,0 +1,87 @@ +## +## $Id$ +## + +## ------------------------------------------------------------------------- +## NOTE: This file is rather immature and has to be considered to be +## almost experimental. +## +## Expect frequent changes -- It deserves to be cleaned up :( +## ------------------------------------------------------------------------- + +## The section below is based on make/compilers/gcc-target-default.cfg +## used in former versions of RTEMS. + +## +## Set up the flags for the toolchains: +## +## We are considering 3 different building schemes here: +## * Using gcc's being able to accept -specs (aka gcc-2.8 building scheme) +## * Using gcc's not being able to accept -specs (aka gcc-2.7.2 building +## scheme) +## * Using third party toolchains (aka non-gcc building scheme) +## +## Automake conditionals in use: +## RTEMS_USE_GCC .. if we are using GCC + +## CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V are the values we +## would want the corresponding macros to be set to. +## +## CFLAGS_OPTIMIZE, CFLAGS_DEBUG are set by the +## 'VARIANT=' targets to their _V values. + +CPPFLAGS = @CPPFLAGS@ $(CPU_DEFINES) $(DEFINES) +CFLAGS = @RTEMS_CFLAGS@ +ASFLAGS = $(CPU_ASFLAGS) $(CPU_CFLAGS) + +depend: + +## ------------------------------------------------------------------------- + +## translate VARIANT into VARIANT_V +VARIANT = OPTIMIZE + +VARIANT_OPTIMIZE_V = OPTIMIZE +VARIANT_DEBUG_V = DEBUG +VARIANT_optimize_V = OPTIMIZE +VARIANT_debug_V = DEBUG + +VARIANT_V = $(VARIANT_$(VARIANT)_V) + +## Setup the variant build subdirectory +ARCH_OPTIMIZE_V = o-optimize +ARCH_DEBUG_V = o-debug + +ARCH__V = $(ARCH_OPTIMIZE_V) +ARCH = $(ARCH_$(VARIANT_V)_V) + +## Setup the library suffix +LIBSUFFIX_OPTIMIZE_V = +LIBSUFFIX_DEBUG_V = _g +LIBSUFFIX__V = $(LIBSUFFIX_OPTIMIZE_V) + +LIB_VARIANT = $(LIBSUFFIX_$(VARIANT_V)_V) + +## These are supposed to be set in make/custom/.cfg +CPU_CFLAGS = @CPU_CFLAGS@ +CFLAGS_OPTIMIZE_V = @CFLAGS_OPTIMIZE_V@ +CFLAGS_DEBUG_V = @CFLAGS_DEBUG_V@ +CFLAGS__V = $(CFLAGS_OPTIMIZE_V) + +## ------------------------------------------------------------------------ +## Setup hard-coded flags +if RTEMS_USE_GCC +## gcc >= gcc-2.8 +RTEMS_CFLAGS_OPTIMIZE_V = +RTEMS_CFLAGS_DEBUG_V = -Wno-unused + +## non-gcc +## We can't guess what flags might be required here. +## Pass the values from the environment if you want to apply them. +endif +RTEMS_CFLAGS__V = $(RTEMS_CFLAGS_OPTIMIZE_V) + +## ------------------------------------------------------------------------- +AM_CPPFLAGS = $(RTEMS_CPPFLAGS) +AM_CFLAGS = +AM_CCASFLAGS = $(RTEMS_CPPFLAGS) $(RTEMS_ASFLAGS) diff --git a/cpukit/configure.ac b/cpukit/configure.ac index 12b1ff6040..ee684379e7 100644 --- a/cpukit/configure.ac +++ b/cpukit/configure.ac @@ -9,7 +9,7 @@ RTEMS_TOP(..) RTEMS_CANONICAL_TARGET_CPU -AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.8]) +AM_INIT_AUTOMAKE([no-define nostdinc subdir-objects foreign 1.8]) AM_MAINTAINER_MODE RTEMS_ENABLE_MULTILIB @@ -33,6 +33,7 @@ fi RTEMS_PROG_CC_FOR_TARGET([-ansi -fasm]) RTEMS_CANONICALIZE_TOOLS +AM_PROG_CC_C_O AC_PROG_RANLIB # FIXME: For the moment, no reason to check for ada -- cgit v1.2.3