summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-06-12 15:00:15 +0000
commitdf49c60c9671e4a28e636964d744c1f59fb6cb68 (patch)
treeeabd85e189514ad412a35414ba5d483dcda3ef1f /make
parent0ab65474316231792faec37ec1dbddeaf8645775 (diff)
downloadrtems-df49c60c9671e4a28e636964d744c1f59fb6cb68.tar.bz2
Merged from 4.5.0-beta3a
Diffstat (limited to '')
-rw-r--r--make/Makefile.am19
-rw-r--r--make/README158
-rw-r--r--make/Templates/Makefile.am11
-rw-r--r--make/Templates/Makefile.dir4
-rw-r--r--make/Templates/Makefile.leaf3
-rw-r--r--make/Templates/Makefile.lib4
-rw-r--r--make/compilers/Makefile.am7
-rw-r--r--make/compilers/gcc-no_bsp.cfg8
-rw-r--r--make/compilers/gcc-portsw.cfg8
-rw-r--r--make/compilers/gcc-target-default.cfg20
-rw-r--r--make/custom/FreeBSD-posix.cfg2
-rw-r--r--make/custom/HPUX9-posix.cfg2
-rw-r--r--make/custom/Linux-posix.cfg2
-rw-r--r--make/custom/Makefile.am61
-rw-r--r--make/custom/Solaris-posix.cfg2
-rw-r--r--make/custom/cvme961.cfg2
-rw-r--r--make/custom/dmv152.cfg2
-rw-r--r--make/custom/dmv177.cfg13
-rw-r--r--make/custom/efi332.cfg2
-rw-r--r--make/custom/efi68k.cfg8
-rw-r--r--make/custom/erc32.cfg2
-rw-r--r--make/custom/eth_comm.cfg5
-rw-r--r--make/custom/gen68302.cfg10
-rw-r--r--make/custom/gen68340.cfg36
-rw-r--r--make/custom/gen68360.cfg2
-rw-r--r--make/custom/gensh1.cfg3
-rw-r--r--make/custom/gensh2.cfg17
-rw-r--r--make/custom/helas403.cfg17
-rw-r--r--make/custom/i386ex.cfg2
-rw-r--r--make/custom/idp.cfg2
-rw-r--r--make/custom/mcp750.cfg38
-rw-r--r--make/custom/mvme136.cfg2
-rw-r--r--make/custom/mvme147.cfg2
-rw-r--r--make/custom/mvme162.cfg2
-rw-r--r--make/custom/mvme167.cfg24
-rw-r--r--make/custom/mvme2307.cfg62
-rw-r--r--make/custom/ods68302.cfg12
-rw-r--r--make/custom/p4000.cfg2
-rw-r--r--make/custom/p4600.cfg10
-rw-r--r--make/custom/p4650.cfg2
-rw-r--r--make/custom/papyrus.cfg17
-rw-r--r--make/custom/pc386.cfg38
-rw-r--r--make/custom/ppcn_60x.cfg12
-rw-r--r--make/custom/psim.cfg12
-rw-r--r--make/custom/rxgen960.cfg3
-rw-r--r--make/custom/score603e.cfg12
-rw-r--r--make/custom/simhppa.cfg8
-rw-r--r--make/custom/ts_386ex.cfg2
-rw-r--r--make/host.cfg.in8
-rw-r--r--make/leaf.cfg8
-rw-r--r--make/main.cfg7
51 files changed, 314 insertions, 403 deletions
diff --git a/make/Makefile.am b/make/Makefile.am
index b463e14b0e..9acafa4fe1 100644
--- a/make/Makefile.am
+++ b/make/Makefile.am
@@ -4,23 +4,14 @@
AUTOMAKE_OPTIONS = foreign 1.4
-rtems_makedir=$(prefix)/make
+rtems_makedir = $(prefix)/make
-rtems_make_DATA = \
-main.cfg
+rtems_make_DATA = main.cfg leaf.cfg
-EXTRA_DIST = \
-README \
-directory.cfg \
-host.cfg.in \
-leaf.cfg \
-lib.cfg
+EXTRA_DIST = README directory.cfg host.cfg.in leaf.cfg lib.cfg
-SUBDIRS = \
-Templates \
-custom \
-compilers
+SUBDIRS = Templates custom compilers
## -------------------------------------------------------
include $(top_srcdir)/automake/subdirs.am
-include $(top_srcdir)/automake/local.am
+include $(top_srcdir)/automake/host.am
diff --git a/make/README b/make/README
index 911d2b8aea..8a3d599aef 100644
--- a/make/README
+++ b/make/README
@@ -4,21 +4,26 @@
make/README
- This file describes the layout and conventions of the make tree used in
- the RTEMS software project and others.
+ This file describes the layout and conventions of the application
+ makefile support for RTEMS applications. Internally, RTEMS uses
+ GNU-style autoconf/automake Makefiles as much as possible to
+ ease integration with other GNU tools.
+
All of these "make" trees are substantially similar; however this
- file documents the current state of the rtems Makefile tree.
+ file documents the current state of the RTEMS Application Makefile
+ support.
- This make tree was developed originally to simplify porting projects
- between various os's. The primary goals are:
+ This make tree is based on a build system originally developed
+ to simplify porting projects between various OS's. The primary
+ goals were:
. simple *and* customizable individual makefiles
. use widely available GNU make. There is no pre-processing or
automatic generation of Makefiles.
- . Same makefiles work on *many* host os's due to portability
- of GNU make and the host os config files.
+ . Same makefiles work on *many* host OS's due to portability
+ of GNU make and the host OS config files.
. Support for different compilers and operating systems
on a per-user basis. Using the same sources (including
@@ -35,6 +40,13 @@
PATH variable is set to, you should get the same thing
when you 'make' as everyone else on the project.
+ This Makefile system has evolved into its present form and as it
+ exists in RTEMS today, its sole goal is to build RTEMS applications.
+ The use of these Makefiles hides the complexity of producing
+ executables for a wide variety of embedded CPU families and target
+ BSPs. Switching between RTEMS BSPs is accomplished via setting
+ the environment variable "RTEMS_MAKEFILE_PATH."
+
This description attempts to cover all aspects of the Makefile tree. Most
of what is described here is maintained automatically by the configuration
files.
@@ -88,7 +100,7 @@
combining source and directories (that make(1) would be expected to
recurse into) in one source directory. Ie., a directory in the source
tree may contain EITHER source files OR recursive sub directories, but NOT
- both.
+ both. This assumption is generally shared with GNU automake.
Variants (where objects go)
---------------------------
@@ -96,30 +108,30 @@
All binary targets are placed in a sub-directory whose name is (for
example):
- o-pc386/ -- binaries (no debug, no profile)
- o-pc386-debug/ -- debug binaries
- o-pc386-profile/ -- profiling binaries
-
- Using the template Makefiles, this will all happen automatically.
+ o-optimize/ -- optimized binaries
+ o-debug/ -- debug binaries
+ o-profile/ -- profiling binaries
- Within a Makefile, the ${ARCH} variable is set to o-pc386,
- o-pc386-debug, etc., as appropriate.
+ Using the template Makefiles, this will all happen automatically.
+ The contents of these directories are specific to a BSP.
- Typing 'make' will place objects in o-pc386.
- 'make debug' will place objects in o-pc386-debug.
- 'make profile' will place objects in o-pc386-profile.
+ Within a Makefile, the ${ARCH} variable is set to o-optimize,
+ o-debug, etc., as appropriate.
- NOTE: For RTEMS work, the word 'pc386' is the specified
- RTEMS_BSP (specified in the modules file)
+ HISTORICAL NOTE: Prior to version 4.5, the name of the sub-directory
+ in which objects were placed included the BSP name.
+
+ Typing 'make' will place objects in o-optimize.
+ 'make debug' will place objects in o-debug.
+ 'make profile' will place objects in o-profile.
The debug and profile targets are equivalent to 'all' except that
CFLAGS and/or LDFLAGS are modified as per the compiler config file for
debug and profile support.
- The targets debug, profile, etc., can be
- invoked recursively at the directory make level. So from the top of a
- tree, one could install a debug version of everything under that point
- by:
+ The targets debug, profile, etc., can be invoked recursively at
+ the directory make level. So from the top of a tree, one could
+ install a debug version of everything under that point by:
$ cd src/lib
$ gmake debug
@@ -131,14 +143,14 @@
For example, the following fragments link the normal, debug, or
profile version of "libmine.a" as appropriate:
- LDLIBS += $(LIBMINE)
+ LD_LIBS += $(LIBMINE)
LIBMINE = ../libmine/${ARCH}/libmine.a
${ARCH}/pgm: $(LIBMINE) ${OBJS}
- $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
+ $(make-exe)
If we do 'gmake debug', then the library in
- ../libmine/sparc-debug/libmine.a will be linked in. If $(LIBMINE)
+ ../libmine/o-debug/libmine.a will be linked in. If $(LIBMINE)
might not exist (or might be out of date) at this point, we could add
${LIBMINE}: FORCEIT
@@ -165,9 +177,6 @@
the included config files:
clean -- delete all targets
- clobber -- 'clean' plus delete sccs'd files
- lint -- run lint or lint-like tool
- get -- "sccs get" all sources
depend -- build a make dependency file
"variant targets" -- special variants, see below
@@ -186,9 +195,9 @@
All Makefiles include a customization file which is used to select
compiler and host operating system. The environment variable
- RTEMS_CUSTOM must point to this file; eg:
+ RTEMS_MAKEFILE_PATH must point to the directory containing this file; eg:
- /.../make/custom/pc386.cfg
+ export RTEMS_MAKEFILE_PATH=/.../pc386/
All leaf Makefile's also include either 'make/leaf.cfg' (or
'make/lib.cfg' for building libraries). These config files provide
@@ -209,14 +218,6 @@
compiler ( make/compilers/??.cfg )
- private customization files
- ---------------------------
-
- [ $(RTEMS_CUSTOM) ]
-
- Your own private configuration file. Specifies which of the above
- files you want to include.
-
generic rules file
------------------
@@ -257,29 +258,32 @@
-----------------------
Variables you have to set in the environment or in your Makefile.
- Note: the rtems module files set RTEMS_ROOT and RTEMS_CUSTOM
+ Note: the RTEMS module files set RTEMS_ROOT and RTEMS_CUSTOM
for you.
- Environment Variables
- ---------------------
+ Makefile Variables
+ ------------------
+
+ RTEMS_BSP -- name of your 'bsp' eg: pc386, mvme136
+
+ RTEMS_CPU -- CPU architecture e.g.: i386, m68k
- RTEMS_BSP -- name of your 'bsp' eg: pc386
+ RTEMS_CPU_FAMILY -- CPU model e.g.: i486dx, m68020
RTEMS_ROOT -- The root of your source tree.
All other file names are derived from this.
- [ eg: % setenv RTEMS_ROOT $HOME/work/rtems ]
+ [ eg: % setenv RTEMS_ROOT $HOME/work/RTEMS ]
RTEMS_CUSTOM -- name of your config files in make/custom
Example:
$(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
- RTEMS_GNUTOOLS -- root of the gcc tools for the target
-
The value RTEMS_ROOT is used in the custom
files to generate the make(1) variables:
- PROJECT_ROOT
PROJECT_RELEASE
+ PROJECT_BIN
+ PROJECT_INCLUDE
PROJECT_TOOLS
etc., which are used within the make config files themselves.
@@ -289,7 +293,7 @@
Preset variables
----------------
- Aside from command names set by the os and compiler config files,
+ Aside from command names set by the OS and compiler config files,
a number of MAKE variables are automatically set and maintained by
the config files.
@@ -305,16 +309,12 @@
-- directory for build environment commands
[ eg: $(PROJECT_ROOT)/build-tools ]
- TARCH -- ${TARGET_ARCH}
- [ eg: o-forc386 ]
- obsolete and should not be referenced
-
ARCH -- target sub-directory for object code
- [ eg: o-pc386 or o-pc386-debug ]
+ [ eg: o-optimize or o-debug ]
VARIANTS -- full list of all possible values for $(ARCH);
used mainly for 'make clean'
- [ eg: "o-pc386 o-pc386-debug o-pc386-profile" ]
+ [ eg: "o-optimize o-debug o-profile" ]
VARIANT_VA -- Variant name.
Normally "", but for 'make debug' it is "debug",
@@ -355,14 +355,6 @@
-- ld option for dynamic libraries
-Bdynamic or -dn (svr4)
- LIB_SOCKET
- -- ld(1) -l option(s) to provide
- socket support.
-
- LIB_MATH -- ld(1) -l option(s) to provide
- math library.
-
-
Makefile Variables
------------------
@@ -389,10 +381,6 @@
leaf Makefiles.
[ eg: CPPFLAGS += -I../include ]
- YFLAGS -- Yacc flags.
- leaf Makefiles.
- [ eg: YFLAGS += -v ]
-
LD_PATHS -- arguments to -L for ld.
Will be prefixed with '-L' or '-L ' as appropriate
and included in LDFLAGS.
@@ -434,27 +422,44 @@
Since 'make clobber' includes 'make clean',
you don't need to duplicate items in both.
- TARGET_ARCH -- target architecture (eg: o-pc386)
- leaf makefiles only.
- Should be specified before 'include leaf.cfg'.
- Only needs to be specified if your target is
- different from output of `arch`.
-
Command names
-------------
The following commands should only be called
as make variables:
- MAKE,INSTALL,SHELL
+ MAKE,INSTALL,INSTALL_VARIANT,SHELL
- ECHO,CAT,RM,CP,MV,LN,MKDIR,CHMOD
+ ECHO,CAT,CP,MV,LN,MKDIR,CHMOD
- ED,SED
+ SED
CC,CPP,AS,AR,LD,NM,SIZE,RANLIB,MKLIB,
YACC,LEX,LINT,CTAGS,ETAGS
+ In addition, the following commands specifically support
+ the installation of libraries, executables, header files,
+ and other things that need to be installed:
+
+ INSTALL_CHANGE - install a file only if the source
+ file is actually different than
+ the installed copy or if there is
+ no installed copy. USAGE:
+
+ usage: install-if-change [ -vmV ] file [ file ... ] dest-directory-or-file
+ -v -- verbose
+ -V suffix -- suffix to append to targets (before any . suffix)
+ eg: -V _g would change 'foo' to 'foo_g' and
+ 'libfoo.a' to 'libfoo_g.a'
+ -m mode -- mode for new file(s)
+
+ INSTALL_VARIANT - installs the built file using the
+ proper variant suffix (e.g. _g
+ for debug turns libmine.a into libmine_g.a)
+ This is implemented as a macro that
+ invokes install-if-change with the
+ appropriate -V argument setting.
+
Special Directory Makefile Targets
----------------------------------
@@ -486,4 +491,5 @@
Template "directory" makefile.
+
diff --git a/make/Templates/Makefile.am b/make/Templates/Makefile.am
index 28136f27b1..52ee7ff73f 100644
--- a/make/Templates/Makefile.am
+++ b/make/Templates/Makefile.am
@@ -4,12 +4,9 @@
AUTOMAKE_OPTIONS = foreign 1.4
-rtems_makedir=$(prefix)/make
-rtems_make_Templatesdir=$(rtems_makedir)/Templates
+rtems_makedir = $(prefix)/make
+rtems_make_Templatesdir = $(rtems_makedir)/Templates
-rtems_make_Templates_DATA = \
-Makefile.dir \
-Makefile.leaf \
-Makefile.lib
+rtems_make_Templates_DATA = Makefile.dir Makefile.leaf Makefile.lib
-include $(top_srcdir)/automake/local.am
+include $(top_srcdir)/automake/host.am
diff --git a/make/Templates/Makefile.dir b/make/Templates/Makefile.dir
index aa5a9c0b2f..c8b4d4f8a4 100644
--- a/make/Templates/Makefile.dir
+++ b/make/Templates/Makefile.dir
@@ -2,7 +2,9 @@
# $Id$
#
-include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+
+include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
SUBDIRS=a b c your-directories-go-here
diff --git a/make/Templates/Makefile.leaf b/make/Templates/Makefile.leaf
index b4c879529f..6338a7f099 100644
--- a/make/Templates/Makefile.leaf
+++ b/make/Templates/Makefile.leaf
@@ -33,8 +33,9 @@ PGMS=${ARCH}/xxx-your-program-here ${ARCH}/xxx-another-one
# to include all RTEMS managers in the application.
MANAGERS=io event message rate_monotonic semaphore timer, etc.
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
-include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg
#
diff --git a/make/Templates/Makefile.lib b/make/Templates/Makefile.lib
index 9127ea70de..a515b82b5f 100644
--- a/make/Templates/Makefile.lib
+++ b/make/Templates/Makefile.lib
@@ -27,7 +27,9 @@ S_O_FILES=$(S_FILES:%.S=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
-include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
+
+include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/lib.cfg
#
diff --git a/make/compilers/Makefile.am b/make/compilers/Makefile.am
index cfc9545c90..d4b915b525 100644
--- a/make/compilers/Makefile.am
+++ b/make/compilers/Makefile.am
@@ -4,10 +4,7 @@
AUTOMAKE_OPTIONS = foreign 1.4
-EXTRA_DIST = \
-gcc-no_bsp.cfg \
-gcc-portsw.cfg \
-gcc-target-default.cfg
+EXTRA_DIST = gcc-no_bsp.cfg gcc-portsw.cfg gcc-target-default.cfg
## -------------------------------------------------------
-include $(top_srcdir)/automake/local.am
+include $(top_srcdir)/automake/host.am
diff --git a/make/compilers/gcc-no_bsp.cfg b/make/compilers/gcc-no_bsp.cfg
index af2a88f580..63f9187020 100644
--- a/make/compilers/gcc-no_bsp.cfg
+++ b/make/compilers/gcc-no_bsp.cfg
@@ -78,10 +78,6 @@ CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
# debug flag; typically -g
CFLAGS_DEBUG_V=-g -Wno-unused
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=-pg
@@ -211,10 +207,10 @@ ${ARCH}/%: %.sh
$(CHMOD) +x $@
# Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
# so that 'make clean' doesn't blow it away
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
CLEAN_DEPEND=$(DEPEND).tmp
CLOBBER_DEPEND=$(DEPEND)
diff --git a/make/compilers/gcc-portsw.cfg b/make/compilers/gcc-portsw.cfg
index 2d67ebb099..ddcec0ed0e 100644
--- a/make/compilers/gcc-portsw.cfg
+++ b/make/compilers/gcc-portsw.cfg
@@ -59,10 +59,6 @@ CFLAGS_OPTIMIZE_V=-Os
# debug flag; typically -g
CFLAGS_DEBUG_V=-g -O0 -DRTEMS_DEBUG -DSTACK_CHECKER_ON
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=
@@ -198,10 +194,10 @@ ${ARCH}/%: %.sh
$(CHMOD) -f g+w $@
# Dependency files for use by gmake
-# NOTE: we don't put in $(TARGET_ARCH)
+# NOTE: we don't put them into $(ARCH)
# so that 'make clean' doesn't blow it away
-DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+DEPEND=Depends-${ARCH}
CLEAN_DEPEND=$(DEPEND).tmp
CLOBBER_DEPEND=$(DEPEND)
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 88b5e58c0d..fb5dfbad62 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -93,21 +93,21 @@ ifeq ($(RTEMS_USE_GCC272),no)
CFLAGS_DEBUG_V+=-qrtems_debug
endif
-# when debugging, optimize flag: typically empty
-# some compilers do allow optimization with their "-g"
-CFLAGS_DEBUG_OPTIMIZE_V=-g
-
# profile flag; use gprof(1)
CFLAGS_PROFILE_V=-pg
+ifndef AUTOMAKE
# default is to optimize
CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+endif
# dynamic libraries
#CFLAGS_DYNAMIC_V=-fpic
#ASFLAGS_DYNAMIC_V=
+ifndef AUTOMAKE
CFLAGS += $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
+endif
# List of library paths without -L
LD_PATHS= $(PROJECT_RELEASE)/lib
@@ -186,7 +186,7 @@ ${ARCH}/%.o: %.S
# Make foo.rel from foo.o
${ARCH}/%.rel: ${ARCH}/%.o
- ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+ ${make-rel}
# create $(ARCH)/pgm from pgm.sh
${ARCH}/%: %.sh
@@ -214,7 +214,7 @@ ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
# Replace foo.o with $(ARCH)/foo.o
# Replace $(ARCH) value with string $(ARCH)
# so that it will for debug and profile cases
- $(COMPILE.c) -M $^ | \
+ $(COMPILE.c) $(AM_CPPFLAGS) $(AM_CFLAGS) -M $^ | \
$(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
-e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
$(MV) $(DEPEND).tmp $(DEPEND)
@@ -289,7 +289,13 @@ ifndef LINKCMDS
LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
endif
-
+ifeq ($(RTEMS_USE_GCC272),yes)
define make-rel
$(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $^
endef
+else
+define make-rel
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -qnolinkcmds -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
+endef
+endif
diff --git a/make/custom/FreeBSD-posix.cfg b/make/custom/FreeBSD-posix.cfg
index 99c111bf49..f15e790dff 100644
--- a/make/custom/FreeBSD-posix.cfg
+++ b/make/custom/FreeBSD-posix.cfg
@@ -53,7 +53,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/HPUX9-posix.cfg b/make/custom/HPUX9-posix.cfg
index 700f5f48f6..907505811f 100644
--- a/make/custom/HPUX9-posix.cfg
+++ b/make/custom/HPUX9-posix.cfg
@@ -59,7 +59,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
index 910dd70be2..b7e8e40060 100644
--- a/make/custom/Linux-posix.cfg
+++ b/make/custom/Linux-posix.cfg
@@ -55,7 +55,7 @@ define make-target-options
endef
define make-exe
- $(LINK.c) $(LDLIBS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/Makefile.am b/make/custom/Makefile.am
index 049a3d0d8d..751e53873d 100644
--- a/make/custom/Makefile.am
+++ b/make/custom/Makefile.am
@@ -4,55 +4,20 @@
AUTOMAKE_OPTIONS = foreign 1.4
-rtems_makedir=$(prefix)/make
-rtems_make_customdir=$(rtems_makedir)/custom
+rtems_makedir = $(prefix)/make
+rtems_make_customdir = $(rtems_makedir)/custom
-rtems_make_custom_DATA = \
-default.cfg
+rtems_make_custom_DATA = default.cfg
-EXTRA_DIST = \
-FreeBSD-posix.cfg \
-HPUX9-posix.cfg \
-Linux-posix.cfg \
-Solaris-posix.cfg \
-bare.cfg \
-cvme961.cfg \
-dmv152.cfg \
-dmv177.cfg \
-efi332.cfg \
-efi68k.cfg \
-erc32.cfg \
-eth_comm.cfg \
-gen68302.cfg \
-gen68340.cfg \
-gen68360.cfg \
-gen68360_040.cfg \
-gensh1.cfg \
-helas403.cfg \
-i386ex.cfg \
-idp.cfg \
-mcp750.cfg \
-mvme136.cfg \
-mvme147.cfg \
-mvme147s.cfg \
-mvme162.cfg \
-mvme162lx.cfg \
-mvme167.cfg \
-mvme2307.cfg \
-no_bsp.cfg \
-ods68302.cfg \
-p4000.cfg \
-p4600.cfg \
-p4650.cfg \
-papyrus.cfg \
-pc386.cfg \
-portsw.cfg \
-posix.cfg \
-ppcn_60x.cfg \
-psim.cfg \
-score603e.cfg \
-simhppa.cfg \
-ts_386ex.cfg
+EXTRA_DIST = Cygwin-posix.cfg FreeBSD-posix.cfg HPUX9-posix.cfg \
+ Linux-posix.cfg Solaris-posix.cfg bare.cfg cvme961.cfg dmv152.cfg \
+ dmv177.cfg efi332.cfg efi68k.cfg erc32.cfg eth_comm.cfg gen68302.cfg \
+ gen68340.cfg gen68360.cfg gen68360_040.cfg gensh1.cfg helas403.cfg \
+ i386ex.cfg idp.cfg mcp750.cfg mvme136.cfg mvme147.cfg mvme147s.cfg \
+ mvme162.cfg mvme162lx.cfg mvme167.cfg mvme2307.cfg no_bsp.cfg \
+ ods68302.cfg p4000.cfg p4600.cfg p4650.cfg papyrus.cfg pc386.cfg \
+ portsw.cfg posix.cfg ppcn_60x.cfg psim.cfg score603e.cfg simhppa.cfg \
+ ts_386ex.cfg
## -------------------------------------------------------
-include $(top_srcdir)/automake/local.am
+include $(top_srcdir)/automake/host.am
diff --git a/make/custom/Solaris-posix.cfg b/make/custom/Solaris-posix.cfg
index 3f3f1f29d2..ef7472b6a4 100644
--- a/make/custom/Solaris-posix.cfg
+++ b/make/custom/Solaris-posix.cfg
@@ -52,7 +52,7 @@ define make-target-options
endef
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -ng $@ > $(basename $@).num
$(SIZE) $@
endef
diff --git a/make/custom/cvme961.cfg b/make/custom/cvme961.cfg
index 0ea5cd1703..fca81ffb99 100644
--- a/make/custom/cvme961.cfg
+++ b/make/custom/cvme961.cfg
@@ -61,7 +61,7 @@ endef
else
define make-exe
- $(LINK.c) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
diff --git a/make/custom/dmv152.cfg b/make/custom/dmv152.cfg
index a76804d6aa..80458060ef 100644
--- a/make/custom/dmv152.cfg
+++ b/make/custom/dmv152.cfg
@@ -67,7 +67,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/dmv177.cfg b/make/custom/dmv177.cfg
index 4f42ef6e81..a9ef4be769 100644
--- a/make/custom/dmv177.cfg
+++ b/make/custom/dmv177.cfg
@@ -38,14 +38,6 @@ RTEMS_BSP_FAMILY=dmv177
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (ppc)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (ppc)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -73,8 +65,6 @@ define make-target-options
@echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@
@echo "#define CONSOLE_USE_POLLED !CONSOLE_USE_INTERRUPTS" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 0" >>$@
@echo "#define PPC_USE_DATA_CACHE 0" >>$@
@echo "#define PPC_USE_INSTRUCTION_CACHE 1" >>$@
@@ -84,7 +74,6 @@ endef
# and (hopefully) optimize for it.
#
CPU_CFLAGS = -mcpu=603
-#CFLAGS_DEBUG_OPTIMIZE_V=
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -107,7 +96,7 @@ HAS_RTC=yes
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/efi332.cfg b/make/custom/efi332.cfg
index 03d85b0e2a..08390ead1d 100644
--- a/make/custom/efi332.cfg
+++ b/make/custom/efi332.cfg
@@ -52,7 +52,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/efi68k.cfg b/make/custom/efi68k.cfg
index af1c1b3f3f..ece3c51876 100644
--- a/make/custom/efi68k.cfg
+++ b/make/custom/efi68k.cfg
@@ -15,7 +15,9 @@ RTEMS_BSP_FAMILY=efi68k
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
#
-CPU_CFLAGS = -m68000 -msoft-float
+# 68000+softfloat results in gcc 2.95.2 giving default libraries.
+# CPU_CFLAGS = -m68000 -msoft-float
+CPU_CFLAGS = -m68000
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -55,11 +57,11 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
- $(PACKHEX) > $(basename $@).exe
+ $(PACKHEX) > $@
$(NM) -g -n $(basename $@).nxe > $(basename $@).num
$(SIZE) $(basename $@).nxe
endef
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
index e75b6877e8..3196fcd492 100644
--- a/make/custom/erc32.cfg
+++ b/make/custom/erc32.cfg
@@ -87,7 +87,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
diff --git a/make/custom/eth_comm.cfg b/make/custom/eth_comm.cfg
index 89e1d663e0..cde4b4ee30 100644
--- a/make/custom/eth_comm.cfg
+++ b/make/custom/eth_comm.cfg
@@ -12,8 +12,7 @@ RTEMS_CPU_MODEL=mpc860
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=eth_comm
-CPU_DEFINES=-DPPC_ABI=PPC_ABI_EABI \
- -DPPC_ASM=PPC_ASM_ELF -DPPC_VECTOR_FILE_BASE=0x00000000
+CPU_DEFINES=-DPPC_VECTOR_FILE_BASE=0x00000000
# This section makes the target dependent options file.
@@ -60,7 +59,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/gen68302.cfg b/make/custom/gen68302.cfg
index 265c5b22a4..5b21cd771a 100644
--- a/make/custom/gen68302.cfg
+++ b/make/custom/gen68302.cfg
@@ -16,7 +16,9 @@ RTEMS_BSP_FAMILY=gen68302
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
#
-CPU_CFLAGS=-m68302 -msoft-float
+# 68000+softfloat results in gcc 2.95.2 giving default libraries.
+# CPU_CFLAGS = -m68302 -msoft-float
+CPU_CFLAGS = -m68302
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -58,10 +60,10 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
endif
# Miscellaneous additions go here
diff --git a/make/custom/gen68340.cfg b/make/custom/gen68340.cfg
index f2c2f71fc8..7511e795e4 100644
--- a/make/custom/gen68340.cfg
+++ b/make/custom/gen68340.cfg
@@ -59,25 +59,25 @@ endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
- -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
- # if you want to make a prom image
- # m68k-rtems-objcopy --adjust-section-vma \
- # .data=`m68k-rtems-objdump --section-headers $(basename $@).exe | \
- # awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
- # for (p=digits; p>0; p--) \
- # s += (16^(p-1)) * ( index("0123456789ABCDEF",\
- # substr(x,1+digits-p,1)) -1 );\
- # return s } ;\
- # /\.text/ { base = $$4 ; size = $$3 };\
- # END { printf("0x%x", h2d(base) + h2d(size)) }'\
- # ` $(basename $@).exe
- # if you want to convert it to ieee
- # m68k-rtems-objcopy --output-target=ieee --debugging \
- # $(basename $@).exe $(basename $@).ieee
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
+# if you want to make a prom image
+# m68k-rtems-objcopy --adjust-section-vma \
+# .data=`m68k-rtems-objdump --section-headers $(basename $@).exe | \
+# awk 'function h2d(x) { x=toupper(x); digits=length(x); s=0 ; \
+# for (p=digits; p>0; p--) \
+# s += (16^(p-1)) * ( index("0123456789ABCDEF",\
+# substr(x,1+digits-p,1)) -1 );\
+# return s } ;\
+# /\.text/ { base = $$4 ; size = $$3 };\
+# END { printf("0x%x", h2d(base) + h2d(size)) }'\
+# ` $(basename $@).exe
+# if you want to convert it to ieee
+# m68k-rtems-objcopy --output-target=ieee --debugging \
+# $(basename $@).exe $(basename $@).ieee
endif
diff --git a/make/custom/gen68360.cfg b/make/custom/gen68360.cfg
index c607d5acae..01b81ddd9c 100644
--- a/make/custom/gen68360.cfg
+++ b/make/custom/gen68360.cfg
@@ -79,7 +79,7 @@ endef
else
define make-exe
- $(LINK.c) $(LDLIBS) -o $@ \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/gensh1.cfg b/make/custom/gensh1.cfg
index 1b52be1c2a..f5a2b0b489 100644
--- a/make/custom/gensh1.cfg
+++ b/make/custom/gensh1.cfg
@@ -71,7 +71,8 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) -Wl,-Map,$(basename $@).map \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Map,$(basename $@).map \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -n $@ > $(basename $@).num
diff --git a/make/custom/gensh2.cfg b/make/custom/gensh2.cfg
index 4ef24d80f5..09299bba6f 100644
--- a/make/custom/gensh2.cfg
+++ b/make/custom/gensh2.cfg
@@ -28,9 +28,12 @@ BSP_CPPFLAGS=-DHZ=$(HZ)
#
CPU_CFLAGS= -m2
-# debug flags: typically none, but we use -O1 as it produces better code
-
-CFLAGS_DEBUG_V = -O1
+# debug flags: opt. is needed to fit in RAM. '-O1' has shown bad side-
+# effects by failing to set up some hardware I/O registers in
+# c/src/lib/libbsp/sh/gensh2/startup/hw_init.c (and perhaps elsewhere),
+# which prevented proper chip initialization and muted SCI1 output.
+# CFLAGS_DEBUG_V = -O4 --save-temps
+CFLAGS_DEBUG_V = -O4 -g
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -52,8 +55,8 @@ CFLAGS_OPTIMIZE_V = -O4
# This switch compiles code to jump-start from FLASH, without a monitor
#
# START_HW_INIT
-# This switch selects whether 'hw_initialize()' is called from
-# 'start.S' or from 'bsp_start()'
+# This switch selects whether 'early_hw_init()' is called from
+# 'start.S'; 'bsp_hw_init()' is always called from 'bspstart.c'
#
define make-target-options
@@ -61,7 +64,7 @@ define make-target-options
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "#define RTEMS_TEST_IO_STREAM 1" >>$@
@echo "/* #define STANDALONE_EVB 1 */" >>$@
- @echo "/* #define START_HW_INIT 1 */" >>$@
+ @echo "#define START_HW_INIT 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
endef
@@ -81,7 +84,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) -Wl,-Map,$(basename $@).map \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Map,$(basename $@).map \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS) -lstdc++
$(NM) -n $@ > $(basename $@).num
diff --git a/make/custom/helas403.cfg b/make/custom/helas403.cfg
index e78f93a954..b9e49b33ba 100644
--- a/make/custom/helas403.cfg
+++ b/make/custom/helas403.cfg
@@ -18,10 +18,6 @@ RTEMS_CPU_MODEL=ppc403
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=helas403
-# These should be defined in targopt.h now.
-#CPU_DEFINES=-DPPC_ABI=PPC_ABI_POWEROPEN \
-# -DPPC_ASM=PPC_ASM_ELF -DPPC_VECTOR_FILE_BASE=0x0100
-
# This section makes the target dependent options file.
# NDEBUG (C library)
@@ -39,15 +35,6 @@ RTEMS_BSP_FAMILY=helas403
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (PowerPC)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-# This BSP was initially developed using the PowerOpen ABI.
-#
-# PPC_ASM (PowerPC)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -59,8 +46,6 @@ define make-target-options
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 1" >>$@
endef
@@ -94,7 +79,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/i386ex.cfg b/make/custom/i386ex.cfg
index 282c70912b..c18a3590eb 100644
--- a/make/custom/i386ex.cfg
+++ b/make/custom/i386ex.cfg
@@ -65,7 +65,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).coff \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).coff \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).coff $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/idp.cfg b/make/custom/idp.cfg
index af34965f40..7654bf9b56 100644
--- a/make/custom/idp.cfg
+++ b/make/custom/idp.cfg
@@ -60,7 +60,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mcp750.cfg b/make/custom/mcp750.cfg
index e2446cd902..19f2d973e1 100644
--- a/make/custom/mcp750.cfg
+++ b/make/custom/mcp750.cfg
@@ -29,14 +29,6 @@ RTEMS_BSP_FAMILY=motorola_powerpc
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (ppc)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (ppc)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -57,8 +49,6 @@ define make-target-options
@echo "#define PPCN_60X_USE_NONE 1" >>$@
@echo "#define PPC_USE_DATA_CACHE 1" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 1" >>$@
endef
@@ -68,7 +58,7 @@ endef
# NOTE : cheking egcc 1.1.1 source code shows that the last know processor
# is the 604 model and that this is the default generation option.
#
-# CPU_CFLAGS = -mcpu=750
+CPU_CFLAGS = -mcpu=750
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -78,9 +68,14 @@ endef
# As far as I know, small data are pointer impose a very specific compliation
# model => not used.
# Currently the sdata2 and sbss2 sections are empty => r2 is not used...
-CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=750
+CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align
#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions -fvolatile-global -fvolatile -mstrict-align -mcpu=750
+# debug flags: typically none, but at least -O1 is required due to this
+# BSP using inlined code
+CFLAGS_DEBUG_V = -O1 -mmultiple -mstring -mstrict-align
+
+
# The following is a ld command file which works without using the
# -specs system in gcc 2.8. IT HAS NEVER BEEN TESTED WITH THIS BSP!!!
# $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
@@ -94,18 +89,19 @@ CFLAGS_OPTIMIZE_V=-O4 -mmultiple -mstring -mstrict-align -mcpu=750
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
+ test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin
$(CP) $@ $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/$(ARCH); \
- cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \
- $(MAKE) bootloader BINARY_LOADED=$(basename $@).exe; \
- COMPLETE_FILE_NAME=$(basename $@).exe ;\
- echo $${COMPLETE_FILE_NAME} ;\
- FILE_NAME=`basename $${COMPLETE_FILE_NAME}` ;\
- echo $${FILE_NAME} ;\
- mkdir -p $(PROJECT_ROOT)/mcp750/bin ;\
- $(CP) bootloader $(PROJECT_ROOT)/mcp750/bin/$${FILE_NAME}
+ ( cd $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \
+ $(MAKE) bootloader BINARY_LOADED=$@; )
+ f=`basename $@ .exe`; \
+ cp $(PROJECT_ROOT)/powerpc-rtems/c/mcp750/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/bootloader \
+ ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe \
+ && chmod 755 \
+ ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe
endef
# Miscellaneous additions go here
diff --git a/make/custom/mvme136.cfg b/make/custom/mvme136.cfg
index e41efc479e..5ff5411dd3 100644
--- a/make/custom/mvme136.cfg
+++ b/make/custom/mvme136.cfg
@@ -56,7 +56,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme147.cfg b/make/custom/mvme147.cfg
index bb6b567e0d..3e57706ed9 100644
--- a/make/custom/mvme147.cfg
+++ b/make/custom/mvme147.cfg
@@ -53,7 +53,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).nxe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme162.cfg b/make/custom/mvme162.cfg
index 66787178f6..93cf2b42b8 100644
--- a/make/custom/mvme162.cfg
+++ b/make/custom/mvme162.cfg
@@ -87,7 +87,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).nxe $(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
$(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
diff --git a/make/custom/mvme167.cfg b/make/custom/mvme167.cfg
index 6b7032705d..df47822c73 100644
--- a/make/custom/mvme167.cfg
+++ b/make/custom/mvme167.cfg
@@ -4,6 +4,9 @@
# $Id$
#
+# THIS BSP USES ELF IMAGES. IT WILL NOT WORK WITH COFF UNLESS CHANGES
+# ARE MADE TO THE LINKCMDS FILE.
+
RTEMS_CPU=m68k
RTEMS_CPU_MODEL=m68040
@@ -14,10 +17,12 @@ RTEMS_BSP_FAMILY=mvme167
#
# This contains the compiler options necessary to select the CPU model
-# and (hopefully) optimize for it.
+# and (hopefully) optimize for it. We also specify the BSP during compilation.
+# This should really get its own flag, but it works here.
#
-CPU_CFLAGS = -m68040
+CPU_CFLAGS = -m68040 -DRTEMS_BSP=$(RTEMS_BSP)
+CFLAGS_DEBUG_V += -ggdb
# optimize flag: typically -O, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -33,11 +38,21 @@ CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
#
# RTEMS_DEBUG (RTEMS)
# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# CD2401_INT_LEVEL
+# Interrupt level for the CD2401.
+#
+# CD2401_POLLED_IO
+# 0 for interrupt-driven, 1 for polled I/O.
define make-target-options
@echo "/* #define NDEBUG 1 */ " >>$@
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define CD2401_INT_LEVEL 1" >>$@
+ @echo "#define CD2401_POLLED_IO 1" >>$@
+
+
endef
# Here is the rule to actually build a $(ARCH)/foo.exe
@@ -76,9 +91,10 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).nm
+ $(NM) -g -n $@ > $(basename $@).nm
+ $(STRIP) -o $(basename $@) $@
$(SIZE) $(basename $@).exe
endef
endif
diff --git a/make/custom/mvme2307.cfg b/make/custom/mvme2307.cfg
index 86f866af0d..d4a628956a 100644
--- a/make/custom/mvme2307.cfg
+++ b/make/custom/mvme2307.cfg
@@ -8,6 +8,7 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
RTEMS_CPU=powerpc
RTEMS_CPU_MODEL=mpc604
+RTEMS_PPC_EXCEPTION_PROCESSING_MODEL=new
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=motorola_powerpc
@@ -34,14 +35,6 @@ RTEMS_BSP_FAMILY=motorola_powerpc
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (PowerPC)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (PowerPC)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -50,26 +43,34 @@ RTEMS_BSP_FAMILY=motorola_powerpc
#
define make-target-options
- @echo "/* #define NDEBUG 1 */ " >>$@
- @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
- @echo "/* #define RTEMS_DEBUG 1 */" >>$@
- @echo "#define CONSOLE_USE_INTERRUPTS 0" >>$@
- @echo "#define CONSOLE_USE_POLLED !CONSOLE_USE_INTERRUPTS" >>$@
- @echo "#define PPC_VECTOR_FILE_BASE 0x00000100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
- @echo "#define PPC_USE_SPRG 0" >>$@
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define PPCN_60X_USE_DINK 0" >>$@
+ @echo "#define PPCN_60X_USE_NONE 1" >>$@
+ @echo "#define PPC_USE_DATA_CACHE 1" >>$@
+ @echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
+ @echo "#define PPC_USE_SPRG 1"
endef
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
#
-CPU_CFLAGS = -mcpu=604
+CPU_CFLAGS = -mcpu=604 -mmultiple -mstring -mstrict-align
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
# NOTE: some level of -O may be actually required by inline assembler
-CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
+#CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
+CFLAGS_OPTIMIZE_V = -O4
+
+# debug flags: typically none, but at least -O1 is required due to this
+# BSP using inlined code
+CFLAGS_DEBUG_V = -O1
+
+# profile flags: typically none, but at least -O1 is required due to this
+# BSP using inlined code
+CFLAGS_PROFILE_V = -O1
# The following is a linkcmds file which will work without using the
# -specs system in gcc 2.8.
@@ -83,20 +84,23 @@ CFLAGS_OPTIMIZE_V=-O4 -fno-keep-inline-functions
# $(START_FILE) $(LINK_OBJS) \
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
-ifeq ($(RTEMS_USE_GCC272),yes)
define make-exe
- $(CC) $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
+# The following commands make a bootable image but will not work outside
+# the build tree.
+# test -d ${PROJECT_RELEASE}/bin || mkdir ${PROJECT_RELEASE}/bin
+# $(CP) $@ $(PROJECT_ROOT)/powerpc-rtems/c/mvme2307/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/$(ARCH); \
+# ( cd $(PROJECT_ROOT)/powerpc-rtems/c/mvme2307/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader; \
+# $(MAKE) bootloader BINARY_LOADED=$@; )
+# f=`basename $@ .exe`; \
+# cp $(PROJECT_ROOT)/powerpc-rtems/c/mvme2307/lib/libbsp/powerpc/$(RTEMS_BSP_FAMILY)/bootloader/bootloader \
+# ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe \
+# && chmod 755 \
+# ${PROJECT_RELEASE}/bin/$${f}$(LIB_VARIANT).exe
endef
-else
-define make-exe
- $(CC) $(CFLAGS) -o $(basename $@).exe \
- $(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $@ > $(basename $@).num
- $(SIZE) $@
-endef
-endif
+
# Miscellaneous additions go here
diff --git a/make/custom/ods68302.cfg b/make/custom/ods68302.cfg
index d8e46eb6a1..b370681db1 100644
--- a/make/custom/ods68302.cfg
+++ b/make/custom/ods68302.cfg
@@ -20,7 +20,9 @@ RTEMS_BSP_FAMILY=ods68302
# This contains the compiler options necessary to select the CPU model
# and (hopefully) optimize for it.
#
-CPU_CFLAGS =-m68302 -msoft-float
+# 68000+softfloat results in gcc 2.95.2 giving default libraries.
+# CPU_CFLAGS = -m68302 -msoft-float
+CPU_CFLAGS = -m68302
CPU_DEFINES = \
-DVARIANT=$(BSP_VARIANT) -DMC68302_BASE=$(MC68302_BASE) \
-DRAM_BASE=$(RAM_BASE) -DRAM_SIZE=$(RAM_SIZE) \
@@ -71,12 +73,12 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
- -o $(basename $@).exe \
+ -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
- $(NM) -g -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
endif
# Miscellaneous additions go here
diff --git a/make/custom/p4000.cfg b/make/custom/p4000.cfg
index a5965f8124..ac970a8e6a 100644
--- a/make/custom/p4000.cfg
+++ b/make/custom/p4000.cfg
@@ -58,7 +58,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
diff --git a/make/custom/p4600.cfg b/make/custom/p4600.cfg
index 11de96e414..f4dff4dedd 100644
--- a/make/custom/p4600.cfg
+++ b/make/custom/p4600.cfg
@@ -70,13 +70,13 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) \
- -o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
- $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
+ -o $@ $(LINK_OBJS) $(LINK_LIBS)
+ $(OBJCOPY) -O srec $@ $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
$(RM) $(basename $@).srec1
- $(NM) -n $(basename $@).exe > $(basename $@).num
- $(SIZE) $(basename $@).exe
+ $(NM) -n $@ > $(basename $@).num
+ $(SIZE) $@
endef
endif
diff --git a/make/custom/p4650.cfg b/make/custom/p4650.cfg
index 6b2ff786c2..e0f6cc58e0 100644
--- a/make/custom/p4650.cfg
+++ b/make/custom/p4650.cfg
@@ -69,7 +69,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS) $(LD_LIBS)
$(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
$(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
diff --git a/make/custom/papyrus.cfg b/make/custom/papyrus.cfg
index b65536675c..842b4a9bf3 100644
--- a/make/custom/papyrus.cfg
+++ b/make/custom/papyrus.cfg
@@ -12,10 +12,6 @@ RTEMS_CPU_MODEL=ppc403
# This is the actual bsp directory used during the build process.
RTEMS_BSP_FAMILY=papyrus
-# These should be defined in targopt.h now.
-#CPU_DEFINES=-DPPC_ABI=PPC_ABI_POWEROPEN \
-# -DPPC_ASM=PPC_ASM_ELF -DPPC_VECTOR_FILE_BASE=0x0100
-
# This section makes the target dependent options file.
# NDEBUG (C library)
@@ -33,15 +29,6 @@ RTEMS_BSP_FAMILY=papyrus
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (PowerPC)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-# This BSP was initially developed using the PowerOpen ABI.
-#
-# PPC_ASM (PowerPC)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -53,8 +40,6 @@ define make-target-options
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 1" >>$@
endef
@@ -88,7 +73,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
index fcc7697fbe..a9b23ad1ab 100644
--- a/make/custom/pc386.cfg
+++ b/make/custom/pc386.cfg
@@ -81,13 +81,16 @@ define make-exe
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
$(NM) -g -n $(basename $@).obj > $(basename $@).num
$(SIZE) $(basename $@).obj
- $(INSTALL_PROGRAM) -D -m 555 $(basename $@).bt \
+ test -d ${PROJECT_RELEASE}/BootImgs \
+ || mkdir ${PROJECT_RELEASE}/BootImgs
+ cp $(basename $@).bt \
${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
+ chmod 755 \
+ ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
- -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
-o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O elf32-i386 \
@@ -100,16 +103,19 @@ define make-exe
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
$(NM) -g -n $(basename $@).obj > $(basename $@).num
$(SIZE) $(basename $@).obj
- @$(mkinstalldirs) ${PROJECT_RELEASE}/BootImgs
- $(INSTALL_PROGRAM) -D -m 555 $(basename $@).bt \
- ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ test -d ${PROJECT_RELEASE}/BootImgs \
+ || mkdir ${PROJECT_RELEASE}/BootImgs
+ f=`basename $@ .exe`; \
+ cp $(basename $@).bt \
+ ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
+ && chmod 755 \
+ ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Ttext,$(RELOCADDR) \
-o $@ $(LINK_OBJS) $(LINK_LIBS)
endef
define make-cxx-exe
- $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
- -Wl,--oformat,elf32-i386 -o $(basename $@).obj \
- -o $(basename $@).obj \
+ $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Ttext,$(RELOCADDR) -o $(basename $@).obj \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O elf32-i386 \
--remove-section=.rodata \
@@ -121,9 +127,15 @@ define make-cxx-exe
$(START16FILE) $(START16ADDR) 0 $(basename $@).bin $(RELOCADDR) 0
$(NM) -g -n $(basename $@).obj > $(basename $@).num
$(SIZE) $(basename $@).obj
- $(INSTALL_PROGRAM) -D -m 555 $(basename $@).bt \
- ${PROJECT_RELEASE}/BootImgs/$(basename $@)$(LIB_VARIANT).bt
- $(CXX) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -Wl,-Ttext,$(RELOCADDR) \
+ test -d ${PROJECT_RELEASE}/BootImgs \
+ || mkdir ${PROJECT_RELEASE}/BootImgs
+ f=`basename $@ .exe`; \
+ cp $(basename $@).bt \
+ ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt \
+ && chmod 755 \
+ ${PROJECT_RELEASE}/BootImgs/$${f}$(LIB_VARIANT).bt
+ $(LINK.cc) $(AM_CFLAGS) $(AM_CXXFLAGS) $(AM_LDFLAGS) \
+ -Wl,-Ttext,$(RELOCADDR) \
-o $(basename $@).coff $(LINK_OBJS) $(LINK_LIBS)
endef
endif
diff --git a/make/custom/ppcn_60x.cfg b/make/custom/ppcn_60x.cfg
index 6c2ea5dcc3..9c8468e443 100644
--- a/make/custom/ppcn_60x.cfg
+++ b/make/custom/ppcn_60x.cfg
@@ -36,14 +36,6 @@ RTEMS_BSP_FAMILY=ppcn_60x
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (ppc)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (ppc)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -64,8 +56,6 @@ define make-target-options
@echo "#define PPCN_60X_USE_NONE 0" >>$@
@echo "#define PPC_USE_DATA_CACHE 1" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 0" >>$@
endef
@@ -93,7 +83,7 @@ CFLAGS_OPTIMIZE_V=-O0 -fno-keep-inline-functions -fvolatile-global -fvolatile
# $(LD_LIBS) \
# -Wl,-\( -Wl,-lc -Wl,-lrtemsall -Wl,-lgcc -Wl,-\)
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).exe $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).exe > $(basename $@).num
$(SIZE) $(basename $@).exe
diff --git a/make/custom/psim.cfg b/make/custom/psim.cfg
index 4dbce3d394..62e3074993 100644
--- a/make/custom/psim.cfg
+++ b/make/custom/psim.cfg
@@ -39,14 +39,6 @@ RTEMS_BSP_FAMILY=psim
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (PowerPC)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (PowerPC)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -63,8 +55,6 @@ define make-target-options
@echo "#define CONSOLE_USE_POLLED !CONSOLE_USE_INTERRUPTS" >>$@
@echo "#define PSIM_FAST_IDLE 1" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0xFFF00100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 1" >>$@
endef
@@ -100,7 +90,7 @@ endef
else
# -Wl,--gc-sections
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).exe \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
diff --git a/make/custom/rxgen960.cfg b/make/custom/rxgen960.cfg
index b1e33fa871..59867642b8 100644
--- a/make/custom/rxgen960.cfg
+++ b/make/custom/rxgen960.cfg
@@ -62,8 +62,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) \
- $(LDLIBS) -o $@ \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(OBJCOPY) -oformat binary $@ $(basename $@).bin
diff --git a/make/custom/score603e.cfg b/make/custom/score603e.cfg
index 7dff53f7a2..67e9534ea5 100644
--- a/make/custom/score603e.cfg
+++ b/make/custom/score603e.cfg
@@ -61,14 +61,6 @@ include $(RTEMS_ROOT)/make/custom/default.cfg
# This defines the base address of the exception table.
# NOTE: Vectors are actually at 0xFFF00000 but file starts at offset 0x0100
#
-# PPC_ABI (ppc)
-# This defines the calling convention (Application Binary Interface)
-# used in this configuration. EABI is the only one supported.
-#
-# PPC_ASM (ppc)
-# This defines the assembly language format used in this configuration.
-# ELF is the only one supported.
-#
# PPC_USE_SPRG (RTEMS PowerPC port)
# If defined, then the PowerPC specific code in RTEMS will use some
# of the special purpose registers to slightly optimize interrupt
@@ -94,8 +86,6 @@ define make-target-options
@echo "#define SCORE603E_USE_OPEN_FIRMWARE 0" >>$@
@echo "#define PPC_USE_DATA_CACHE 0" >>$@
@echo "#define PPC_VECTOR_FILE_BASE 0x0100" >>$@
- @echo "#define PPC_ABI PPC_ABI_EABI" >>$@
- @echo "#define PPC_ASM PPC_ASM_ELF" >>$@
@echo "#define PPC_USE_SPRG 0" >>$@
@echo "#define HAS_PMC_PSC8 0" >>$@
endef
@@ -125,7 +115,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) \
-o $(basename $@).elf $(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $(basename $@).elf > $(basename $@).num
$(SIZE) $(basename $@).elf
diff --git a/make/custom/simhppa.cfg b/make/custom/simhppa.cfg
index 93e25b0f9c..2f222108c4 100644
--- a/make/custom/simhppa.cfg
+++ b/make/custom/simhppa.cfg
@@ -117,18 +117,14 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \
- -o $(basename $@).exe \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) $(GCC_LD_LOC_OPTIONS) \
+ -o $@ \
$(LINK_OBJS) $(LINK_LIBS)
$(NM) -g -n $@ > $(basename $@).num
$(SIZE) $@
endef
endif
-define make-rel
- $(LDARGS) $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
-endef
-
# Miscellaneous additions go here
# BSP-specific tools
diff --git a/make/custom/ts_386ex.cfg b/make/custom/ts_386ex.cfg
index 6d87e8e9ae..aa73067866 100644
--- a/make/custom/ts_386ex.cfg
+++ b/make/custom/ts_386ex.cfg
@@ -76,7 +76,7 @@ define make-exe
endef
else
define make-exe
- $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).elf \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -o $(basename $@).elf \
$(LINK_OBJS) $(LINK_LIBS)
$(OBJCOPY) -O binary $(basename $@).elf $(basename $@).exe
$(NM) -g -n $(basename $@).elf > $(basename $@).num
diff --git a/make/host.cfg.in b/make/host.cfg.in
index cae07de613..aa215b8eae 100644
--- a/make/host.cfg.in
+++ b/make/host.cfg.in
@@ -19,15 +19,13 @@ SHELL=@SHELL@
ECHO=echo
CAT=cat
-RM=@RM@ -f
+## RM=@RM@ -f
CP=@CP@
MV=@MV@
LN=@LN@
MKDIR=mkdir
CHMOD=chmod
SED=sed
-# Anybody using this?
-# M4=@M4@
# Global tools
ifndef PACKHEX
@@ -74,7 +72,3 @@ INSTDATAFLAGS = -m 0644
INSTLIBFLAGS = -m 0644
INSTDIRFLAGS = -m 0755 -d
INSTINCFLAGS = -m 0644
-
-ifndef INSTALL_DATA
-INSTALL_DATA = $(INSTALL) $(INSTDATAFLAGS)
-endif
diff --git a/make/leaf.cfg b/make/leaf.cfg
index 88f708cac8..a4f29aa6ef 100644
--- a/make/leaf.cfg
+++ b/make/leaf.cfg
@@ -42,13 +42,14 @@ ifeq (${DEPEND},$(wildcard ${DEPEND}))
include ${DEPEND} # pull in dependencies if they exist
endif
+ifndef AUTOMAKE
#
# Builtin targets for compilation variants
#
debug:
$(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \
"CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
- "CFLAGS_OPTIMIZE=$(CFLAGS_DEBUG_OPTIMIZE_V)" \
+ "CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)" \
"LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA)
profile:
@@ -56,6 +57,7 @@ profile:
MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \
"CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \
"LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA)
+endif
#
# VARIANT_VA will convert our ${ARCH} back into "" or "debug" or "profile".
@@ -106,15 +108,15 @@ clean-am: clean-generic
distclean-am: distclean-generic clean-am
-$(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
+ifndef AUTOMAKE
preinstall-am:
preinstall: preinstall-am
-ifndef AUTOMAKE
distclean: distclean-am
-$(RM) ./config.status
clean: clean-am
-endif
.PHONY: distclean distclean-am
.PHONY: clean clean-am
+endif
diff --git a/make/main.cfg b/make/main.cfg
index 1a050d34ab..495b7c74b8 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -61,14 +61,9 @@ $(TARGET_VARIANTS)
${ARCH}:
test -d ${ARCH} || mkdir ${ARCH}
-# general purpose forcing dependency; try to use .PHONY instead
-FORCEIT:
-
-FORCE:
-
ifndef AUTOMAKE
distclean-generic:
- -$(RM) Makefile .#* $(CONFIG_CLEAN_FILES)
+ -$(RM) .#* $(CONFIG_CLEAN_FILES)
-$(RM) -r $(CLOBBER_ADDITIONS)
clean-generic: