summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-20 19:30:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-20 19:30:30 +0000
commitbffb93879940c71c58d2c66410e1bd5e5e4dc979 (patch)
tree2b13eb892f6022cb62a7847f2d27fb44e5e313ae
parentAdded _times_r. (diff)
downloadrtems-bffb93879940c71c58d2c66410e1bd5e5e4dc979.tar.bz2
Removed PROJECT_HOME and CONFIG_DIR variables.
-rw-r--r--c/src/make/README518
-rw-r--r--c/src/make/compilers/gcc-target-default.cfg285
-rw-r--r--c/src/make/directory.cfg43
-rw-r--r--c/src/make/host.cfg.in68
-rw-r--r--c/src/make/lib.cfg20
-rw-r--r--make/Makefile.in85
-rw-r--r--make/README518
-rw-r--r--make/Templates/Makefile.dir9
-rw-r--r--make/Templates/Makefile.inc.in45
-rw-r--r--make/Templates/Makefile.leaf70
-rw-r--r--make/Templates/Makefile.lib59
-rw-r--r--make/compilers/gcc-no_bsp.cfg299
-rw-r--r--make/compilers/gcc-portsw.cfg309
-rw-r--r--make/compilers/gcc-target-default.cfg285
-rw-r--r--make/custom/HPUX9-posix.cfg62
-rw-r--r--make/custom/Linux-posix.cfg76
-rw-r--r--make/custom/Solaris-posix.cfg60
-rw-r--r--make/custom/cvme961.cfg87
-rw-r--r--make/custom/default.cfg73
-rw-r--r--make/custom/dmv152.cfg92
-rw-r--r--make/custom/efi332.cfg86
-rw-r--r--make/custom/efi68k.cfg83
-rw-r--r--make/custom/erc32.cfg110
-rw-r--r--make/custom/force386.cfg88
-rw-r--r--make/custom/gen68302.cfg79
-rw-r--r--make/custom/gen68360.cfg124
-rw-r--r--make/custom/gen68360_040.cfg15
-rw-r--r--make/custom/gensh1.cfg106
-rw-r--r--make/custom/go32.cfg121
-rw-r--r--make/custom/go32_p5.cfg15
-rw-r--r--make/custom/i386ex.cfg89
-rw-r--r--make/custom/idp.cfg85
-rw-r--r--make/custom/mvme136.cfg86
-rw-r--r--make/custom/mvme147.cfg79
-rw-r--r--make/custom/mvme147s.cfg19
-rw-r--r--make/custom/mvme162.cfg122
-rw-r--r--make/custom/mvme162lx.cfg17
-rw-r--r--make/custom/no_bsp.cfg62
-rw-r--r--make/custom/ods68302.cfg129
-rw-r--r--make/custom/p4000.cfg85
-rw-r--r--make/custom/p4600.cfg105
-rw-r--r--make/custom/p4650.cfg108
-rw-r--r--make/custom/papyrus.cfg87
-rw-r--r--make/custom/pc386.cfg96
-rw-r--r--make/custom/portsw.cfg64
-rw-r--r--make/custom/posix.cfg12
-rw-r--r--make/custom/simhppa.cfg145
-rw-r--r--make/directory.cfg43
-rw-r--r--make/host.cfg.in68
-rw-r--r--make/leaf.cfg169
-rw-r--r--make/lib.cfg20
-rw-r--r--make/main.cfg82
-rw-r--r--make/target.cfg.in56
53 files changed, 5718 insertions, 0 deletions
diff --git a/c/src/make/README b/c/src/make/README
new file mode 100644
index 0000000000..6d4b7501b4
--- /dev/null
+++ b/c/src/make/README
@@ -0,0 +1,518 @@
+#
+# $Id$
+#
+
+ make/README
+
+ This file describes the layout and conventions of the make tree used in
+ the RTEMS software project and others.
+ All of these "make" trees are substantially similar; however this
+ file documents the current state of the rtems Makefile tree.
+
+ This make tree was developed originally to simplify porting projects
+ between various os's. The primary goals are:
+
+ . 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.
+
+ . Support for different compilers and operating systems
+ on a per-user basis. Using the same sources (including
+ Makefiles) one developer can develop and test under SVR4,
+ another under 4.x, another under HPUX.
+
+ . Builtin support for compiling "variants" such as debug,
+ profile, and tcov versions. These variants can be built
+ recursively.
+
+ . Control of system dependencies. "hidden" dependencies on
+ environment variables (such as PATH)
+ have been removed whenever possible. No matter what your
+ PATH variable is set to, you should get the same thing
+ when you 'make' as everyone else on the project.
+
+ This description attempts to cover all aspects of the Makefile tree. Most
+ of what is described here is maintained automatically by the configuration
+ files.
+
+ The example makefiles in make/Templates should be used as a starting
+ point for new directories.
+
+ There are 2 main types of Makefile:
+
+ directory and leaf.
+
+ Directory Makefiles
+ -------------------
+
+ A Makefile in a source directory with sub-directories is called a
+ "directory" Makefile.
+
+ Directory Makefile's are simply responsible for acting as "middle-men"
+ and recursing into their sub-directories and propagating the make.
+
+ For example, directory src/bin will contain only a Makefile and
+ sub-directories. No actual source code will reside in the directory.
+ The following commands:
+
+ $ cd src/bin
+ $ make all
+
+ would descend into all the subdirectories of 'src/bin' and recursively
+ perform a 'make all'.
+
+ A 'make debug' will recurse thru sub-directories as a debug build.
+
+ A template directory Makefile which should work in almost all
+ cases is in make/Templates/Makefile.dir
+
+
+ Leaf Makefiles
+ --------------
+
+ Source directories that contain source code for libraries or
+ programs use a "leaf" Makefile.
+
+ These makefiles contain the rules necessary to build programs
+ (or libraries).
+
+ A template leaf Makefile is in Templates/Makefile.leaf . A template
+ leaf Makefile for building libraries is in Templates/Makefile.lib .
+
+
+ NOTE: To simplify nested makefile's and source maintenance, we disallow
+ 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.
+
+ Variants (where objects go)
+ ---------------------------
+
+ All binary targets are placed in a sub-directory whose name is (for
+ example):
+
+ o-force386/ -- binaries (no debug, no profile)
+ o-force386-debug/ -- debug binaries
+ o-force386-profile/ -- profiling binaries
+
+ Using the template Makefiles, this will all happen automatically.
+
+ Within a Makefile, the ${ARCH} variable is set to o-force386,
+ o-force386-debug, etc., as appropriate.
+
+ Typing 'make' will place objects in o-force386.
+ 'make debug' will place objects in o-force386-debug.
+ 'make profile' will place objects in o-force386-profile.
+
+ NOTE: For RTEMS work, the word 'force386' is the specified
+ RTEMS_BSP (specified in the modules file)
+
+ 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.
+
+ Targets debug_install and profile_install are equivalent to 'make
+ install' except that debug (or profile) variants are built and
+ installed.
+
+ The targets debug, profile, debug_install, profile_install, 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_install
+
+ When building a command that is linked with a generated library, the
+ appropriate version of the library will be linked in.
+
+ For example, the following fragments link the normal, debug, or
+ profile version of "libmine.a" as appropriate:
+
+ LDLIBS += $(LIBMINE)
+ LIBMINE = ../libmine/${ARCH}/libmine.a
+
+ ${ARCH}/pgm: $(LIBMINE) ${OBJS}
+ $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
+
+ If we do 'gmake debug', then the library in
+ ../libmine/sparc-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
+ cd ../libmine; ${MAKE} ${VARIANT_VA}
+
+ The above would generate the following command to build libmine.a:
+
+ cd ../libmine; gmake debug
+
+ The macro reference ${VARIANT_VA} converts ${ARCH} to the word 'debug'
+ (in this example) and thus ensures the proper version of the library
+ is built.
+
+
+ Targets
+ -------
+
+ All Makefile's support the following targets:
+
+ all -- make "everything"
+ install -- install "everything"
+
+ The following targets are provided automatically by
+ 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
+
+
+ All directory Makefiles automatically propagate all these targets. If
+ you don't wish to support 'all' or 'install' in your source directory,
+ you must leave the rules section empty, as the parent directory Makefile
+ will attempt it on recursive make's.
+
+
+ Configuration
+ -------------
+
+ All the real work described here happens in file(s) included
+ from your Makefile.
+
+ 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:
+
+ /.../make/custom/force386.cfg
+
+ All leaf Makefile's also include either 'make/leaf.cfg' (or
+ 'make/lib.cfg' for building libraries). These config files provide
+ default rules and set up the command macros as appropriate.
+
+ All directory Makefiles include 'make/directory.cfg'. directory.cfg
+ provides all the rules for recursing through sub directories.
+
+ The Makefile templates already perform these include's.
+
+ 'make/leaf.cfg' (or directory.cfg) in turn includes:
+
+ a file specifying general purpose rules appropriate for
+ both leaf and directory makefiles.
+ ( make/main.cfg )
+
+ personality modules specified by the customization file for:
+ compiler ( make/compilers/??.cfg )
+ operating system ( make/os/??.cfg )
+
+
+ private customization files
+ ---------------------------
+
+ [ $(RTEMS_CUSTOM) ]
+
+ Your own private configuration file. Specifies which of the above
+ files you want to include.
+
+ Example: custom/force386.cfg
+
+ CONFIG.$(HOST_ARCH).OS = $(RTEMS_ROOT)/make/os/HPUX-9.0.cfg
+
+ # HOST Compiler config file
+ # You may also want to specify where the compiler resides here.
+ CC_$(HOST_ARCH)_DIR=/usr/local
+ CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+ ## Target compiler config file, if any
+ CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
+ CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-force386.cfg
+
+ generic rules file
+ ------------------
+
+ [ make/main.cfg ]
+ included by leaf.cfg or directory.cfg.
+
+ This file contains some standard rules and variable assignments
+ that all Makefiles need.
+
+ It also includes the FORCEIT: pseudo target.
+
+
+ OS config file for host machine
+ -------------------------------
+
+ [ make/os/OS-NAME.cfg ]
+ included by main.cfg
+
+ Figures out the target architecture and specifies command names
+ for the OS tools including RCS/CVS (but NOT for the compiler tools).
+
+
+ Compiler configuration for the target
+ -------------------------------------
+
+ [ compilers/COMPILER-NAME.cfg ]
+ included by leaf.cfg
+
+ Specifies the names of tools for compiling programs.
+ Names in here should be fully qualified, and NOT depend on $PATH.
+
+ Also specifies compiler flags to be used to generate optimized,
+ debugging and profile versions, as well as rules to compile
+ assembly language and make makefile dependencies.
+
+
+ Configuration Variables
+ -----------------------
+
+ Variables you have to set in the environment or in your Makefile.
+ Note: the rtems module files set RTEMS_ROOT and RTEMS_CUSTOM
+ for you.
+
+ Environment Variables
+ ---------------------
+
+ RTEMS_BSP -- name of your 'bsp' eg: force386
+
+ RTEMS_ROOT -- The root of your source tree.
+ All other file names are derived from this.
+ [ 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_TOOLS
+
+ etc., which are used within the make config files themselves.
+ (The files in make/*.cfg try to avoid use of word RTEMS so
+ they can be more easily shared by other projects)
+
+ Preset variables
+ ----------------
+
+ 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.
+
+ CONFIG.$(HOST_ARCH).OS
+ -- full path of OS config file, set by
+ custom config file.
+
+ CONFIG.$(HOST_ARCH).CC
+ -- full path of C compilation config file, set by custom
+ config file.
+
+ PROJECT_RELEASE
+ -- release/install directory
+ [ $(PROJECT_ROOT) ]
+
+ PROJECT_BIN
+ -- directory for installed binaries
+ [ $(PROJECT_ROOT)/bin ]
+
+ PROJECT_TOOLS
+ -- 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-force386 or o-force386-debug ]
+
+ HOST_ARCH
+ -- host machine architecture name
+ [ eg: sun4, sparc on SVR4 ]
+
+ VARIANTS -- full list of all possible values for $(ARCH);
+ used mainly for 'make clean'
+ [ eg: "o-force386 o-force386-debug o-force386-profile" ]
+
+ VARIANT_VA -- Variant name.
+ Normally "", but for 'make debug' it is "debug",
+ for 'make profile', "profile, etc.
+
+ see make/leaf.cfg for more info.
+
+
+ Preset compilation variables
+ ----------------------------
+
+ This is a list of some of the compilation variables.
+ Refer to the compiler config files for the complete list.
+
+ CFLAGS_OPTIMIZE_V -- value of optimize flag for compiler
+ [ eg: -O ]
+
+ CFLAGS_DEBUG_V -- value of debug flag for compiler
+ [ eg: -g ]
+
+ CFLAGS_PROFILE_V -- compiler profile flags
+ [ eg: -pg ]
+
+ CFLAGS_DEBUG_OPTIMIZE_V
+ -- optimize flag if compiling for debug
+ [ eg: "" ]
+
+ CFLAGS_DEBUG
+ CFLAGS_PROFILE
+ CFLAGS_OPTIMIZE -- current values for each depending
+ on make variant.
+
+ LDFLAGS_STATIC_LIBRARIES_V
+ -- ld option for static libraries
+ -Bstatic or -dy (svr4)
+
+ LDFLAGS_SHARED_LIBRARIES_V
+ -- 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
+ ------------------
+
+ The following variables may be set in a typical Makefile.
+
+ C_PIECES -- File names of your .c files without '.c' suffix.
+ [ eg: C_PIECES=main funcs stuff ]
+
+ CC_PIECES -- ditto, except for .cc files
+
+ S_PIECES -- ditto, except for .S files.
+
+ LIB -- target library name in leaf library makefiles.
+ [ eg: LIB=${ARCH}/libmine.a ]
+
+ H_FILES -- your .h files in this directory.
+ [ eg: H_FILES=stuff.h extra.h ]
+
+ DEFINES -- cc -D items. Included in CPPFLAGS.
+ leaf Makefiles.
+ [ eg: DEFINES += -DUNIX ]
+
+ CPPFLAGS -- -I include directories.
+ 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.
+
+ LDFLAGS -- -L arguments to ld; more may be ADDed.
+
+ LD_LIBS -- libraries to be linked in.
+ [ eg: LDLIBS += ../libfoo/${ARCH}/libfoo.a ]
+
+ XCFLAGS -- "extra" CFLAGS for special needs. Pre-pended
+ to CFLAGS.
+ Not set or used by Makefiles.
+ Can be set on command line to pass extra flags
+ to the compiler.
+
+ XCPPFLAGS -- ditto for CPPFLAGS
+ Can be set on command line to pass extra flags
+ to the preprocessor.
+
+ XCCPPFLAGS -- same as XCPPFLAGS for C++.
+
+ XCCFLAGS -- same as XCFLAGS for C++.
+
+ SUB_DIRS -- list of sub directories for make recursion.
+ directory Makefiles only.
+ [ eg: SUB_DIRS=cpu bsp ]
+
+ CLEAN_ADDITIONS
+ -- list of files or directories that should
+ be deleted by 'make clean'
+ [ eg: CLEAN_ADDITIONS += y.tab.c ]
+
+ See 'leaf.cfg' for the 'clean:' rule and its
+ default deletions.
+
+ CLOBBER_ADDITIONS
+ -- list of files or directories that should
+ be deleted by 'make clobber'
+ Since 'make clobber' includes 'make clean',
+ you don't need to duplicate items in both.
+
+ TARGET_ARCH -- target architecture (eg: o-force386)
+ 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
+
+ ECHO,CAT,RM,CP,MV,LN,MKDIR,CHMOD
+
+ ED,SED
+
+ CC,CPP,AS,AR,LD,NM,SIZE,RANLIB,MKLIB,
+ YACC,LEX,LINT,CTAGS,ETAGS
+
+ Special Directory Makefile Targets
+ ----------------------------------
+
+ all_WRAPUP
+ clean_WRAPUP
+ install_WRAPUP
+ clean_WRAPUP
+ clobber_WRAPUP
+ depend_WRAPUP
+ -- Specify additional commands for recursive
+ (directory level) targets.
+
+ This is handy in certain cases where you need
+ to do bit of work *after* a recursive make.
+
+ make/Templates
+ --------------
+
+ This directory contains Makefile and source file templates that
+ should help in creating or converting makefiles.
+
+ Makefile.leaf
+ Template leaf Makefiles.
+
+ Makefile.lib
+ Template leaf library Makefiles.
+
+ Makefile.dir
+ Template "directory" makefile.
+
+
+
diff --git a/c/src/make/compilers/gcc-target-default.cfg b/c/src/make/compilers/gcc-target-default.cfg
new file mode 100644
index 0000000000..32f40c5e96
--- /dev/null
+++ b/c/src/make/compilers/gcc-target-default.cfg
@@ -0,0 +1,285 @@
+#
+#
+
+CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
+
+CPLUS_CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
+
+##
+# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
+# would want the corresponding macros to be set to.
+#
+# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
+# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
+#
+
+# default flags
+
+# We only include the header files for KA9Q if it is enabled.
+INCLUDE_KA9Q_yes_V = -I$(PROJECT_INCLUDE)/ka9q
+INCLUDE_KA9Q = $(INCLUDE_KA9Q_$(HAS_KA9Q)_V)
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# Ask gcc where it finds its own include files
+GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
+
+CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
+ -nostdinc -I$(PROJECT_INCLUDE) \
+ $(INCLUDE_KA9Q) \
+ -I$(RTEMS_LIBC_DIR)/include -I$(GCC_INCLUDE) $(DEFINES)
+
+ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
+ -nostdinc -I$(PROJECT_INCLUDE) \
+ -I$(RTEMS_LIBC_DIR)/include -I$(GCC_INCLUDE) $(DEFINES)
+
+# default location of Standard C Library
+ifndef LIBC_LIBC
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/libc.a
+endif
+
+ifndef LIBC_LIBM
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/libm.a
+endif
+
+else
+CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
+ -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems \
+ $(INCLUDE_KA9Q) $(DEFINES)
+
+ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g -I$(srcdir) \
+ -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems $(DEFINES)
+
+# default location of Standard C Library
+ifndef LIBC_LIBC
+LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
+endif
+
+ifndef LIBC_LIBM
+LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
+endif
+endif
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+HAS_CPLUSPLUS=yes
+CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
+else
+HAS_CPLUSPLUS=no
+endif
+
+# 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
+
+# default is to optimize
+CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+
+# dynamic libraries
+CFLAGS_DYNAMIC_V=-fpic
+#ASFLAGS_DYNAMIC_V=
+
+CFLAGS=$(CFLAGS_DEFAULT) $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
+
+# List of library paths without -L
+LD_PATHS= $(PROJECT_RELEASE)/lib
+
+# libraries you want EVERYONE to link with
+#LD_LIBS=
+
+# ld flag to ensure pure-text
+#LDFLAGS_MUST_BE_PURE_V =
+
+# ld flag for [un]shared objects
+#LDFLAGS_STATIC_LIBRARIES_V =
+#LDFLAGS_SHARED_LIBRARIES_V =
+
+# ld flag for incomplete link
+LDFLAGS_INCOMPLETE = -r
+
+# Special linker options when building lib.so
+LDFLAGS_DYNAMIC_V = ??
+
+# Some dynamic linking systems want the preferred name recorded in the binary
+# ref: src/libxil/Makefile
+LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
+
+# ld flags for profiling, debugging
+LDFLAGS_PROFILE_V =
+LDFLAGS_DEBUG_V =
+
+LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
+
+#
+# Stuff to clean and clobber for the compiler and its tools
+#
+
+CLEAN_CC = a.out *.o *.BAK
+CLOBBER_CC =
+
+#
+# Client compiler and support tools
+#
+
+# CPP command to write file to standard output
+CPP=$(CC) -E
+
+# flags set by cc when running cpp
+CPP_CC_FLAGS=-D__STDC__
+
+ASFLAGS=
+ASM4FLAGS := -I $(PROJECT_INCLUDE)
+
+# egrep regexp to ignore symbol table entries in ar archives.
+# Only used to make sure we skip them when coalescing libraries.
+# skip __.SYMDEF and empty names (maybe bug in ranlib??).
+AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
+ARFLAGS=ruv
+
+#
+# Command to convert a normal archive to one searchable by $(LD)
+# Not needed on SVR4
+#
+
+MKLIB=echo library is complete:
+
+#
+# How to compile stuff into ${ARCH} subdirectory
+#
+# NOTE: we override COMPILE.c
+#
+# NOTE: Remove -pipe if it causes you problems. Using it can decrease
+# compile time.
+#
+
+COMPILE.c=$(CC) $(CFLAGS) $(XCFLAGS) -c
+
+${ARCH}/%.o: %.c
+ ${COMPILE.c} -pipe -o $@ $<
+
+${ARCH}/%.o: %.cc
+ ${COMPILE.c} -pipe -o $@ $<
+
+${ARCH}/%.o: %.S
+ ${COMPILE.c} -pipe -DASM -o $@ $<
+
+# strip out C++ style comments.
+${ARCH}/%.o: %.s
+ sed -e 's/\/\/.*$$//' < $< | \
+ $(CPP) $(ASMFLAGS) -I. -I$(srcdir) -DASM - >$(ARCH)/$*.i
+ $(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
+
+# $(CPP) $(CPPFLAGS) -DASM - < $< >$(ARCH)/$*.i
+# $(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
+# $(RM) $(ARCH)/$*.i
+
+# Specify our own default rule for this to prevent having CFLAGS and
+# CPPFLAGS being passed to linker
+${ARCH}/%: ${ARCH}/%.o
+ ${CC} ${LDFLAGS} -o $@ $@.o ${LD_LIBS}
+
+# Make foo.rel from foo.o
+${ARCH}/%.rel: ${ARCH}/%.o
+ ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+
+# create $(ARCH)/pgm from pgm.sh
+${ARCH}/%: %.sh
+ $(RM) $@
+ $(CP) $< $@
+ $(CHMOD) +x $@
+
+# Dependency files for use by gmake
+# NOTE: we don't put in $(TARGET_ARCH)
+# so that 'make clean' doesn't blow it away
+
+DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+
+CLEAN_DEPEND=$(DEPEND).tmp
+CLOBBER_DEPEND=$(DEPEND)
+
+# We deliberately don't have anything depend on the
+# $(DEPEND) file; otherwise it will get rebuilt even
+# on 'make clean'
+#
+
+depend: $(C_FILES) $(CC_FILES) $(S_FILES)
+ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
+# Use gcc -M to generate dependencies
+# 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 $^ | \
+ $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
+ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
+ $(MV) $(DEPEND).tmp $(DEPEND)
+endif
+
+
+# List (possibly empty) of required managers
+# We require:
+# region -- used by lib/libcsupport for malloc()
+# ext -- used by libc for libc reentrancy hooks
+
+MANAGERS_REQUIRED=region ext sem
+
+# Create a RTEMS executable based on MANAGERS which was set in
+# app's Makefile
+
+MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))
+MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))
+
+# spell out all the LINK_FILE's, rather than using -lbsp, so
+# that $(LINK_FILES) can be a dependency
+
+# Start file must be one of
+# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
+# It defaults to start.o, but an app can override it.
+
+ifeq ($(START_BASE),)
+ START_FILE=
+else
+ START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
+endif
+
+CONSTRUCTOR=
+
+LIBC_LOW=
+
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+
+LINK_OBJS=\
+ $(CONSTRUCTOR) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(LD_LIBS) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
+
+LINK_LIBS=\
+ $(LD_LIBS) \
+ $(LIBC_EXTRA_LIBS) \
+ $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
+ $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
+
+LINK_FILES=\
+ $(START_FILE) \
+ $(LINK_OBJS) \
+ $(LINK_LIBS)
+
+#
+# Allow user to override link commands (to build a prom image, perhaps)
+#
+ifndef LINKCMDS
+LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
+endif
+
+
+define make-rel
+ $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+endef
diff --git a/c/src/make/directory.cfg b/c/src/make/directory.cfg
new file mode 100644
index 0000000000..1ae1db84bd
--- /dev/null
+++ b/c/src/make/directory.cfg
@@ -0,0 +1,43 @@
+#
+# $Id$
+#
+# make/directory.cfg
+#
+# Make(1) configuration file include'd by all directory-level Makefile's.
+#
+# See also make/main.cfg
+#
+
+# include $(RTEMS_ROOT)/make/main.cfg
+
+# on a 'make -k' we don't want to bomb out of directory list
+EXIT_CMD=exit 1
+ifeq (k, $(findstring k, $(MAKEFLAGS)))
+EXIT_CMD=true
+endif
+
+RULE=$(shell echo $@ | $(SED) -e s/debug_// -e s/profile_//)
+
+ifeq ($(RTEMS_USE_OWN_PDIR),yes)
+$(RECURSE_TARGETS):
+ @$(ECHO); \
+ BASEDIR=`pwd`; \
+ for subd in $(SUB_DIRS) xxx; \
+ do if [ $$subd != xxx ] ; then \
+ cd $$BASEDIR; \
+ $(ECHO); \
+ $(ECHO) "*** $$BASEDIR/$$subd ($@)" ; \
+ cmd="cd $$subd; $(MAKE) $(RULE)"; \
+ $(ECHO) $$cmd; \
+ eval $$cmd || $(EXIT_CMD); \
+ fi; done; \
+ $(ECHO); \
+ $(ECHO) "*** $$BASEDIR/$@ ($@) Finished."; \
+ $(ECHO)
+ $($@_WRAPUP)
+else
+ifdef RECURSE_TARGETS
+$(RECURSE_TARGETS):
+ set -e; for subd in $(SUB_DIRS); do $(MAKE) -w -C $$subd $@; done
+endif
+endif
diff --git a/c/src/make/host.cfg.in b/c/src/make/host.cfg.in
new file mode 100644
index 0000000000..0f088aff56
--- /dev/null
+++ b/c/src/make/host.cfg.in
@@ -0,0 +1,68 @@
+#
+# $Id $
+#
+# OS-specific configuration
+#
+# Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) 97/11/08
+#
+# Derived from rtems/c/make/os/*.cfg in previous RTEMS version.
+#
+
+RTEMS_HOST = @RTEMS_HOST@
+
+#
+# Stuff to clean and clobber for the OS
+#
+
+CLEAN_OS =
+CLOBBER_OS = *~ *.bak TAGS tags
+
+SHELL=/bin/sh
+ECHO=echo
+
+CAT=@CAT@
+RM=@RM@ -f
+CP=@CP@
+MV=@MV@
+LN=@LN@
+MKDIR=@MKDIR@
+CHMOD=@CHMOD@
+ED=@ED@
+SED=@SED@
+M4=@M4@
+
+INSTALL=$(PROJECT_TOOLS)/install-if-change
+INSTALL_VARIANT=$(PROJECT_TOOLS)/install-if-change -V "$(LIB_VARIANT)"
+
+FGREP=@FGREP@
+GREP=@GREP@
+EGREP=@EGREP@
+
+# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
+#
+# Must have shell functions. Some ksh's core dump mysteriously and
+# unreliably on RTEMS shell scripts. bash appears to be the most
+# reliable but late model ksh's are usually OK.
+KSH=@KSH@
+
+#
+# RCS support
+#
+RCS_CLEAN=$(PROJECT_TOOLS)/rcs-clean
+
+#
+# Rule to install a shell script with the proper shell to run it.
+#
+
+# when debugging, one may want to save the previous incarnation of the
+# installed script. Replace the first line of this rule to do this.
+#
+# -$(RM) $@.old
+# -$(MV) $@ $@.old >/dev/null 2>&1
+
+define make-script
+ -$(RM) $@
+ $(SED) -e '1,1s?^#!KSHELL?#!$(KSH)?' \
+ -e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
+ $(CHMOD) 0555 $@
+endef
diff --git a/c/src/make/lib.cfg b/c/src/make/lib.cfg
new file mode 100644
index 0000000000..6d170efed4
--- /dev/null
+++ b/c/src/make/lib.cfg
@@ -0,0 +1,20 @@
+#
+# $Id$
+#
+# make/lib.cfg
+#
+# Make(1) configuration file include'd by all "library" Makefile
+# Assumes $(LIB) is set to $(ARCH)/libfoo.a
+#
+
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+define make-library
+$(RM) $@
+$(AR) $(ARFLAGS) $@ $(OBJS)
+$(MKLIB) $@
+endef
+
+CLEAN_ADDITIONS +=
+
+.PRECIOUS: $(LIB)
diff --git a/make/Makefile.in b/make/Makefile.in
new file mode 100644
index 0000000000..16f78c6e5a
--- /dev/null
+++ b/make/Makefile.in
@@ -0,0 +1,85 @@
+#
+# $Id$
+#
+# Not strictly necessary to pull in this stuff. But it helps with
+# working with the templates and poking around.
+#
+
+@SET_MAKE@
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+RTEMS_ROOT = @RTEMS_ROOT@
+PROJECT_ROOT = @PROJECT_ROOT@
+RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+
+include $(RTEMS_CUSTOM)
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+CLEAN_ADDITIONS +=
+CLOBBER_ADDITIONS +=
+
+# NOTE: No need to prepend $(srcdir) to file names,
+# VPATH handles the paths for us.
+# NOTE: Only the files really need get installed.
+
+GENERIC_FILES := host.cfg target.cfg
+
+MAKEFILES := README \
+ directory.cfg leaf.cfg \
+ lib.cfg main.cfg
+
+# NOTE: Use the wildcard rule to install all custom files
+# CUSTOM_FILES := $(wildcard $(srcdir)/custom/*.cfg)
+# NOTE: This should be sufficient, but may fail for some BSPS:
+# Get all custom files for the BSP family, they may depend on eachother
+CUSTOM_FILES := custom/default.cfg $(patsubst %,custom/%.cfg,@RTEMS_BSP_LIST@)
+
+# NOTE: Use the wildcard rule to install all compiler files
+# COMPILER_FILES := $(wildcard $(srcdir)/compilers/*.cfg)
+COMPILER_FILES := $(CONFIG.$(TARGET_ARCH).CC) $(CONFIG.$(HOST_ARCH).CC)
+
+# NOTE: Don't use a wildcard rule here, otherwise Templates/Makefile.inc
+# will be installed, too
+TEMPLATE_FILES := \
+ Templates/Makefile.dir \
+ Templates/Makefile.leaf \
+ Templates/Makefile.lib
+
+get: retrieve
+
+all:
+
+$(prefix)/rtems:
+ -$(MKDIR) $(prefix)
+ -$(MKDIR) $(prefix)/rtems
+
+install: install_files $(prefix)/rtems
+
+install_files:: $(GENERIC_FILES) $(MAKEFILES)
+ @test -d $(prefix)/rtems/make || \
+ $(MKDIR) $(prefix)/rtems/make
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make ;\
+ done
+
+install_files:: $(COMPILER_FILES)
+ @test -d $(prefix)/rtems/make/compilers || \
+ $(MKDIR) $(prefix)/rtems/make/compilers
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/compilers; \
+ done
+
+install_files:: $(CUSTOM_FILES)
+ @test -d $(prefix)/rtems/make/custom || \
+ $(MKDIR) $(prefix)/rtems/make/custom
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/custom; \
+ done
+
+install_files:: $(TEMPLATE_FILES)
+ @test -d $(prefix)/rtems/make/Templates || \
+ $(MKDIR) $(prefix)/rtems/make/Templates
+ for f in $^; do \
+ $(INSTALL) -m 644 "$$f" $(prefix)/rtems/make/Templates; \
+ done
diff --git a/make/README b/make/README
new file mode 100644
index 0000000000..6d4b7501b4
--- /dev/null
+++ b/make/README
@@ -0,0 +1,518 @@
+#
+# $Id$
+#
+
+ make/README
+
+ This file describes the layout and conventions of the make tree used in
+ the RTEMS software project and others.
+ All of these "make" trees are substantially similar; however this
+ file documents the current state of the rtems Makefile tree.
+
+ This make tree was developed originally to simplify porting projects
+ between various os's. The primary goals are:
+
+ . 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.
+
+ . Support for different compilers and operating systems
+ on a per-user basis. Using the same sources (including
+ Makefiles) one developer can develop and test under SVR4,
+ another under 4.x, another under HPUX.
+
+ . Builtin support for compiling "variants" such as debug,
+ profile, and tcov versions. These variants can be built
+ recursively.
+
+ . Control of system dependencies. "hidden" dependencies on
+ environment variables (such as PATH)
+ have been removed whenever possible. No matter what your
+ PATH variable is set to, you should get the same thing
+ when you 'make' as everyone else on the project.
+
+ This description attempts to cover all aspects of the Makefile tree. Most
+ of what is described here is maintained automatically by the configuration
+ files.
+
+ The example makefiles in make/Templates should be used as a starting
+ point for new directories.
+
+ There are 2 main types of Makefile:
+
+ directory and leaf.
+
+ Directory Makefiles
+ -------------------
+
+ A Makefile in a source directory with sub-directories is called a
+ "directory" Makefile.
+
+ Directory Makefile's are simply responsible for acting as "middle-men"
+ and recursing into their sub-directories and propagating the make.
+
+ For example, directory src/bin will contain only a Makefile and
+ sub-directories. No actual source code will reside in the directory.
+ The following commands:
+
+ $ cd src/bin
+ $ make all
+
+ would descend into all the subdirectories of 'src/bin' and recursively
+ perform a 'make all'.
+
+ A 'make debug' will recurse thru sub-directories as a debug build.
+
+ A template directory Makefile which should work in almost all
+ cases is in make/Templates/Makefile.dir
+
+
+ Leaf Makefiles
+ --------------
+
+ Source directories that contain source code for libraries or
+ programs use a "leaf" Makefile.
+
+ These makefiles contain the rules necessary to build programs
+ (or libraries).
+
+ A template leaf Makefile is in Templates/Makefile.leaf . A template
+ leaf Makefile for building libraries is in Templates/Makefile.lib .
+
+
+ NOTE: To simplify nested makefile's and source maintenance, we disallow
+ 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.
+
+ Variants (where objects go)
+ ---------------------------
+
+ All binary targets are placed in a sub-directory whose name is (for
+ example):
+
+ o-force386/ -- binaries (no debug, no profile)
+ o-force386-debug/ -- debug binaries
+ o-force386-profile/ -- profiling binaries
+
+ Using the template Makefiles, this will all happen automatically.
+
+ Within a Makefile, the ${ARCH} variable is set to o-force386,
+ o-force386-debug, etc., as appropriate.
+
+ Typing 'make' will place objects in o-force386.
+ 'make debug' will place objects in o-force386-debug.
+ 'make profile' will place objects in o-force386-profile.
+
+ NOTE: For RTEMS work, the word 'force386' is the specified
+ RTEMS_BSP (specified in the modules file)
+
+ 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.
+
+ Targets debug_install and profile_install are equivalent to 'make
+ install' except that debug (or profile) variants are built and
+ installed.
+
+ The targets debug, profile, debug_install, profile_install, 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_install
+
+ When building a command that is linked with a generated library, the
+ appropriate version of the library will be linked in.
+
+ For example, the following fragments link the normal, debug, or
+ profile version of "libmine.a" as appropriate:
+
+ LDLIBS += $(LIBMINE)
+ LIBMINE = ../libmine/${ARCH}/libmine.a
+
+ ${ARCH}/pgm: $(LIBMINE) ${OBJS}
+ $(LINK.c) -o $@ ${OBJS} $(LDLIBS)
+
+ If we do 'gmake debug', then the library in
+ ../libmine/sparc-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
+ cd ../libmine; ${MAKE} ${VARIANT_VA}
+
+ The above would generate the following command to build libmine.a:
+
+ cd ../libmine; gmake debug
+
+ The macro reference ${VARIANT_VA} converts ${ARCH} to the word 'debug'
+ (in this example) and thus ensures the proper version of the library
+ is built.
+
+
+ Targets
+ -------
+
+ All Makefile's support the following targets:
+
+ all -- make "everything"
+ install -- install "everything"
+
+ The following targets are provided automatically by
+ 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
+
+
+ All directory Makefiles automatically propagate all these targets. If
+ you don't wish to support 'all' or 'install' in your source directory,
+ you must leave the rules section empty, as the parent directory Makefile
+ will attempt it on recursive make's.
+
+
+ Configuration
+ -------------
+
+ All the real work described here happens in file(s) included
+ from your Makefile.
+
+ 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:
+
+ /.../make/custom/force386.cfg
+
+ All leaf Makefile's also include either 'make/leaf.cfg' (or
+ 'make/lib.cfg' for building libraries). These config files provide
+ default rules and set up the command macros as appropriate.
+
+ All directory Makefiles include 'make/directory.cfg'. directory.cfg
+ provides all the rules for recursing through sub directories.
+
+ The Makefile templates already perform these include's.
+
+ 'make/leaf.cfg' (or directory.cfg) in turn includes:
+
+ a file specifying general purpose rules appropriate for
+ both leaf and directory makefiles.
+ ( make/main.cfg )
+
+ personality modules specified by the customization file for:
+ compiler ( make/compilers/??.cfg )
+ operating system ( make/os/??.cfg )
+
+
+ private customization files
+ ---------------------------
+
+ [ $(RTEMS_CUSTOM) ]
+
+ Your own private configuration file. Specifies which of the above
+ files you want to include.
+
+ Example: custom/force386.cfg
+
+ CONFIG.$(HOST_ARCH).OS = $(RTEMS_ROOT)/make/os/HPUX-9.0.cfg
+
+ # HOST Compiler config file
+ # You may also want to specify where the compiler resides here.
+ CC_$(HOST_ARCH)_DIR=/usr/local
+ CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+ ## Target compiler config file, if any
+ CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
+ CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-force386.cfg
+
+ generic rules file
+ ------------------
+
+ [ make/main.cfg ]
+ included by leaf.cfg or directory.cfg.
+
+ This file contains some standard rules and variable assignments
+ that all Makefiles need.
+
+ It also includes the FORCEIT: pseudo target.
+
+
+ OS config file for host machine
+ -------------------------------
+
+ [ make/os/OS-NAME.cfg ]
+ included by main.cfg
+
+ Figures out the target architecture and specifies command names
+ for the OS tools including RCS/CVS (but NOT for the compiler tools).
+
+
+ Compiler configuration for the target
+ -------------------------------------
+
+ [ compilers/COMPILER-NAME.cfg ]
+ included by leaf.cfg
+
+ Specifies the names of tools for compiling programs.
+ Names in here should be fully qualified, and NOT depend on $PATH.
+
+ Also specifies compiler flags to be used to generate optimized,
+ debugging and profile versions, as well as rules to compile
+ assembly language and make makefile dependencies.
+
+
+ Configuration Variables
+ -----------------------
+
+ Variables you have to set in the environment or in your Makefile.
+ Note: the rtems module files set RTEMS_ROOT and RTEMS_CUSTOM
+ for you.
+
+ Environment Variables
+ ---------------------
+
+ RTEMS_BSP -- name of your 'bsp' eg: force386
+
+ RTEMS_ROOT -- The root of your source tree.
+ All other file names are derived from this.
+ [ 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_TOOLS
+
+ etc., which are used within the make config files themselves.
+ (The files in make/*.cfg try to avoid use of word RTEMS so
+ they can be more easily shared by other projects)
+
+ Preset variables
+ ----------------
+
+ 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.
+
+ CONFIG.$(HOST_ARCH).OS
+ -- full path of OS config file, set by
+ custom config file.
+
+ CONFIG.$(HOST_ARCH).CC
+ -- full path of C compilation config file, set by custom
+ config file.
+
+ PROJECT_RELEASE
+ -- release/install directory
+ [ $(PROJECT_ROOT) ]
+
+ PROJECT_BIN
+ -- directory for installed binaries
+ [ $(PROJECT_ROOT)/bin ]
+
+ PROJECT_TOOLS
+ -- 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-force386 or o-force386-debug ]
+
+ HOST_ARCH
+ -- host machine architecture name
+ [ eg: sun4, sparc on SVR4 ]
+
+ VARIANTS -- full list of all possible values for $(ARCH);
+ used mainly for 'make clean'
+ [ eg: "o-force386 o-force386-debug o-force386-profile" ]
+
+ VARIANT_VA -- Variant name.
+ Normally "", but for 'make debug' it is "debug",
+ for 'make profile', "profile, etc.
+
+ see make/leaf.cfg for more info.
+
+
+ Preset compilation variables
+ ----------------------------
+
+ This is a list of some of the compilation variables.
+ Refer to the compiler config files for the complete list.
+
+ CFLAGS_OPTIMIZE_V -- value of optimize flag for compiler
+ [ eg: -O ]
+
+ CFLAGS_DEBUG_V -- value of debug flag for compiler
+ [ eg: -g ]
+
+ CFLAGS_PROFILE_V -- compiler profile flags
+ [ eg: -pg ]
+
+ CFLAGS_DEBUG_OPTIMIZE_V
+ -- optimize flag if compiling for debug
+ [ eg: "" ]
+
+ CFLAGS_DEBUG
+ CFLAGS_PROFILE
+ CFLAGS_OPTIMIZE -- current values for each depending
+ on make variant.
+
+ LDFLAGS_STATIC_LIBRARIES_V
+ -- ld option for static libraries
+ -Bstatic or -dy (svr4)
+
+ LDFLAGS_SHARED_LIBRARIES_V
+ -- 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
+ ------------------
+
+ The following variables may be set in a typical Makefile.
+
+ C_PIECES -- File names of your .c files without '.c' suffix.
+ [ eg: C_PIECES=main funcs stuff ]
+
+ CC_PIECES -- ditto, except for .cc files
+
+ S_PIECES -- ditto, except for .S files.
+
+ LIB -- target library name in leaf library makefiles.
+ [ eg: LIB=${ARCH}/libmine.a ]
+
+ H_FILES -- your .h files in this directory.
+ [ eg: H_FILES=stuff.h extra.h ]
+
+ DEFINES -- cc -D items. Included in CPPFLAGS.
+ leaf Makefiles.
+ [ eg: DEFINES += -DUNIX ]
+
+ CPPFLAGS -- -I include directories.
+ 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.
+
+ LDFLAGS -- -L arguments to ld; more may be ADDed.
+
+ LD_LIBS -- libraries to be linked in.
+ [ eg: LDLIBS += ../libfoo/${ARCH}/libfoo.a ]
+
+ XCFLAGS -- "extra" CFLAGS for special needs. Pre-pended
+ to CFLAGS.
+ Not set or used by Makefiles.
+ Can be set on command line to pass extra flags
+ to the compiler.
+
+ XCPPFLAGS -- ditto for CPPFLAGS
+ Can be set on command line to pass extra flags
+ to the preprocessor.
+
+ XCCPPFLAGS -- same as XCPPFLAGS for C++.
+
+ XCCFLAGS -- same as XCFLAGS for C++.
+
+ SUB_DIRS -- list of sub directories for make recursion.
+ directory Makefiles only.
+ [ eg: SUB_DIRS=cpu bsp ]
+
+ CLEAN_ADDITIONS
+ -- list of files or directories that should
+ be deleted by 'make clean'
+ [ eg: CLEAN_ADDITIONS += y.tab.c ]
+
+ See 'leaf.cfg' for the 'clean:' rule and its
+ default deletions.
+
+ CLOBBER_ADDITIONS
+ -- list of files or directories that should
+ be deleted by 'make clobber'
+ Since 'make clobber' includes 'make clean',
+ you don't need to duplicate items in both.
+
+ TARGET_ARCH -- target architecture (eg: o-force386)
+ 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
+
+ ECHO,CAT,RM,CP,MV,LN,MKDIR,CHMOD
+
+ ED,SED
+
+ CC,CPP,AS,AR,LD,NM,SIZE,RANLIB,MKLIB,
+ YACC,LEX,LINT,CTAGS,ETAGS
+
+ Special Directory Makefile Targets
+ ----------------------------------
+
+ all_WRAPUP
+ clean_WRAPUP
+ install_WRAPUP
+ clean_WRAPUP
+ clobber_WRAPUP
+ depend_WRAPUP
+ -- Specify additional commands for recursive
+ (directory level) targets.
+
+ This is handy in certain cases where you need
+ to do bit of work *after* a recursive make.
+
+ make/Templates
+ --------------
+
+ This directory contains Makefile and source file templates that
+ should help in creating or converting makefiles.
+
+ Makefile.leaf
+ Template leaf Makefiles.
+
+ Makefile.lib
+ Template leaf library Makefiles.
+
+ Makefile.dir
+ Template "directory" makefile.
+
+
+
diff --git a/make/Templates/Makefile.dir b/make/Templates/Makefile.dir
new file mode 100644
index 0000000000..36d056bcd8
--- /dev/null
+++ b/make/Templates/Makefile.dir
@@ -0,0 +1,9 @@
+#
+# $Id$
+#
+
+include $(RTEMS_CUSTOM)
+include $(RTEMS_ROOT)/make/directory.cfg
+
+SUB_DIRS=a b c your-directories-go-here
+
diff --git a/make/Templates/Makefile.inc.in b/make/Templates/Makefile.inc.in
new file mode 100644
index 0000000000..edaf5e7dfd
--- /dev/null
+++ b/make/Templates/Makefile.inc.in
@@ -0,0 +1,45 @@
+#
+#
+# Target specific settings. To be included in application Makefiles.
+#
+
+prefix = @prefix@
+
+CC_FOR_TARGET = @program_prefix@gcc
+AS_FOR_TARGET = @program_prefix@as
+AR_FOR_TARGET = @program_prefix@ar
+NM_FOR_TARGET = @program_prefix@nm
+LD_FOR_TARGET = @program_prefix@ld
+SIZE_FOR_TARGET = @program_prefix@size
+OBJCOPY_FOR_TARGET = @program_prefix@objcopy
+
+CC= $(CC_FOR_TARGET)
+AS= $(AS_FOR_TARGET)
+LD= $(LD_FOR_TARGET)
+NM= $(NM_FOR_TARGET)
+AR= $(AR_FOR_TARGET)
+SIZE= $(SIZE_FOR_TARGET)
+OBJCOPY= $(OBJCOPY_FOR_TARGET)
+
+export CC
+export AS
+export LD
+export NM
+export AR
+export SIZE
+export OBJCOPY
+
+RTEMS_HOST = @RTEMS_HOST@
+RTEMS_CUSTOM = $(prefix)/rtems/make/custom/$(RTEMS_BSP).cfg
+PROJECT_ROOT = $(prefix)/rtems/
+RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
+RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
+RTEMS_HAS_KA9Q = @RTEMS_HAS_KA9Q@
+RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
+RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
+RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
+RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
+
+export RTEMS_BSP
+export RTEMS_CUSTOM
+export PROJECT_ROOT
diff --git a/make/Templates/Makefile.leaf b/make/Templates/Makefile.leaf
new file mode 100644
index 0000000000..5bf8e08fe2
--- /dev/null
+++ b/make/Templates/Makefile.leaf
@@ -0,0 +1,70 @@
+#
+# $Id$
+#
+# Templates/Makefile.leaf
+# Template leaf node Makefile
+#
+
+# C source names, if any, go here -- minus the .c
+C_PIECES=xxxd xxxe xxxf
+C_FILES=$(C_PIECES:%=%.c)
+C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
+
+# C++ source names, if any, go here -- minus the .cc
+CC_PIECES=xxxa xxxb xxxc
+CC_FILES=$(CC_PIECES:%=%.cc)
+CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
+
+H_FILES=
+
+# Assembly source names, if any, go here -- minus the .s
+S_PIECES=
+S_FILES=$(S_PIECES:%=%.s)
+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)
+
+PGMS=${ARCH}/xxx-your-program-here ${ARCH}/xxx-another-one
+
+# List of RTEMS managers to be included in the application goes here.
+# Use:
+# MANAGERS=all
+# to include all RTEMS managers in the application.
+MANAGERS=io event message rate_monotonic semaphore timer, etc.
+
+
+include $(RTEMS_CUSTOM)
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+#
+# (OPTIONAL) Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+LD_PATHS += xxx-your-EXTRA-library-paths-go-here, if any
+LD_LIBS += xxx-your-libraries-go-here eg: -lvx
+LDFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS += xxx-your-debris-goes-here
+CLOBBER_ADDITIONS +=
+
+all: ${ARCH} $(SRCS) $(PGMS)
+
+${ARCH}/xxx-your-program-here: ${OBJS} ${LINK_FILES}
+ $(make-exe)
+
+# Install the program(s), appending _g or _p as appropriate.
+# for include files, just use $(INSTALL)
+install: all
+ $(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/bin
diff --git a/make/Templates/Makefile.lib b/make/Templates/Makefile.lib
new file mode 100644
index 0000000000..3c339a7054
--- /dev/null
+++ b/make/Templates/Makefile.lib
@@ -0,0 +1,59 @@
+#
+# $Id$
+#
+# Templates/Makefile.lib
+# Template library Makefile
+#
+
+LIBNAME=libfoo.a # xxx- your library names goes here
+LIB=${ARCH}/${LIBNAME}
+
+# C and C++ source names, if any, go here -- minus the .c or .cc
+C_PIECES=xxxd xxxe xxxf
+C_FILES=$(C_PIECES:%=%.c)
+C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
+
+CC_PIECES=xxxa xxxb xxxc
+CC_FILES=$(CC_PIECES:%=%.cc)
+CC_O_FILES=$(CC_PIECES:%=${ARCH}/%.o)
+
+H_FILES=
+
+# Assembly source names, if any, go here -- minus the .s
+S_PIECES=
+S_FILES=$(S_PIECES:%=%.s)
+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_CUSTOM)
+include $(RTEMS_ROOT)/make/lib.cfg
+
+#
+# Add local stuff here using +=
+#
+
+DEFINES +=
+CPPFLAGS +=
+CFLAGS +=
+
+#
+# Add your list of files to delete here. The config files
+# already know how to delete some stuff, so you may want
+# to just run 'make clean' first to see what gets missed.
+# 'make clobber' already includes 'make clean'
+#
+
+CLEAN_ADDITIONS += xxx-your-debris-goes-here
+CLOBBER_ADDITIONS +=
+
+all: ${ARCH} $(SRCS) $(LIB)
+
+$(LIB): ${OBJS}
+ $(make-library)
+
+# Install the library, appending _g or _p as appropriate.
+# for include files, just use $(INSTALL)
+install: all
+ $(INSTALL_VARIANT) -m 644 ${LIB} ${PROJECT_RELEASE}/lib
diff --git a/make/compilers/gcc-no_bsp.cfg b/make/compilers/gcc-no_bsp.cfg
new file mode 100644
index 0000000000..b34869e045
--- /dev/null
+++ b/make/compilers/gcc-no_bsp.cfg
@@ -0,0 +1,299 @@
+#
+# $Id$
+#
+# gcc 2.6.x compiler for a "native" nocpu/nobsp system
+# Compiler (and tools) configuration
+#
+
+# Prefix on the installed GNU tools
+# Just use the native tools
+GNU_TOOLS_PREFIX=
+
+# Additional target names (other than debug, profile)
+TARGET_VARIANTS +=
+
+#
+# Pre-processor defines using the target options header file.
+#
+# Local tailoring (on the command line) can be done by setting XCFLAGS
+# or XCPPFLAGS -- neither of which are never set in the Makefile's
+#
+
+CPPFLAGS=$(CFLAGS) $(XCPPFLAGS) $(DEFINES)
+
+CPLUS_CPPFLAGS=$(CFLAGS) $(XCPPFLAGS) $(DEFINES)
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# NO_TABLE_MOVE (SPARC PORT)
+# do not have a second trap table -- use the BSP's
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ echo "/* #define NDEBUG 1 */ " >>$@
+ echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+#
+# Local tailoring (on the command line) can be done by setting XCFLAGS
+# which is never set in the Makefile's
+#
+
+#
+# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
+# would want the corresponding macros to be set to.
+#
+# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
+# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
+#
+
+# default flags
+
+#
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS =
+
+CFLAGS_DEFAULT = $(CPU_CFLAGS) -Wall -ansi -fasm
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# debug flag; typically -g
+CFLAGS_DEBUG_V=-g
+
+# 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
+
+# default is to optimize
+CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+
+# dynamic libraries
+CFLAGS_DYNAMIC_V=-fpic
+ASFLAGS_DYNAMIC_V=
+
+CFLAGS=$(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) \
+ $(CFLAGS_DEFAULT) \
+ -I $(PROJECT_INCLUDE)
+
+# List of library paths without -L
+LD_PATHS= $(PROJECT_RELEASE)/lib
+
+# libraries you want EVERYONE to link with
+LD_LIBS=
+
+# ld flag to ensure pure-text
+LDFLAGS_MUST_BE_PURE_V =
+
+# ld flag for [un]shared objects
+LDFLAGS_STATIC_LIBRARIES_V =
+LDFLAGS_SHARED_LIBRARIES_V =
+
+# ld flag for incomplete link
+LDFLAGS_INCOMPLETE = -r
+
+# Special linker options when building lib.so
+LDFLAGS_DYNAMIC_V = ??
+
+# Some dynamic linking systems want the preferred name recorded in the binary
+# ref: src/libxil/Makefile
+LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
+
+# ld flags for profiling, debugging
+LDFLAGS_PROFILE_V =
+LDFLAGS_DEBUG_V =
+
+LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
+
+#
+# Stuff to clean and clobber for the compiler and its tools
+#
+
+CLEAN_CC = a.out *.o *.BAK
+CLOBBER_CC =
+
+#
+# Client compiler and support tools
+#
+
+CC=gcc
+CXX=$(CC)
+CCC=$(CXX)
+
+# CPP command to write file to standard output
+CPP=$(CC) -E
+
+# flags set by cc when running cpp
+CPP_CC_FLAGS=-D__STDC__
+
+AS=as
+ASPP=ERROR_NO_ASPP
+
+ASFLAGS=
+ASM4FLAGS := -I $(PROJECT_INCLUDE)
+
+
+# NOTE: should never use full path .. but there is no guarantee ld, etc
+# will be in the same directory as gcc.. so hope they are in the path
+# Don't do this on a real target!!!
+LD=ld
+NM=nm
+AR=ar
+# egrep regexp to ignore symbol table entries in ar archives.
+# Only used to make sure we skip them when coalescing libraries.
+# skip __.SYMDEF and empty names (maybe bug in ranlib??).
+AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
+ARFLAGS=ruv
+
+# NOTE: see comment on ld, nm, ar
+SIZE=size
+
+#
+# Command to convert a normal archive to one searchable by $(LD)
+# Not needed on SVR4
+#
+
+MKLIB=echo library is complete:
+
+#
+# How to compile stuff into ${ARCH} subdirectory
+#
+# NOTE: we override COMPILE.c
+#
+
+COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(XCFLAGS) -c
+
+${ARCH}/%.o: %.c
+ ${COMPILE.c} -o $@ $<
+
+${ARCH}/%.o: %.cc
+ ${COMPILE.c} -o $@ $<
+
+${ARCH}/%.o: %.S
+ ${COMPILE.c} -DASM -o $@ $<
+
+${ARCH}/%.o: %.s
+ $(CPP) $(CPPFLAGS) - <$*.s >$(ARCH)/$*.i
+ $(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
+# $(RM) $(ARCH)/$*.i
+
+# Specify our own default rule for this to prevent having CFLAGS and
+# CPPFLAGS being passed to linker
+${ARCH}/%: ${ARCH}/%.o
+ ${CC} ${LDFLAGS} -o $@ $@.o ${LD_LIBS}
+
+# Make foo.rel from foo.o
+${ARCH}/%.rel: ${ARCH}/%.o
+ ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+
+# create $(ARCH)/pgm from pgm.sh
+${ARCH}/%: %.sh
+ $(RM) $@
+ $(CP) $< $@
+ $(CHMOD) +x $@
+
+# Dependency files for use by gmake
+# NOTE: we don't put in $(TARGET_ARCH)
+# so that 'make clean' doesn't blow it away
+
+DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+
+CLEAN_DEPEND=$(DEPEND).tmp
+CLOBBER_DEPEND=$(DEPEND)
+
+# We deliberately don't have anything depend on the
+# $(DEPEND) file; otherwise it will get rebuilt even
+# on 'make clean'
+#
+
+depend: $(C_FILES) $(CC_FILES) $(S_FILES)
+ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
+# Use gcc -M to generate dependencies
+# 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 $^ | \
+ $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
+ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
+ $(MV) $(DEPEND).tmp $(DEPEND)
+endif
+
+
+# List (possibly empty) of required managers
+# We require:
+# region -- used by lib/libcsupport for malloc()
+# ext -- used by libc for libc reentrancy hooks
+
+MANAGERS_REQUIRED=region ext sem
+
+# Create a RTEMS executable based on MANAGERS which was set in
+# app's Makefile
+
+MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))
+MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))
+
+# spell out all the LINK_FILE's, rather than using -lbsp, so
+# that $(LINK_FILES) can be a dependency
+
+# Start file must be one of
+# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
+# It defaults to start.o, but an app can override it.
+
+# Note: Normally RTEMS provides a start file...
+START_FILE=
+
+CONSTRUCTOR=
+
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+
+LINK_FILES= $(START_FILE) \
+ $(CONSTRUCTOR) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(LD_LIBS) \
+ $(LIBC_EXTRA_LIBS) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
+ $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
+ $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
+
+# Here is the rule to actually build a $(ARCH)/foo.exe
+# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
+# Usage ref: src/tests/sptest/sp1/Makefile
+
+# On Solaris at least you need to had /usr/ucblib/libucb.a
+
+define make-exe
+ $(CC) -o $(basename $@).exe $(LINK_FILES) -lc -lm
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+
+define make-rel
+ $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+endef
diff --git a/make/compilers/gcc-portsw.cfg b/make/compilers/gcc-portsw.cfg
new file mode 100644
index 0000000000..89be269701
--- /dev/null
+++ b/make/compilers/gcc-portsw.cfg
@@ -0,0 +1,309 @@
+#
+# gcc-no_bsp.cfg,v 1.13 1995/12/19 19:59:57 joel Exp
+#
+# This is for the amd29k portsw board.
+#
+# THIS IS NOT A GNU TOOLS BASED PORT!!!
+#
+
+# Prefix on the installed GNU tools
+# Just use the native tools
+GNU_TOOLS_PREFIX=
+
+# Additional target names (other than debug, profile)
+TARGET_VARIANTS +=
+
+#
+# Pre-processor defines.
+# Local tailoring (on the command line) can be done by setting XCPPFLAGS
+# which is never set in the Makefile's
+#
+# Possible defines include:
+# -DRTEMS_LIBC using libc bundled with RTEMS
+# -DRTEMS_NEWLIB using CYGNUS libc
+# -DMALLOC_PROVIDED must be used for newlib reent struct
+
+DEFINES:= $(LIBC_DEFINES)
+
+GCC_INCLUDE=.
+
+# Note: normally we do not want the standard include files
+# Also we usually include a "libc_include" directory
+CPPFLAGS=$(XCPPFLAGS) $(DEFINES) \
+ -I$(RTEMS_LIBC_DIR)/include \
+ -I$(PROJECT_INCLUDE) \
+ -I/opt/29k/src/inc
+
+#
+# Local tailoring (on the command line) can be done by setting XCFLAGS
+# which is never set in the Makefile's
+#
+
+#
+# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
+# would want the corresponding macros to be set to.
+#
+# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
+# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
+#
+
+# default flags
+
+CFLAGS_DEFAULT = -NB -bwc -nocrt0 -Ml -m -g -Hansi -Hon=Pointers_compatible -Hon=Pointers_compatible_with_ints -Dinline= -D___AM29K__ -Hnocopyr
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+# -Os to optimize for size
+CFLAGS_OPTIMIZE_V=-Os
+
+# debug flag; typically -g
+CFLAGS_DEBUG_V=-g -O0 -DRTEMS_DEBUG -DSTACK_CHECKER_ON -DSTACK_CHECKER_REPORT_USAGE
+
+# 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=
+
+# default is to optimize
+CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+
+# dynamic libraries
+CFLAGS_DYNAMIC_V=-fpic
+ASFLAGS_DYNAMIC_V=
+
+CFLAGS=$(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE) \
+ $(CFLAGS_DEFAULT)
+
+# List of library paths without -L
+LD_PATHS= $(PROJECT_RELEASE)/lib
+
+# libraries you want EVERYONE to link with
+LD_LIBS=
+
+# ld flag to ensure pure-text
+LDFLAGS_MUST_BE_PURE_V =
+
+# ld flag for [un]shared objects
+LDFLAGS_STATIC_LIBRARIES_V =
+LDFLAGS_SHARED_LIBRARIES_V =
+
+# ld flag for incomplete link
+LDFLAGS_INCOMPLETE = -i
+
+# Special linker options when building lib.so
+LDFLAGS_DYNAMIC_V = ??
+
+# Some dynamic linking systems want the preferred name recorded in the binary
+# ref: src/libxil/Makefile
+LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
+
+# ld flags for profiling, debugging
+LDFLAGS_PROFILE_V =
+LDFLAGS_DEBUG_V =
+
+LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
+
+#
+# Stuff to clean and clobber for the compiler and its tools
+#
+
+CLEAN_CC = a.out *.o *.BAK
+CLOBBER_CC =
+
+#
+# Client compiler and support tools
+#
+
+CC=/opt/29k/bin/hc29
+CXX=$(CC)
+CCC=$(CXX)
+
+# CPP command to write file to standard output
+CPP=$(CC) -E
+
+# flags set by cc when running cpp
+CPP_CC_FLAGS=-D__STDC__
+
+AS=/opt/29k/bin/as29
+ASPP=ERROR_NO_ASPP
+
+ASFLAGS=-l -fcgimosx
+ASM4FLAGS := -I $(PROJECT_INCLUDE)
+
+
+# NOTE: should never use full path .. but there is no guarantee ld, etc
+# will be in the same directory as gcc.. so hope they are in the path
+# Don't do this on a real target!!!
+LD=/opt/29k/bin/ld29
+NM=/opt/29k/bin/nm29
+AR=echo making library
+# egrep regexp to ignore symbol table entries in ar archives.
+# Only used to make sure we skip them when coalescing libraries.
+# skip __.SYMDEF and empty names (maybe bug in ranlib??).
+AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
+ARFLAGS=ruv
+
+# NOTE: see comment on ld, nm, ar
+SIZE=size
+
+#
+# Command to convert a normal archive to one searchable by $(LD)
+# Not needed on SVR4
+#
+
+MKLIB=/opt/29k/bin/lib29
+
+#
+# How to compile stuff into ${ARCH} subdirectory
+#
+# NOTE: we override COMPILE.c
+#
+
+COMPILE.c=$(CC) -c $(CFLAGS) $(CPPFLAGS) $(XCFLAGS)
+
+${ARCH}/%.o: %.c
+ ${COMPILE.c} -o $@ $<
+ $(CHMOD) -f g+w $@
+
+${ARCH}/%.o: %.cc
+ ${COMPILE.c} -o $@ $<
+ $(CHMOD) -f g+w $@
+
+${ARCH}/%.o: %.s
+ ${COMPILE.c} -DASM -o $@ $<
+ $(CHMOD) -f g+w $@
+
+${ARCH}/%.o: %.S
+ $(CP) $*.s $(ARCH)/$*.c
+ $(CPP) $(CPPFLAGS) $(ARCH)/$*.c > $(ARCH)/$*.s
+ ${COMPILE.c} -o $@ $(ARCH)/$*.s
+ $(CHMOD) -f g+w $@
+ $(RM) $(ARCH)/$*.c
+
+# Specify our own default rule for this to prevent having CFLAGS and
+# CPPFLAGS being passed to linker
+${ARCH}/%: ${ARCH}/%.o
+ ${CC} ${LDFLAGS} -o $@ $@.o ${LD_LIBS}
+ $(CHMOD) -f g+w $@
+
+# Make foo.rel from foo.o
+${ARCH}/%.rel: ${ARCH}/%.o
+ ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+ $(CHMOD) -f g+w $@
+
+# create $(ARCH)/pgm from pgm.sh
+${ARCH}/%: %.sh
+ $(RM) $@
+ $(CP) $< $@
+ $(CHMOD) +x $@
+ $(CHMOD) -f g+w $@
+
+# Dependency files for use by gmake
+# NOTE: we don't put in $(TARGET_ARCH)
+# so that 'make clean' doesn't blow it away
+
+DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+
+CLEAN_DEPEND=$(DEPEND).tmp
+CLOBBER_DEPEND=$(DEPEND)
+
+# We deliberately don't have anything depend on the
+# $(DEPEND) file; otherwise it will get rebuilt even
+# on 'make clean'
+#
+
+depend: $(C_FILES) $(CC_FILES) $(S_FILES)
+ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
+# Use gcc -M to generate dependencies
+# Replace foo.o with $(ARCH)/foo.o
+# Replace $(ARCH) value with string $(ARCH)
+# so that it will for debug and profile cases
+ $(COMPILE.c) -Hmake $^ | \
+ $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
+ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
+
+ $(MV) $(DEPEND).tmp $(DEPEND)
+ $(CHMOD) -f g+w $(DEPEND)
+endif
+
+# List (possibly empty) of required managers
+# We require:
+# region -- used by lib/libcsupport for malloc()
+# ext -- used by libc for libc reentrancy hooks
+
+MANAGERS_REQUIRED=region ext sem
+
+# Create a RTEMS executable based on MANAGERS which was set in
+# app's Makefile
+
+MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))
+MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))
+
+# spell out all the LINK_FILE's, rather than using -lbsp, so
+# that $(LINK_FILES) can be a dependency
+
+# Start file must be one of
+# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
+# It defaults to start.o, but an app can override it.
+
+# Note: Normally RTEMS provides a start file...
+START_FILE= $(PROJECT_RELEASE)/lib/crt0$(LIB_VARIANT).o $(PROJECT_RELEASE)/lib/register$(LIB_VARIANT).o
+
+LIBC_LOW= $(PROJECT_RELEASE)/lib/libcsupport$(LIBSUFFIX_VA)
+
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+
+LIBOSBOOT=/home/src/amd29k/sps2000/netrom.o
+
+LINK_FILES= \
+ $(START_FILE) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(PROJECT_RELEASE)/lib/libbsp$(LIBSUFFIX_VA) \
+ $(LD_LIBS) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA) \
+ $(PROJECT_RELEASE)/lib/librtems$(LIBSUFFIX_VA) \
+ $(LIBC_LOW) \
+ $(PROJECT_RELEASE)/lib/libmisc$(LIBSUFFIX_VA) \
+ $(LIBC_LIBC) \
+ $(LIBC_EXTRALIBS) \
+ $(LIBC_LIBM)
+# /home/craigl/osbdbg.o
+
+# Here is the rule to actually build a $(ARCH)/foo.exe
+# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
+# Usage ref: src/tests/sptest/sp1/Makefile
+
+define make-exe
+ if [ $(NO_ROM) ]; then echo "\n\nskipping ROM compile\n"; else \
+ $(CC) -nocrt0 -cmd$(PROJECT_RELEASE)/lib/romlink -u _times -u _gettimeofday \
+ -u _sleep -o $(basename $@).out $(LIBOSBOOT) $(LINK_FILES); \
+ romcoff -r -t -l -b $(basename $@).out raminit.o; \
+ rm $(basename $@).out; \
+ $(CC) -m -u _times -u _gettimeofday -u _sleep -o $(basename $@).romcof $(LIBOSBOOT) \
+ $(LINK_FILES) raminit.o -nocrt0 -cmd$(PROJECT_RELEASE)/lib/romlink > $(basename $@).rommap ; \
+ rm raminit.o ; \
+ $(CHMOD) -f g+w $(basename $@).romcof; \
+ /opt/green/coff2sr -noS5 $(basename $@).romcof -o $(basename $@).srec; \
+ $(CHMOD) -f g+w $(basename $@).srec; \
+ fi
+ if [ $(CREATE_MAP) ]; then \
+ $(CC) -m -u _times -u _gettimeofday -u _sleep -o $(basename $@).exe $(LINK_FILES) -nocrt0 -cmd$(PROJECT_RELEASE)/lib/ramlink > $(basename $@).rammap; \
+ else \
+ rm $(basename $@).rommap > /dev/null 2> /dev/null ; \
+ $(CC) -u _times -u _gettimeofday -u _sleep -o $(basename $@).exe $(LINK_FILES) -nocrt0 -cmd$(PROJECT_RELEASE)/lib/ramlink; \
+ fi
+ $(CHMOD) -f g+w $(basename $@).exe
+# $(CC) -o $(basename $@).exe $(LINK_FILES) -nocrt0 -cmd/opt/29k/lib/link030.cmd
+ $(NM) -g $(basename $@).exe > $(basename $@).num
+ $(CHMOD) -f g+w $(basename $@).num
+# $(SIZE) $(basename $@).exe
+endef
+
+define make-rel
+ $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+ $(CHMOD) -f g+w $@
+endef
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
new file mode 100644
index 0000000000..32f40c5e96
--- /dev/null
+++ b/make/compilers/gcc-target-default.cfg
@@ -0,0 +1,285 @@
+#
+#
+
+CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
+
+CPLUS_CPPFLAGS=$(CFLAGS) $(XCPPFLAGS)
+
+##
+# CFLAGS_OPTIMIZE_V, CFLAGS_DEBUG_V, CFLAGS_PROFILE_V are the values we
+# would want the corresponding macros to be set to.
+#
+# CFLAGS_OPTIMIZE, CFLAGS_DEBUG, CFLAGS_PROFILE are set in the leaf
+# Makefiles by the 'debug:' and 'profile:' targets to their _V values.
+#
+
+# default flags
+
+# We only include the header files for KA9Q if it is enabled.
+INCLUDE_KA9Q_yes_V = -I$(PROJECT_INCLUDE)/ka9q
+INCLUDE_KA9Q = $(INCLUDE_KA9Q_$(HAS_KA9Q)_V)
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# Ask gcc where it finds its own include files
+GCC_INCLUDE=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=include)
+
+CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
+ -nostdinc -I$(PROJECT_INCLUDE) \
+ $(INCLUDE_KA9Q) \
+ -I$(RTEMS_LIBC_DIR)/include -I$(GCC_INCLUDE) $(DEFINES)
+
+ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g \
+ -nostdinc -I$(PROJECT_INCLUDE) \
+ -I$(RTEMS_LIBC_DIR)/include -I$(GCC_INCLUDE) $(DEFINES)
+
+# default location of Standard C Library
+ifndef LIBC_LIBC
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/libc.a
+endif
+
+ifndef LIBC_LIBM
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/libm.a
+endif
+
+else
+CFLAGS_DEFAULT = $(CPU_DEFINES) $(CPU_CFLAGS) -Wall -ansi -fasm -g \
+ -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems \
+ $(INCLUDE_KA9Q) $(DEFINES)
+
+ASMFLAGS=$(CPU_DEFINES) $(CPU_CFLAGS) -g -I$(srcdir) \
+ -B$(PROJECT_RELEASE)/lib/ -specs bsp_specs -qrtems $(DEFINES)
+
+# default location of Standard C Library
+ifndef LIBC_LIBC
+LIBC_LIBC=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libc.a)
+endif
+
+ifndef LIBC_LIBM
+LIBC_LIBM=$(shell $(CC) $(CPU_CFLAGS) -print-file-name=libm.a)
+endif
+endif
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+HAS_CPLUSPLUS=yes
+CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
+else
+HAS_CPLUSPLUS=no
+endif
+
+# 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
+
+# default is to optimize
+CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)
+
+# dynamic libraries
+CFLAGS_DYNAMIC_V=-fpic
+#ASFLAGS_DYNAMIC_V=
+
+CFLAGS=$(CFLAGS_DEFAULT) $(CFLAGS_OPTIMIZE) $(CFLAGS_DEBUG) $(CFLAGS_PROFILE)
+
+# List of library paths without -L
+LD_PATHS= $(PROJECT_RELEASE)/lib
+
+# libraries you want EVERYONE to link with
+#LD_LIBS=
+
+# ld flag to ensure pure-text
+#LDFLAGS_MUST_BE_PURE_V =
+
+# ld flag for [un]shared objects
+#LDFLAGS_STATIC_LIBRARIES_V =
+#LDFLAGS_SHARED_LIBRARIES_V =
+
+# ld flag for incomplete link
+LDFLAGS_INCOMPLETE = -r
+
+# Special linker options when building lib.so
+LDFLAGS_DYNAMIC_V = ??
+
+# Some dynamic linking systems want the preferred name recorded in the binary
+# ref: src/libxil/Makefile
+LDFLAGS_DYNAMIC_LIBNAME_V = -h $(DYNAMIC_VERSION_LIBNAME)
+
+# ld flags for profiling, debugging
+LDFLAGS_PROFILE_V =
+LDFLAGS_DEBUG_V =
+
+LDFLAGS=$(LDFLAGS_PROFILE) $(LDFLAGS_DEBUG) $(LD_PATHS:%=-L %)
+
+#
+# Stuff to clean and clobber for the compiler and its tools
+#
+
+CLEAN_CC = a.out *.o *.BAK
+CLOBBER_CC =
+
+#
+# Client compiler and support tools
+#
+
+# CPP command to write file to standard output
+CPP=$(CC) -E
+
+# flags set by cc when running cpp
+CPP_CC_FLAGS=-D__STDC__
+
+ASFLAGS=
+ASM4FLAGS := -I $(PROJECT_INCLUDE)
+
+# egrep regexp to ignore symbol table entries in ar archives.
+# Only used to make sure we skip them when coalescing libraries.
+# skip __.SYMDEF and empty names (maybe bug in ranlib??).
+AR_SYMBOL_TABLE="HIGHLY-UNLIKELY-TO-CONFLICT"
+ARFLAGS=ruv
+
+#
+# Command to convert a normal archive to one searchable by $(LD)
+# Not needed on SVR4
+#
+
+MKLIB=echo library is complete:
+
+#
+# How to compile stuff into ${ARCH} subdirectory
+#
+# NOTE: we override COMPILE.c
+#
+# NOTE: Remove -pipe if it causes you problems. Using it can decrease
+# compile time.
+#
+
+COMPILE.c=$(CC) $(CFLAGS) $(XCFLAGS) -c
+
+${ARCH}/%.o: %.c
+ ${COMPILE.c} -pipe -o $@ $<
+
+${ARCH}/%.o: %.cc
+ ${COMPILE.c} -pipe -o $@ $<
+
+${ARCH}/%.o: %.S
+ ${COMPILE.c} -pipe -DASM -o $@ $<
+
+# strip out C++ style comments.
+${ARCH}/%.o: %.s
+ sed -e 's/\/\/.*$$//' < $< | \
+ $(CPP) $(ASMFLAGS) -I. -I$(srcdir) -DASM - >$(ARCH)/$*.i
+ $(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
+
+# $(CPP) $(CPPFLAGS) -DASM - < $< >$(ARCH)/$*.i
+# $(AS) $(ASFLAGS) -o $@ $(ARCH)/$*.i
+# $(RM) $(ARCH)/$*.i
+
+# Specify our own default rule for this to prevent having CFLAGS and
+# CPPFLAGS being passed to linker
+${ARCH}/%: ${ARCH}/%.o
+ ${CC} ${LDFLAGS} -o $@ $@.o ${LD_LIBS}
+
+# Make foo.rel from foo.o
+${ARCH}/%.rel: ${ARCH}/%.o
+ ${LD} $(LDFLAGS_INCOMPLETE) -o $@ $^
+
+# create $(ARCH)/pgm from pgm.sh
+${ARCH}/%: %.sh
+ $(RM) $@
+ $(CP) $< $@
+ $(CHMOD) +x $@
+
+# Dependency files for use by gmake
+# NOTE: we don't put in $(TARGET_ARCH)
+# so that 'make clean' doesn't blow it away
+
+DEPEND=Depends-$(TARGET_ARCH:o-%=%)
+
+CLEAN_DEPEND=$(DEPEND).tmp
+CLOBBER_DEPEND=$(DEPEND)
+
+# We deliberately don't have anything depend on the
+# $(DEPEND) file; otherwise it will get rebuilt even
+# on 'make clean'
+#
+
+depend: $(C_FILES) $(CC_FILES) $(S_FILES)
+ifneq ($(words $(C_FILES) $(CC_FILES) $(S_FILES)), 0)
+# Use gcc -M to generate dependencies
+# 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 $^ | \
+ $(SED) -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
+ -e 's?$(ARCH)/?$$(ARCH)/?' >$(DEPEND).tmp
+ $(MV) $(DEPEND).tmp $(DEPEND)
+endif
+
+
+# List (possibly empty) of required managers
+# We require:
+# region -- used by lib/libcsupport for malloc()
+# ext -- used by libc for libc reentrancy hooks
+
+MANAGERS_REQUIRED=region ext sem
+
+# Create a RTEMS executable based on MANAGERS which was set in
+# app's Makefile
+
+MANAGERS_NOT_WANTED=$(filter-out $(MANAGERS), $(MANAGER_LIST))
+MANAGERS_NOT_WANTED:=$(filter-out $(MANAGERS_REQUIRED), $(MANAGERS_NOT_WANTED))
+
+# spell out all the LINK_FILE's, rather than using -lbsp, so
+# that $(LINK_FILES) can be a dependency
+
+# Start file must be one of
+# $(PROJECT_RELEASE)/lib/start$(LIB_VARIANT).o
+# $(PROJECT_RELEASE)/lib/asmiface$(LIB_VARIANT).o
+# It defaults to start.o, but an app can override it.
+
+ifeq ($(START_BASE),)
+ START_FILE=
+else
+ START_FILE=$(PROJECT_RELEASE)/lib/$(START_BASE)$(LIB_VARIANT).o
+endif
+
+CONSTRUCTOR=
+
+LIBC_LOW=
+
+LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
+
+LINK_OBJS=\
+ $(CONSTRUCTOR) \
+ $(OBJS) \
+ $(MANAGERS_NOT_WANTED:%=$(PROJECT_RELEASE)/lib/no-%$(LIB_VARIANT).rel) \
+ $(LD_LIBS) \
+ $(PROJECT_RELEASE)/lib/libtest$(LIBSUFFIX_VA)
+
+LINK_LIBS=\
+ $(LD_LIBS) \
+ $(LIBC_EXTRA_LIBS) \
+ $(PROJECT_RELEASE)/lib/librtemsall$(LIBSUFFIX_VA) \
+ $(LIBC_LIBM) $(LIBC_LIBC) $(LIBGCC)
+
+LINK_FILES=\
+ $(START_FILE) \
+ $(LINK_OBJS) \
+ $(LINK_LIBS)
+
+#
+# Allow user to override link commands (to build a prom image, perhaps)
+#
+ifndef LINKCMDS
+LINKCMDS=$(PROJECT_RELEASE)/lib/linkcmds
+endif
+
+
+define make-rel
+ $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+endef
diff --git a/make/custom/HPUX9-posix.cfg b/make/custom/HPUX9-posix.cfg
new file mode 100644
index 0000000000..9331e13185
--- /dev/null
+++ b/make/custom/HPUX9-posix.cfg
@@ -0,0 +1,62 @@
+#
+# Config file for HPUX running the posix bsp
+#
+# $Id$
+#
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-$(RTEMS_BSP)
+
+include $(RTEMS_ROOT)/make/main.cfg
+
+RTEMS_CPU=unix
+RTEMS_CPU_FAMILY=hppa1_1
+RTEMS_CPU_MODEL=hppa7200
+RTEMS_UNIX_FLAVOR=hpux
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=posix
+
+# use the macros instead of the inline functions
+# The macros work better when mixed with other compilers.
+INLINE=macros
+INLINE_UPCASE=MACRO
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CC_$(TARGET_ARCH)_DIR=$(CC_$(HOST_ARCH)_DIR)
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-hpux9.cfg
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=yes
+
+# The following define the memory reserved in the executable for the
+# RTEMS Workspace and the C Program Heap.
+# NOTE: some of the timing tests need > 1M workspace
+LIBC_DEFINES += -DWORKSPACE_MB=2
+LIBC_DEFINES += -DHEAPSPACE_MB=1
+
+# Uncomment the following line if want stack checking should be enabled
+#LIBC_DEFINES += -DSTACK_CHECKER_ON
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+HAS_CPLUSPLUS=yes
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This target does NOT support the POSIX API.
+HAS_POSIX_API=no
+
+# Miscellaneous additions go here
diff --git a/make/custom/Linux-posix.cfg b/make/custom/Linux-posix.cfg
new file mode 100644
index 0000000000..c339d4e670
--- /dev/null
+++ b/make/custom/Linux-posix.cfg
@@ -0,0 +1,76 @@
+#
+# Config file for the Linux 1.x based RTEMS UNIX
+#
+# $Id$
+#
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-linux1
+
+include $(RTEMS_ROOT)/make/main.cfg
+
+RTEMS_CPU=unix
+RTEMS_CPU_FAMILY=i386
+RTEMS_CPU_MODEL=i486dx
+RTEMS_UNIX_FLAVOR=linux
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=posix
+
+# use the inline functions instead of the macros
+# ref: src/exec/generic/Makefile
+# Need INLINE_UPCASE set to uppercase value of INLINE variable
+# ref: make/compilers/gcc-force386.cfg
+ifeq ($(RTEMS_USE_MACROS),yes)
+INLINE=macros
+INLINE_UPCASE=
+else
+INLINE=inline
+INLINE_UPCASE=INLINE
+endif
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CC_$(TARGET_ARCH)_DIR=$(CC_$(HOST_ARCH)_DIR)
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-linux1.cfg
+
+# DO NOT Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file) DOES NOT MATTER
+LIBC_DEFINES=-DRTEMS_UNIXLIB -DRTEMS_UNIX -DMALLOC_PROVIDED -DRTEMS_DEBUG
+LIBC_INCLUDE=/usr/include
+LIBC_LIBC=-lc
+LIBC_LIBM=-lm
+LIBC_EXTRA_LIBS=
+
+# The following define the memory reserved in the executable for the
+# RTEMS Workspace and the C Program Heap.
+LIBC_DEFINES += -DWORKSPACE_MB=2
+LIBC_DEFINES += -DHEAPSPACE_MB=1
+
+# Define this to yes if C++ is included in the development environment
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+HAS_CPLUSPLUS=yes
+LIBCC_INCLUDE=/usr/include/g++
+CPLUS_LD_LIBS=-lstdc++
+CPLUS_LD_LIBS += $(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
+else
+HAS_CPLUSPLUS=no
+endif
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This target does NOT support the POSIX API.
+HAS_POSIX_API=no
+
+# Miscellaneous additions go here
diff --git a/make/custom/Solaris-posix.cfg b/make/custom/Solaris-posix.cfg
new file mode 100644
index 0000000000..af8d0c1cfe
--- /dev/null
+++ b/make/custom/Solaris-posix.cfg
@@ -0,0 +1,60 @@
+#
+# Config file for the Solaris based RTEMS UNIX
+#
+# $Id$
+#
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-$(RTEMS_BSP)
+
+include $(RTEMS_ROOT)/make/main.cfg
+
+RTEMS_CPU=unix
+RTEMS_CPU_FAMILY=sparc
+RTEMS_CPU_MODEL=sparc_v8
+RTEMS_UNIX_FLAVOR=solaris
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=posix
+
+# use the inline functions instead of the macros
+# ref: src/exec/generic/Makefile
+# Need INLINE_UPCASE set to uppercase value of INLINE variable
+# ref: make/compilers/gcc-force386.cfg
+ifeq (${RTEMS_USE_MACROS},yes)
+INLINE=macros
+INLINE_UPCASE=
+else
+INLINE=inline
+INLINE_UPCASE=INLINE
+endif
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CC_$(TARGET_ARCH)_DIR=$(CC_$(HOST_ARCH)_DIR)
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-solaris2.cfg
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=yes
+
+# Define this to yes if C++ is included in the development environment
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+HAS_CPLUSPLUS=no
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This target does NOT support the POSIX API.
+HAS_POSIX_API=no
+
+# Miscellaneous additions go here
diff --git a/make/custom/cvme961.cfg b/make/custom/cvme961.cfg
new file mode 100644
index 0000000000..bcf2d1e38c
--- /dev/null
+++ b/make/custom/cvme961.cfg
@@ -0,0 +1,87 @@
+#
+# Config file for the Cyclone i960ca CVME961 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=i960
+RTEMS_CPU_MODEL=i960ca
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=cvme961
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS = -mca
+
+# -pipe does not work in our local configuration of FSF GCC 2.6.0
+# configured on top of Intel Release 2.4. We did this to replace
+# the GCC 2.4.5 shipped with Intel Release 2.4.
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -mleaf-procedures
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# NO_TABLE_MOVE (SPARC PORT)
+# do not have a second trap table -- use the BSP's
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+define make-exe
+ $(LD) -u _sbrk $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/default.cfg b/make/custom/default.cfg
new file mode 100644
index 0000000000..f73241ceb9
--- /dev/null
+++ b/make/custom/default.cfg
@@ -0,0 +1,73 @@
+# Default target settings
+#
+# Some of these values are redefined in the target specific .cfg files.
+#
+# Created by Jiri Gaisler, 16-03-97 (who is owed a debt of gratitude
+# for converting RTEMS to autoconf. Thanks. --joel)
+#
+# $Id$
+#
+
+include $(PROJECT_ROOT)/make/target.cfg
+include $(PROJECT_ROOT)/make/host.cfg
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-$(RTEMS_BSP)
+
+include $(RTEMS_ROOT)/make/main.cfg
+
+# use the inline functions instead of the macros
+# ref: src/exec/generic/Makefile
+ifeq ($(RTEMS_USE_MACROS),yes)
+INLINE=macros
+INLINE_UPCASE=
+else
+INLINE=inline
+INLINE_UPCASE=INLINE
+endif
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+## GCC specs extension file location
+RTEMS_BSP_SPECS = $(PROJECT_ROOT)/$(RTEMS_BSP)/lib/bsp_specs
+
+## LIBC support
+## Specify the one you want here and fill in the blanks.
+## Currently CYGNUS newlib is supported.
+## NOTE: RTEMS libcsupport.a includes RTEMS versions of stuff like
+## malloc, gettimeofday, etc.
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=yes
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+HAS_CPLUSPLUS=yes
+else
+HAS_CPLUSPLUS=no
+endif
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=no
+
+# Define this to yes if this target wants the KA9Q TCP/IP stack
+ifeq ($(RTEMS_HAS_KA9Q),yes)
+HAS_KA9Q=yes
+endif
+
+# Define this to yes if this target wants the posix api
+ifeq ($(RTEMS_HAS_POSIX_API),yes)
+HAS_POSIX_API=yes
+endif
+
+# Base name of start file
+START_BASE=start
+
diff --git a/make/custom/dmv152.cfg b/make/custom/dmv152.cfg
new file mode 100644
index 0000000000..fc4fce6979
--- /dev/null
+++ b/make/custom/dmv152.cfg
@@ -0,0 +1,92 @@
+#
+# Config file for the dmv152 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68020
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=dmv152
+
+#
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+
+CPU_CFLAGS =
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# USE_CHANNEL_A (DMV152)
+# USE_CHANNEL_B (DMV152)
+# One and only one of these should be set to 1 to indicate which
+# serial port is used as the RTEMS console.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define USE_CHANNEL_A 1" >>$@
+ @echo "#define USE_CHANNEL_B 0" >>$@
+endef
+
+# Here is the rule to actually build a $(ARCH)/foo.exe
+# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
+# Usage ref: src/tests/sptest/sp1/Makefile
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+# Miscellaneous additions go here
diff --git a/make/custom/efi332.cfg b/make/custom/efi332.cfg
new file mode 100644
index 0000000000..4df0ca48a8
--- /dev/null
+++ b/make/custom/efi332.cfg
@@ -0,0 +1,86 @@
+#
+# Config file for the efi332 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68332
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=efi332
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+# XXX JRS - my gas does not grok -m68332
+#CPU_CFLAGS = -m68332
+CPU_CFLAGS = -m68020
+
+# optimize flag: typically -0, could use -O4 or -fast, -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Override default start file
+START_BASE=start332
+
+# This section makes the target dependent options file.
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+
+# Miscellaneous additions go here
diff --git a/make/custom/efi68k.cfg b/make/custom/efi68k.cfg
new file mode 100644
index 0000000000..7ae0fc0485
--- /dev/null
+++ b/make/custom/efi68k.cfg
@@ -0,0 +1,83 @@
+#
+# Config file for the efi68k BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68000
+
+# This is the actual bsp directory used during the build process.
+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
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Override default start file
+START_BASE=start68k
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+# Miscellaneous additions go here
diff --git a/make/custom/erc32.cfg b/make/custom/erc32.cfg
new file mode 100644
index 0000000000..91adc1ad77
--- /dev/null
+++ b/make/custom/erc32.cfg
@@ -0,0 +1,110 @@
+#
+# Config file for the European Space Agency ERC32
+# a V7 SPARC processor derived from the Cypress 601/602 set.
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=sparc
+RTEMS_CPU_MODEL=erc32
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=erc32
+
+# The -mflat avoids the use of save/restore instructions. It has
+# a negative impact on the performance of RTEMS and should not be used.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# -mno-v8 says not to use v8 level instructions. i.e. use v7 only
+CPU_CFLAGS = -mno-v8 -mcypress
+else
+# -mcpu=cypress says to optimize for a Cypress 60x chipset
+CPU_CFLAGS = -mcpu=cypress
+endif
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Override default start file
+START_BASE=startsis
+
+# This makes the target dependent options file
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# NO_TABLE_MOVE (SPARC PORT)
+# do not have a second trap table -- use the BSP's
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# CONSOLE_USE_POLLED (erc32_bsp)
+# CONSOLE_USE_INTERRUPTS (erc32_bsp)
+# The erc32 console driver can operate in either polled or interrupt mode.
+# Under the simulator (especially when FAST_UART is defined), polled seems
+# to operate better. It is common for a task to print a line (like the
+# end of test message) and then exit. In this case, the program returns
+# control to the simulator command line before the program has even queued
+# the output to the uart. Thus sis has no chance of getting the data out.
+#
+# SIMSPARC_FAST_IDLE (erc32_bsp)
+# If defined, speed up the clock ticks while the idle task is running so
+# time spent in the idle task is minimized. This significantly reduces
+# the wall time required to execute the RTEMS test suites.
+#
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define NO_TABLE_MOVE 1" >>$@
+ @echo "/* #define CONSOLE_USE_INTERRUPTS 1 */" >>$@
+ @echo "#define CONSOLE_USE_POLLED 1" >>$@
+ @echo "/* #define SIMSPARC_FAST_IDLE 1 */" >>$@
+endef
+
+
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) -u _sbrk $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+# Miscellaneous additions go here
+
+
+
diff --git a/make/custom/force386.cfg b/make/custom/force386.cfg
new file mode 100644
index 0000000000..bb4b4ca489
--- /dev/null
+++ b/make/custom/force386.cfg
@@ -0,0 +1,88 @@
+#
+# Config file for the force386 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=i386
+RTEMS_CPU_MODEL=i386_fp
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=force386
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS =
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# Here is the rule to actually build a $(ARCH)/foo.exe
+# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
+# Usage ref: src/tests/sptest/sp1/Makefile
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/gen68302.cfg b/make/custom/gen68302.cfg
new file mode 100644
index 0000000000..8d420f183d
--- /dev/null
+++ b/make/custom/gen68302.cfg
@@ -0,0 +1,79 @@
+#
+# Config file for a "generic 68302" BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68302
+
+# This is the actual bsp directory used during the build process.
+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
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+# override default location of Standard C Library
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/libc.a
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/libm.a
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+# Miscellaneous additions go here
diff --git a/make/custom/gen68360.cfg b/make/custom/gen68360.cfg
new file mode 100644
index 0000000000..ec6be076a4
--- /dev/null
+++ b/make/custom/gen68360.cfg
@@ -0,0 +1,124 @@
+#
+# Config file for a "generic 68360" BSP
+#
+# $Id$
+#
+
+RTEMS_CPU=m68k
+
+ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
+TARGET_ARCH=o-gen68360_040
+RTEMS_CPU_MODEL=m68040
+else
+TARGET_ARCH=o-gen68360
+RTEMS_CPU_MODEL=m68360
+endif
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=gen68360
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+# We may install in a CPU model based directory but this is still
+# a gen68360 based bsp.
+RTEMS_BSP=gen68360
+
+#
+# mc68360 notes:
+# If your version of gcc supports the -mcpu32 option use the top
+# version, otherwise use the bottom set of flags to accomplish the
+# same thing.
+#
+# NOTE: Before binutils 2.6, the -mcpu32 flag was not available
+# if your gas does understand this, then use the alternative.
+
+ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
+CPU_CFLAGS= -m68040
+else
+#CPU_CFLAGS = -mcpu32 -msoft-float
+CPU_CFLAGS = -m68020 -mnobitfield -msoft-float
+# When using the -m68020 cpu flag, we need to explicitly define these
+CPU_DEFINES=-Dmcpu32 -D__mcpu32__ $(DEFINES)
+endif
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# Override default start file
+START_BASE=start360
+
+# This section makes the target dependent options file.
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# M360_SMC1_INTERRUPT (gen68360 BSP)
+# If defined, then the console driver operates in interrupt mode.
+# Otherwise it operates in polled mode.
+#
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define M360_SMC1_INTERRUPT 1" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+# override default location of Standard C Library
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libc.a
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/msoft-float/libm.a
+
+ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
+ RTEMS_GEN68360_EXTRA_LDFLAGS=--defsym RamSize=0x100000
+else
+ RTEMS_GEN68360_EXTRA_LDFLAGS=
+endif
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+
+ifeq ($(RTEMS_GEN68360_COMPANION_MODE),yes)
+ CFLAGS_LD=-Wl,--defsym -Wl,RamSize=0x100000
+else
+ CFLAGS_LD=
+endif
+
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+
+# Miscellaneous additions go here
diff --git a/make/custom/gen68360_040.cfg b/make/custom/gen68360_040.cfg
new file mode 100644
index 0000000000..66c120c803
--- /dev/null
+++ b/make/custom/gen68360_040.cfg
@@ -0,0 +1,15 @@
+#
+# Configuration file for a 68040 using the 68360 in companion mode
+#
+# $Id$
+#
+
+#
+# All gen68360 configurations share the same base file, only the cpu model
+# differs.
+#
+
+RTEMS_GEN68360_COMPANION_MODE=yes
+
+include $(RTEMS_ROOT)/make/custom/gen68360.cfg
+
diff --git a/make/custom/gensh1.cfg b/make/custom/gensh1.cfg
new file mode 100644
index 0000000000..0a2ee9aef9
--- /dev/null
+++ b/make/custom/gensh1.cfg
@@ -0,0 +1,106 @@
+#
+# gensh1.cfg
+#
+# default configuration for Hitachi sh1 processors
+#
+# 97/12/02 Ralf Corsepius (corsepiu@faw.uni-ulm.de)
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=sh
+RTEMS_CPU_MODEL=sh7032
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=amos
+
+## GCC specs extension file location
+RTEMS_BSP_SPECS = $(PROJECT_ROOT)/$(RTEMS_BSP)/lib/bsp_specs
+
+#
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS=-m1
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=yes
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+#
+# Need "main" in BSP so can't link C++ sample test or you will get
+# duplicate symbol errors for main
+#
+# not yet supported
+HAS_CPLUSPLUS=no
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=no
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4
+
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+# -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) -lrtemsall -lc $(LD_PATHS:%=-L %)
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ echo "MAKEING EXE 272"
+ $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
+ -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ echo "MAKEING EXE 28x"
+ $(CC) -v -Wl,-Map,$(basename $@).map $(CFLAGS) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+# Miscellaneous additions go here
+
+# Workaround for missing ranlib
+MKLIB=sh-coff-ranlib $@; echo library is complete
+
diff --git a/make/custom/go32.cfg b/make/custom/go32.cfg
new file mode 100644
index 0000000000..d7c91db343
--- /dev/null
+++ b/make/custom/go32.cfg
@@ -0,0 +1,121 @@
+#
+# Config file for the go32 BSP .. CPU model defaults to an i486DX
+# unless set otherwise by a custom configuration file which overrides.
+#
+# $Id$
+#
+
+# default to i486dx as cpu
+ifeq ($(RTEMS_GO32_CPU_MODEL),)
+TARGET_ARCH=o-go32_i486dx
+RTEMS_CPU_MODEL=i486dx
+else
+ifeq ($(RTEMS_GO32_CPU_MODEL),pentium)
+TARGET_ARCH=o-go32_p5
+RTEMS_CPU_MODEL=pentium
+endif # pentium
+endif # i486dx
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+# Sharing a single bsp among multiple cpu models results in us having to
+# explicitly set some values normally taken care of in the defaults.cfg
+# file.
+
+RTEMS_CPU=i386
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=go32
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+# We may install in a CPU model based directory but this is still
+# a go32 based bsp.
+RTEMS_BSP=go32
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+# NOTE: As gcc grows to include more options, this section should also grow.
+#
+ifeq ($(RTEMS_CPU_MODEL),i486dx)
+CPU_CFLAGS = -m486
+else
+ifeq ($(RTEMS_CPU_MODEL),pentium)
+CPU_CFLAGS = -m486
+else
+CPU_CFLAGS =
+endif # pentium
+endif # i486dx
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Base name of start file
+# go32 does not use the rtems start file
+START_BASE=
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# Ultimately, it would be nice to do this when in a cross environment:
+# $(COFF2EXE) $(basename $@).out
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+# may need to reference libpc.a
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -o $(basename $@).exe \
+ $(shell $(CC) $(CPU_CFLAGS) -print-file-name=crt0.o) \
+ $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group \
+ $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libcgo32.a) \
+ $(shell $(CC) $(CPU_CFLAGS) -print-file-name=libpc.a)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+
+endif
+
+
+# Miscellaneous additions go here
diff --git a/make/custom/go32_p5.cfg b/make/custom/go32_p5.cfg
new file mode 100644
index 0000000000..45668dfaa4
--- /dev/null
+++ b/make/custom/go32_p5.cfg
@@ -0,0 +1,15 @@
+#
+# Configuration file for a Pentium using the go32 BSP
+#
+# $Id$
+#
+
+#
+# All go32 configurations share the same base file, only the cpu model
+# differs.
+#
+
+RTEMS_GO32_CPU_MODEL=pentium
+
+include $(RTEMS_ROOT)/make/custom/go32.cfg
+
diff --git a/make/custom/i386ex.cfg b/make/custom/i386ex.cfg
new file mode 100644
index 0000000000..de2fa90a29
--- /dev/null
+++ b/make/custom/i386ex.cfg
@@ -0,0 +1,89 @@
+#
+# Config file for the force386 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=i386
+RTEMS_CPU_MODEL=i386_nofp
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=i386ex
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS =
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# Something like this should produce a map file but this does not work.
+# -Xlinker "-Map $(basename $@).map" $(LINK_OBJS)
+#
+# This is a good way to get debug information. The rdmp file is large
+# though (1.9 Mb for hello) and greatly slows the build process.
+# $(OBJDUMP) -x -m i386 -d $(basename $@).nxe > $(basename $@).rdmp
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ -noinhibit-exec -Map $(basename $@).map \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/idp.cfg b/make/custom/idp.cfg
new file mode 100644
index 0000000000..fc02e984be
--- /dev/null
+++ b/make/custom/idp.cfg
@@ -0,0 +1,85 @@
+#
+# Config file for the IDP BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68ec040
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=idp
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS = -msoft-float
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+# override default location of Standard C Library
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+
+# Miscellaneous additions go here
diff --git a/make/custom/mvme136.cfg b/make/custom/mvme136.cfg
new file mode 100644
index 0000000000..778d37cb28
--- /dev/null
+++ b/make/custom/mvme136.cfg
@@ -0,0 +1,86 @@
+#
+# Config file for the mvme136 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68020
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=mvme136
+
+#
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS =
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+# Miscellaneous additions go here
+
+
+
diff --git a/make/custom/mvme147.cfg b/make/custom/mvme147.cfg
new file mode 100644
index 0000000000..2e97606042
--- /dev/null
+++ b/make/custom/mvme147.cfg
@@ -0,0 +1,79 @@
+#
+# Config file for the mvme147 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68030
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=mvme147
+
+# default flags
+CPU_CFLAGS=
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+# Miscellaneous additions go here
+
+
diff --git a/make/custom/mvme147s.cfg b/make/custom/mvme147s.cfg
new file mode 100644
index 0000000000..95dfa70f29
--- /dev/null
+++ b/make/custom/mvme147s.cfg
@@ -0,0 +1,19 @@
+#
+# Config file for the mvme147s BSP
+#
+# $Id$
+#
+
+#
+# mvme147s and mvme147 use the same toolset
+#
+
+include $(RTEMS_ROOT)/make/custom/mvme147.cfg
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=mvme147s
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# Miscellaneous additions go here
diff --git a/make/custom/mvme162.cfg b/make/custom/mvme162.cfg
new file mode 100644
index 0000000000..e94780b5a8
--- /dev/null
+++ b/make/custom/mvme162.cfg
@@ -0,0 +1,122 @@
+#
+# Config file for the mvme162 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+
+ifeq ($(RTEMS_MVME162_MODEL),mvme162lx)
+
+TARGET_ARCH=o-mvme162lx
+RTEMS_CPU_MODEL=m68lc040
+
+else
+ifeq ($(RTEMS_MVME162_MODEL),)
+
+RTEMS_MVME162_MODEL=mvme162
+TARGET_ARCH=o-mvme162
+RTEMS_CPU_MODEL=m68040
+
+endif # mvme162 - mc68040
+endif # mvme162lx - mc68lc040
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=mvme162
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+# We may install in a CPU model based directory but this is still
+# a mvme162 based bsp.
+RTEMS_BSP=mvme162
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+
+ifeq ($(RTEMS_CPU_MODEL),m68040)
+CPU_CFLAGS = -m68040
+else
+ifeq ($(RTEMS_CPU_MODEL),m68lc040)
+CPU_CFLAGS = -m68040 -msoft-float
+endif # mc68040
+endif # mc68lc040
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# NO_TABLE_MOVE (SPARC PORT)
+# do not have a second trap table -- use the BSP's
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "#undef $(RTEMS_MVME162_MODEL)" >>$@
+ @echo "#define $(RTEMS_MVME162_MODEL)" >>$@
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+ifeq ($(RTEMS_CPU_MODEL),m68lc040)
+# override default location of Standard C Library
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/msoft-float/libc.a
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/msoft-float/libm.a
+endif # mc68lc040
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).nxe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).nxe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).nxe $(basename $@).i
+ $(SED) -e 's/.$$//' -e '/^S0/d' $(basename $@).i | \
+ $(PROJECT_TOOLS)/packhex > $(basename $@).exe
+ $(NM) -g -n $(basename $@).nxe > $(basename $@).num
+ $(SIZE) $(basename $@).nxe
+endef
+endif
+# Miscellaneous additions go here
+
+
+
diff --git a/make/custom/mvme162lx.cfg b/make/custom/mvme162lx.cfg
new file mode 100644
index 0000000000..881df8202c
--- /dev/null
+++ b/make/custom/mvme162lx.cfg
@@ -0,0 +1,17 @@
+#
+# Configuration file for a MVME162LX
+#
+# This is an MVME162 model with ...
+#
+# $Id$
+#
+
+#
+# All mvme162 configurations share the same base file, only the cpu model
+# differs.
+#
+
+RTEMS_MVME162_MODEL=mvme162lx
+
+include $(RTEMS_ROOT)/make/custom/mvme162.cfg
+
diff --git a/make/custom/no_bsp.cfg b/make/custom/no_bsp.cfg
new file mode 100644
index 0000000000..dc252f0560
--- /dev/null
+++ b/make/custom/no_bsp.cfg
@@ -0,0 +1,62 @@
+#
+# Configuration file for the "no_bsp" board
+#
+# $Id$
+#
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-$(RTEMS_BSP)
+
+RTEMS_CPU=no_cpu
+RTEMS_CPU_MODEL=no_cpu_model
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=no_bsp
+
+# use the inline functions instead of the macros
+# ref: src/exec/generic/Makefile
+# Need INLINE_UPCASE set to uppercase value of INLINE variable
+# ref: make/compilers/gcc-force386.cfg
+ifeq ($(RTEMS_USE_MACROS),yes)
+INLINE=macros
+INLINE_UPCASE=
+else
+INLINE=inline
+INLINE_UPCASE=INLINE
+endif
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-$(RTEMS_BSP).cfg
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=no
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+#
+# Need "main" in BSP so can't link C++ sample test or you will get
+# duplicate symbol errors for main
+#
+HAS_CPLUSPLUS=no
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Define this to yes if this target wants the posix api
+ifeq ($(RTEMS_HAS_POSIX_API),yes)
+HAS_POSIX_API=yes
+endif
+
+# Miscellaneous additions go here
diff --git a/make/custom/ods68302.cfg b/make/custom/ods68302.cfg
new file mode 100644
index 0000000000..6b97980bf2
--- /dev/null
+++ b/make/custom/ods68302.cfg
@@ -0,0 +1,129 @@
+#
+# Config file for a "ODS 68302" BSP
+#
+# Differs from the gen68302 by providing most of the boot code as C
+# code. This allows separate board definitions to be based on C
+# header files. The file is based on the VARIANT defined.
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=m68k
+RTEMS_CPU_MODEL=m68302
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=ods68302
+
+#
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS=-g -m68302 -msoft-float \
+ -DVARIANT=$(BSP_VARIANT) -DMC68302_BASE=$(MC68302_BASE) \
+ -DRAM_BASE=$(RAM_BASE) -DRAM_SIZE=$(RAM_SIZE) \
+ -DROM_BASE=$(ROM_BASE) -DROM_SIZE=$(ROM_SIZE)
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# debugging please
+CFLAGS_DEBUG_V+=-g
+
+# This target does not support the ka9q tcp/ip stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+ifeq ($(RTEMS_HAS_CPLUSPLUS),yes)
+HAS_CPLUSPLUS=yes
+# no standard C++ libs provided by default
+#LIBCC_INCLUDE=/usr/include/g++
+#CPLUS_LD_LIBS=-lstdc++ -lrtems++
+CPLUS_LD_LIBS=$(PROJECT_RELEASE)/lib/librtems++$(LIBSUFFIX_VA)
+else
+HAS_CPLUSPLUS=no
+endif
+
+START_BASE=start302
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "#define RTEMS_DEBUG 1" >>$@
+endef
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+
+# override default location of Standard C Library
+LIBC_LIBC=$(RTEMS_LIBC_DIR)/lib/m68000/libc.a
+LIBC_LIBM=$(RTEMS_LIBC_DIR)/lib/m68000/libm.a
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -Ttext $(ROM_BASE) \
+ -defsym MC68302_BASE=$(MC68302_BASE) \
+ -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) \
+ -Wl,-defsym -Wl,MC68302_BASE=$(MC68302_BASE) \
+ -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+# Miscellaneous additions go here
+
+ifeq "$(strip $(BSP_VARIANT))" ""
+BSP_VARIANT=bare
+MC68302_BASE=0x00700000
+RAM_BASE=0x00000000
+RAM_SIZE=0x00100000
+
+ifeq ($(RTEMS_DEBUGGER),yes)
+ROM_BASE=0x00010000
+LINKCMDS=$(PROJECT_RELEASE)/lib/debugrom
+else
+ROM_BASE=0x00C00000
+LINKCMDS=$(PROJECT_RELEASE)/lib/rom
+endif
+
+ROM_SIZE=0x00100000
+
+else
+
+# pattern match the variant to set the memory map
+
+endif
diff --git a/make/custom/p4000.cfg b/make/custom/p4000.cfg
new file mode 100644
index 0000000000..f0745883d6
--- /dev/null
+++ b/make/custom/p4000.cfg
@@ -0,0 +1,85 @@
+#
+# Config file for the algorithmics p4000 evaluation board
+#
+# $Id$
+#
+
+# Override default start file
+START_BASE=idt_csu
+
+CPU_DEFINES+=-DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=p4000
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# WORKSPACE_MB (p4000)
+# Defines the size in Megabytes of the RTEMS Workspace.
+#
+# HEAPSPACE_MB (p4000)
+# Defines the size in Megabytes of the C Program Heap.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define WORKSPACE_MB 2" >>$@
+ @echo "#define HEAPSPACE_MB 1" >>$@
+endef
+
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
+ -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/p4600.cfg b/make/custom/p4600.cfg
new file mode 100644
index 0000000000..98174cd4ed
--- /dev/null
+++ b/make/custom/p4600.cfg
@@ -0,0 +1,105 @@
+#
+# Config file for the algorithmics p4000 evaluation board with R4600 cpu
+#
+# $Id$
+#
+
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=mips64orion
+RTEMS_CPU_MODEL=R4600
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=p4000
+
+CPU_CFLAGS=-mcpu=4600 -G0
+CCMIPS_CFLAGS_CPU=-cpu=r4600
+
+# Override default start file
+START_BASE=idt_csu
+
+CPU_DEFINES+=-DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
+
+# The p4600 and p4600 share the p4000 bsp.
+TARGET_ARCH=o-p4600
+RTEMS_BSP=p4000
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# WORKSPACE_MB (p4000)
+# Defines the size in Megabytes of the RTEMS Workspace.
+#
+# HEAPSPACE_MB (p4000)
+# Defines the size in Megabytes of the C Program Heap.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define WORKSPACE_MB 2" >>$@
+ @echo "#define HEAPSPACE_MB 1" >>$@
+endef
+
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# This rule was used in 3.6.0
+# $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
+# -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/p4650.cfg b/make/custom/p4650.cfg
new file mode 100644
index 0000000000..cc3877f5e2
--- /dev/null
+++ b/make/custom/p4650.cfg
@@ -0,0 +1,108 @@
+#
+# Config file for the algorithmics p4000 evaluation board with R4650 cpu
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=mips64orion
+RTEMS_CPU_MODEL=R4650
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=p4000
+
+CPU_CFLAGS=-m4650 -G0
+CCMIPS_CFLAGS_CPU=-cpu=r4650
+
+# Override default start file
+START_BASE=idt_csu
+
+CPU_DEFINES+=-DP4000 -DCPU_R4000 -DP3_DIAG -D_R4000 -D__mips=3
+
+# The p4600 and p4600 share the p4000 bsp.
+TARGET_ARCH=o-p4650
+RTEMS_BSP=p4000
+
+## Target compiler config file, if any
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-target-default.cfg
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# WORKSPACE_MB (p4000)
+# Defines the size in Megabytes of the RTEMS Workspace.
+#
+# HEAPSPACE_MB (p4000)
+# Defines the size in Megabytes of the C Program Heap.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define WORKSPACE_MB 2" >>$@
+ @echo "#define HEAPSPACE_MB 1" >>$@
+endef
+
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# This rule was used in 3.6.0
+# $(CC) $(LDFLAGS) -nostdlib -o $(basename $@).exe \
+# -T$(PROJECT_RELEASE)/lib/linkcmds $(LINK_FILES) $(LD_PATHS:%=-L %)
+
+define make-exe
+ $(LD) $(LDFLAGS) -N -T $(LINKCMDS) -o $(basename $@).exe \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(OBJCOPY) -O srec $(basename $@).exe $(basename $@).srec1
+ $(PACKHEX) < $(basename $@).srec1 > $(basename $@).srec
+ $(RM) $(basename $@).srec1
+ $(NM) -n $(basename $@).exe > $(basename $@).num
+ $(SIZE) $(basename $@).exe
+endef
+endif
+
+# Miscellaneous additions go here
+
+
+
+
+
diff --git a/make/custom/papyrus.cfg b/make/custom/papyrus.cfg
new file mode 100644
index 0000000000..8607f9ae44
--- /dev/null
+++ b/make/custom/papyrus.cfg
@@ -0,0 +1,87 @@
+#
+# Config file for a PowerPC 403 based papyrus card
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=ppc
+RTEMS_CPU_MODEL=ppc403
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=papyrus
+
+CPU_DEFINES=-DPPC_ABI=PPC_ABI_POWEROPEN \
+ -DPPC_ASM=PPC_ASM_ELF -DPPC_VECTOR_FILE_BASE=0x0100
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS = -mcpu=403
+
+# 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
+
+# No start file
+START_BASE=
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+# The --defsym arguments define arguments which are required by the linkcmds
+# file which is designed for gcc 2.8
+define make-exe
+ $(LD) $(XLDFLAGS) -T $(LINKCMDS) \
+ --defsym __fini=0 --defsym __init=0 \
+ -o $@ -u atexit -u __vectors -u download_entry \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+endif
+
+# Miscellaneous additions go here
+
+
diff --git a/make/custom/pc386.cfg b/make/custom/pc386.cfg
new file mode 100644
index 0000000000..d014dbc866
--- /dev/null
+++ b/make/custom/pc386.cfg
@@ -0,0 +1,96 @@
+#
+# Config file for the PC 386 BSP
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=i386
+RTEMS_CPU_MODEL=i386_fp
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=pc386
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+CPU_CFLAGS =
+
+# optimize flag: typically -0, could use -O4 or -fast
+# -O4 is ok for RTEMS
+CFLAGS_OPTIMIZE_V=-O4 -fomit-frame-pointer
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=no
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This section makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+endef
+
+# Here is the rule to actually build a $(ARCH)/foo.exe
+# It also builds $(ARCH)/foo.sr and $(ARCH)/foo.nm
+# Usage ref: src/tests/sptest/sp1/Makefile
+
+#+--------------------------------------------------------------------------+
+#| Relocation address. Set this to the linear address where you want your code
+#| to start. It should abide to the following constraints:
+#| RELOCADDR >= 0x10200
+#| RELOCADDR + 'image file size' < 0xA0000
+#| RELOCADDR % 4 = 0 (i.e. aligned on a 4 byte boundary)
+#+--------------------------------------------------------------------------+
+RELOCADDR=0x00020200
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LD) -N -T $(LINKCMDS) -Ttext $(RELOCADDR) -e start -nostdlib \
+ -o $(basename $@).elf \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(OBJCOPY) -O binary --set-start $(RELOCADDR) $(basename $@).elf $@
+ $(PROJECT_TOOLS)/bin2boot -v $@ $(basename $@).bin -s $(RELOCADDR)
+ $(NM) -g -n $(basename $@).elf > $(basename $@).num
+ $(SIZE) $(basename $@).elf
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@).elf $(LINK_OBJS)
+ $(OBJCOPY) -O binary --set-start $(RELOCADDR) $(basename $@).elf $@
+ $(PROJECT_TOOLS)/bin2boot -v $@ $(basename $@).bin -s $(RELOCADDR)
+ $(NM) -g -n $(basename $@).elf > $(basename $@).num
+ $(SIZE) $(basename $@).elf
+endef
+endif
+
+# Miscellaneous additions go here
+
diff --git a/make/custom/portsw.cfg b/make/custom/portsw.cfg
new file mode 100644
index 0000000000..18c69f0479
--- /dev/null
+++ b/make/custom/portsw.cfg
@@ -0,0 +1,64 @@
+#
+# Custom file for "portsw" -- AMD 29205 based board
+#
+# $Id$
+#
+
+# Specify here the host and target "architectures"
+HOST_ARCH=o-$(RTEMS_HOST)
+TARGET_ARCH=o-$(RTEMS_BSP)
+
+RTEMS_CPU=a29k
+RTEMS_CPU_MODEL=a29205
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=portsw
+
+# use the inline functions instead of the macros
+# ref: src/exec/generic/Makefile
+# Need INLINE_UPCASE set to uppercase value of INLINE variable
+# ref: make/compilers/gcc-force386.cfg
+INLINE=macros
+INLINE_UPCASE=
+
+# The makefiles all use PROJECT_xxx for variables.
+# Ie: $(PROJECT_RELEASE) is the install point.
+# Externally, we think of these as "RTEMS" variables.
+# Here is where we convert from RTEMS forms to PROJECT forms
+# See also make/main.cfg, which derives some more.
+PROJECT_ROOT=$(RTEMS_ROOT)/c
+
+# HOST Compiler config file
+# You may also want to specify where the compiler resides here.
+CC_$(HOST_ARCH)_DIR=$(RTEMS_GNUTOOLS_HOST)
+CONFIG.$(HOST_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc.cfg
+
+## Target compiler config file, if any
+CC_$(TARGET_ARCH)_DIR=$(RTEMS_GNUTOOLS)
+CONFIG.$(TARGET_ARCH).CC = $(RTEMS_ROOT)/make/compilers/gcc-$(RTEMS_BSP).cfg
+
+# Use the LIBC support for CYGNUS newlib
+# RTEMS_LIBC_DIR must already be set (by module file)
+RTEMS_USE_NEWLIB=yes
+
+# Define this to yes if C++ is included in the development environment.
+# This requires that at least the GNU C++ compiler and libg++ be installed.
+#
+# Need "main" in BSP so can't link C++ sample test or you will get
+# duplicate symbol errors for main
+#
+HAS_CPLUSPLUS=no
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=no
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# Define this to yes if this target wants the posix api
+ifeq ($(RTEMS_HAS_POSIX_API),yes)
+HAS_POSIX_API=yes
+endif
+
+# Miscellaneous additions go here
diff --git a/make/custom/posix.cfg b/make/custom/posix.cfg
new file mode 100644
index 0000000000..05f6a56cdd
--- /dev/null
+++ b/make/custom/posix.cfg
@@ -0,0 +1,12 @@
+#
+# Config file for the posix based RTEMS
+#
+# $Id$
+#
+
+include $(PROJECT_ROOT)/make/target.cfg
+include $(PROJECT_ROOT)/make/host.cfg
+
+include $(RTEMS_ROOT)/make/custom/$(RTEMS_HOST)-posix.cfg
+
+
diff --git a/make/custom/simhppa.cfg b/make/custom/simhppa.cfg
new file mode 100644
index 0000000000..0976b4d3f6
--- /dev/null
+++ b/make/custom/simhppa.cfg
@@ -0,0 +1,145 @@
+#
+# Config file for the 7100 pa-risc simulator
+#
+# $Id$
+#
+
+include $(RTEMS_ROOT)/make/custom/default.cfg
+
+RTEMS_CPU=hppa1_1
+RTEMS_CPU_MODEL=hppa7200
+
+# This is the actual bsp directory used during the build process.
+RTEMS_BSP_FAMILY=simhppa
+
+# This contains the compiler options necessary to select the CPU model
+# and (hopefully) optimize for it.
+#
+# Possibles:
+# -mpa-risc-1-1 -- HPPA 1.1 instead of 1.0
+# -mportable-runtime
+#
+CPU_CFLAGS = -mpa-risc-1-1 -mportable-runtime
+
+# Possibles:
+# -Wall -- lots of warnings
+# -pipe -- compiler uses pipes to talk to phases (usually faster)
+# -ansi -- ANSI C compliance
+# -fasm -- ANSI, but allow inline assembler
+# -mgas -- we are using gas as assembler
+# -fno-keep-inline-functions -- do not emit any inlines as static
+CFLAGS_DEFAULT = $(CPU_CFLAGS) -Wall -ansi -fasm -mgas
+
+# 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
+
+# Define this to yes if this target supports multiprocessor environments.
+HAS_MP=yes
+
+# This target does NOT support the KA9Q TCP/IP stack so ignore requests
+# to enable it.
+HAS_KA9Q=no
+
+# This makes the target dependent options file.
+
+# NDEBUG (C library)
+# if defined asserts do not generate code. This is commonly used
+# as a command line option.
+#
+# RTEMS_TEST_NO_PAUSE (RTEMS tests)
+# do not pause between screens of output in the rtems tests
+#
+# STACK_CHECKER_ON (RTEMS support code)
+# If defined, stack bounds checking is enabled.
+#
+# STACK_CHECKER_REPORT_USAGE (RTEMS support code)
+# If this and STACK_CHECKER_ON are defined, then a report on stack usage
+# per task is printed when the program exits.
+#
+# RTEMS_DEBUG (RTEMS)
+# If defined, debug checks in RTEMS and support library code are enabled.
+#
+# SIMHPPA_FAST_IDLE (simhppa)
+# If defined, speed up the clock ticks while the idle task is running so
+# time spent in the idle task is minimized. This significantly reduces
+# the wall time required to execute the RTEMS test suites.
+#
+
+define make-target-options
+ @echo "/* #define NDEBUG 1 */ " >>$@
+ @echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
+ @echo "/* #define STACK_CHECKER_ON 1 */" >>$@
+ @echo "/* #define STACK_CHECKER_REPORT_USAGE 1 */" >>$@
+ @echo "/* #define RTEMS_DEBUG 1 */" >>$@
+ @echo "#define SIMHPPA_FAST_IDLE 1 " >>$@
+endef
+
+#
+# GNU ld options
+# `-Tbss ORG'
+# `-Tdata ORG'
+# `-Ttext ORG'
+# Use ORG as the starting address for--respectively--the `bss',
+# `data', or the `text' segment of the output file. ORG must be a
+# single hexadecimal integer; for compatibility with other linkers,
+# you may omit the leading `0x' usually associated with hexadecimal
+# values.
+
+# 'NODE' is set to 1 or 2 for multi cpu tests (ref: mptests/mp01/node1/Makefile)
+# If NODE is set as an environment variable, don't trust it, zero it out.
+# (NODE turns out to be a very common environment variable)
+ifeq (,$(NODE))
+NODE=0
+else
+ifeq "$(origin NODE)" "environment"
+NODE=0
+endif
+endif
+
+# XXX some/all of this should move into 'linkcmds'
+# single processor
+DATA_0_BASE=0x40001000
+TEXT_0_BASE=0x00001000
+
+# first node (mptests number them from 1)
+DATA_1_BASE=$(DATA_0_BASE)
+TEXT_1_BASE=$(TEXT_0_BASE)
+
+# second node (mptests number them from 1)
+DATA_2_BASE=0x48001000
+TEXT_2_BASE=0x08001000
+
+# for hpux ld
+#LD_LOC_OPTIONS=-D $(DATA_$(NODE)_BASE) -R $(TEXT_$(NODE)_BASE)
+# for gnu ld
+LD_LOC_OPTIONS=-Tdata $(DATA_$(NODE)_BASE) -Ttext $(TEXT_$(NODE)_BASE)
+GCC_LD_LOC_OPTIONS=-W,l-T -W,ldata -W,l$(DATA_$(NODE)_BASE) \
+ -W,l-T -W,ltext -W,l$(TEXT_$(NODE)_BASE)
+
+
+# The following are definitions of make-exe which will work using ld as
+# is currently required. It is expected that as of gcc 2.8, the end user
+# will be able to override parts of the compilers specs and link using gcc.
+
+ifeq ($(RTEMS_USE_GCC272),yes)
+define make-exe
+ $(LDARGS) $(LD) $(LD_LOC_OPTIONS) $(XLDFLAGS) -a archive \
+ -o $@ -u atexit \
+ $(START_FILE) $(LINK_OBJS) --start-group $(LINK_LIBS) --end-group
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+else
+define make-exe
+ $(CC) $(CFLAGS) $(CFLAGS_LD) $(GCC_LD_LOC_OPTIONS) \
+ -o $(basename $@).exe $(LINK_OBJS)
+ $(NM) -g -n $@ > $(basename $@).num
+ $(SIZE) $@
+endef
+endif
+
+define make-rel
+ $(LDARGS) $(LD) $(LDFLAGS_INCOMPLETE) $(XLDFLAGS) -o $@ $(OBJS)
+endef
diff --git a/make/directory.cfg b/make/directory.cfg
new file mode 100644
index 0000000000..1ae1db84bd
--- /dev/null
+++ b/make/directory.cfg
@@ -0,0 +1,43 @@
+#
+# $Id$
+#
+# make/directory.cfg
+#
+# Make(1) configuration file include'd by all directory-level Makefile's.
+#
+# See also make/main.cfg
+#
+
+# include $(RTEMS_ROOT)/make/main.cfg
+
+# on a 'make -k' we don't want to bomb out of directory list
+EXIT_CMD=exit 1
+ifeq (k, $(findstring k, $(MAKEFLAGS)))
+EXIT_CMD=true
+endif
+
+RULE=$(shell echo $@ | $(SED) -e s/debug_// -e s/profile_//)
+
+ifeq ($(RTEMS_USE_OWN_PDIR),yes)
+$(RECURSE_TARGETS):
+ @$(ECHO); \
+ BASEDIR=`pwd`; \
+ for subd in $(SUB_DIRS) xxx; \
+ do if [ $$subd != xxx ] ; then \
+ cd $$BASEDIR; \
+ $(ECHO); \
+ $(ECHO) "*** $$BASEDIR/$$subd ($@)" ; \
+ cmd="cd $$subd; $(MAKE) $(RULE)"; \
+ $(ECHO) $$cmd; \
+ eval $$cmd || $(EXIT_CMD); \
+ fi; done; \
+ $(ECHO); \
+ $(ECHO) "*** $$BASEDIR/$@ ($@) Finished."; \
+ $(ECHO)
+ $($@_WRAPUP)
+else
+ifdef RECURSE_TARGETS
+$(RECURSE_TARGETS):
+ set -e; for subd in $(SUB_DIRS); do $(MAKE) -w -C $$subd $@; done
+endif
+endif
diff --git a/make/host.cfg.in b/make/host.cfg.in
new file mode 100644
index 0000000000..0f088aff56
--- /dev/null
+++ b/make/host.cfg.in
@@ -0,0 +1,68 @@
+#
+# $Id $
+#
+# OS-specific configuration
+#
+# Author: Ralf Corsepius (corsepiu@faw.uni-ulm.de) 97/11/08
+#
+# Derived from rtems/c/make/os/*.cfg in previous RTEMS version.
+#
+
+RTEMS_HOST = @RTEMS_HOST@
+
+#
+# Stuff to clean and clobber for the OS
+#
+
+CLEAN_OS =
+CLOBBER_OS = *~ *.bak TAGS tags
+
+SHELL=/bin/sh
+ECHO=echo
+
+CAT=@CAT@
+RM=@RM@ -f
+CP=@CP@
+MV=@MV@
+LN=@LN@
+MKDIR=@MKDIR@
+CHMOD=@CHMOD@
+ED=@ED@
+SED=@SED@
+M4=@M4@
+
+INSTALL=$(PROJECT_TOOLS)/install-if-change
+INSTALL_VARIANT=$(PROJECT_TOOLS)/install-if-change -V "$(LIB_VARIANT)"
+
+FGREP=@FGREP@
+GREP=@GREP@
+EGREP=@EGREP@
+
+# ksh (or bash) is used by some shell scripts; ref build-tools/scripts/Makefile
+#
+# Must have shell functions. Some ksh's core dump mysteriously and
+# unreliably on RTEMS shell scripts. bash appears to be the most
+# reliable but late model ksh's are usually OK.
+KSH=@KSH@
+
+#
+# RCS support
+#
+RCS_CLEAN=$(PROJECT_TOOLS)/rcs-clean
+
+#
+# Rule to install a shell script with the proper shell to run it.
+#
+
+# when debugging, one may want to save the previous incarnation of the
+# installed script. Replace the first line of this rule to do this.
+#
+# -$(RM) $@.old
+# -$(MV) $@ $@.old >/dev/null 2>&1
+
+define make-script
+ -$(RM) $@
+ $(SED) -e '1,1s?^#!KSHELL?#!$(KSH)?' \
+ -e '1,1s?^#!SHELL?#!$(SHELL)?' < $< > $@
+ $(CHMOD) 0555 $@
+endef
diff --git a/make/leaf.cfg b/make/leaf.cfg
new file mode 100644
index 0000000000..13c720f1a5
--- /dev/null
+++ b/make/leaf.cfg
@@ -0,0 +1,169 @@
+#
+# $Id$
+#
+# make/leaf.cfg
+#
+# Make(1) configuration file include'd by all leaf-node Makefiles
+#
+
+# get most stuff done
+
+# include $(RTEMS_ROOT)/make/main.cfg
+
+#
+# list of all known managers
+# This list is used, along with $(MANAGERS) (set by app makefile)
+# to build the list of *not wanted* drivers.
+#
+# ref: target compiler config file for usage
+#
+
+MANAGER_LIST=dpmem event io msg mp part region sem signal timer rtmon ext
+
+# Convert *real* spellings in $(MANAGERS) (set
+# in application makefile) to their "correct" name.
+# (I hate abbreviations :-)
+
+MANAGERS := $(patsubst message, msg, $(MANAGERS))
+MANAGERS := $(patsubst multi_processor, mp, $(MANAGERS))
+MANAGERS := $(patsubst partition, part, $(MANAGERS))
+MANAGERS := $(patsubst rate_monotonic, rtmon, $(MANAGERS))
+MANAGERS := $(patsubst semaphore, sem, $(MANAGERS))
+MANAGERS := $(patsubst dual_ported_memory, dpmem, $(MANAGERS))
+MANAGERS := $(patsubst extension, ext, $(MANAGERS))
+
+# allow 'all' to mean all managers
+MANAGERS := $(patsubst all, $(MANAGER_LIST), $(MANAGERS))
+
+# and finally rip out duplicates
+MANAGERS := $(sort $(MANAGERS))
+
+# Pull in the desired compiler
+# This is almost always the "target" compiler.
+# But sometimes, you have to build something on the host.
+# Allow for that by allowing individual Makefiles specify $(USE_HOST_COMPILER)
+# This will not change $(ARCH) -- binaries will still be place as per target
+ifeq (,$(USE_HOST_COMPILER))
+ include ${CONFIG.$(TARGET_ARCH).CC}
+else
+ include $(CONFIG.$(HOST_ARCH).CC)
+endif
+ifeq (${DEPEND},$(wildcard ${DEPEND}))
+include ${DEPEND} # pull in dependencies if they exist
+endif
+
+#
+# Builtin targets for compilation variants
+#
+debug debug_install:
+ $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=${TARGET_ARCH}-debug" \
+ "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
+ "CFLAGS_OPTIMIZE=$(CFLAGS_DEBUG_OPTIMIZE_V)" \
+ "LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA)
+
+profile profile_install:
+ $(MAKE) -f $(MAKEFILE) \
+ MAKEFILE=$(MAKEFILE) "ARCH=${TARGET_ARCH}-profile" \
+ "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \
+ "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA)
+
+#
+# VARIANT_VA will convert our ${ARCH} back into "" or "debug" or "profile".
+# Handy when one makefile wants to hop over into a peer's tree and
+# build something "the same" way.
+#
+
+VARIANT-$(TARGET_ARCH)-v =
+VARIANT-$(TARGET_ARCH)-debug-v = debug
+VARIANT-$(TARGET_ARCH)-profile-v = profile
+
+VARIANT_VA = $(VARIANT-$(ARCH)-v)
+
+#
+# TARGET_VA will convert $@ (expected to be 'debug' or
+# 'debug_install' or 'profile' etc.)
+# into "" or "install" as appropriate.
+# Used for variant recursion.
+#
+
+TARGET_debug_V = all
+TARGET_profile_V = all
+
+TARGET_debug_install_V = install
+TARGET_profile_install_V = install
+
+TARGET_VA = $(TARGET_$@_V)
+
+#
+# LIBSUFFIX_VA, will "index" into LIBSUFF-*-v macros and
+# convert our ${ARCH} back into .a or _g.a or _p.a based on debug or profile.
+# Useful for installing libraries.
+#
+
+LIBSUFFIX_$(TARGET_ARCH)_V=
+LIBSUFFIX_$(TARGET_ARCH)-debug_V=_g
+LIBSUFFIX_$(TARGET_ARCH)-profile_V=_p
+
+LIB_VARIANT=$(LIBSUFFIX_$(ARCH)_V)
+LIBSUFFIX_VA = $(LIB_VARIANT).a
+
+get: $(SRCS) $(GET_ADDITIONS)
+
+#
+# Builtin clean and clobber rules
+# Individual makefiles can add stuff via CLEAN_ADDITIONS and CLOBBER_ADDITIONS
+# If desperate to save something, they can override CLEAN_OS, CLEAN_CC, etc.
+#
+
+clean:
+ $(RM) -r a.out core mon.out gmon.out $(CLEAN_OS) $(CLEAN_CC)
+ $(RM) -r $(CLEAN_PROTO) $(CLEAN_DEPEND) a.out
+ $(RM) -r $(VARIANTS) $(CLEAN_ADDITIONS)
+
+clobber: clean
+ -$(RCS_CLEAN)
+ $(RM) .#*
+ $(RM) -r $(CLOBBER_OS) $(CLOBBER_CC) $(CLOBBER_DEPEND)
+ $(RM) -r $(CLOBBER_ADDITIONS) a.out
+
+# make the target dependent options file
+$(ARCH)/targopts.h-tmp: FORCE
+ @echo "/* target board dependent options file */" >$@
+ @echo "/* automatically generated -- DO NOT EDIT!! */" >>$@
+ @echo >>$@
+ @echo "#ifndef __TARGET_OPTIONS_h" >>$@
+ @echo "#define __TARGET_OPTIONS_h" >>$@
+ @echo >>$@
+ @echo "#ifdef $(RTEMS_CPU)" >>$@
+ @echo "#undef $(RTEMS_CPU)" >>$@
+ @echo "#endif" >>$@
+ @echo "#define $(RTEMS_CPU) 1" >>$@
+ @echo >>$@
+ @echo "#ifdef $(RTEMS_CPU_MODEL)" >>$@
+ @echo "#undef $(RTEMS_CPU_MODEL)" >>$@
+ @echo "#endif" >>$@
+ @echo "#define $(RTEMS_CPU_MODEL) 1" >>$@
+ @echo >>$@
+ @echo "#ifdef $(RTEMS_BSP)" >>$@
+ @echo "#undef $(RTEMS_BSP)" >>$@
+ @echo "#endif" >>$@
+ @echo "#define $(RTEMS_BSP) 1" >>$@
+ @echo >>$@
+ @$(make-target-options)
+ifeq (${RTEMS_USE_MACROS},yes)
+ @echo "#define USE_MACROS 1" >>$@
+else
+ @echo "#define USE_INLINES 1" >>$@
+endif
+ifeq ($(RTEMS_HAS_POSIX_API),yes)
+ @echo "#define RTEMS_POSIX_API 1" >>$@
+endif
+ifeq ($(RTEMS_USE_NEWLIB),yes)
+ @echo "#define RTEMS_NEWLIB 1" >>$@
+ @echo "#define MALLOC_PROVIDED 1" >>$@
+endif
+ @echo >>$@
+ @echo "#endif" >>$@
+
+$(ARCH)/bsp_specs.tmp: FORCE
+ cp $(RTEMS_ROOT)/c/src/lib/libbsp/$(RTEMS_CPU)/$(RTEMS_BSP_FAMILY)/bsp_specs $@
diff --git a/make/lib.cfg b/make/lib.cfg
new file mode 100644
index 0000000000..6d170efed4
--- /dev/null
+++ b/make/lib.cfg
@@ -0,0 +1,20 @@
+#
+# $Id$
+#
+# make/lib.cfg
+#
+# Make(1) configuration file include'd by all "library" Makefile
+# Assumes $(LIB) is set to $(ARCH)/libfoo.a
+#
+
+include $(RTEMS_ROOT)/make/leaf.cfg
+
+define make-library
+$(RM) $@
+$(AR) $(ARFLAGS) $@ $(OBJS)
+$(MKLIB) $@
+endef
+
+CLEAN_ADDITIONS +=
+
+.PRECIOUS: $(LIB)
diff --git a/make/main.cfg b/make/main.cfg
new file mode 100644
index 0000000000..7521d4ea99
--- /dev/null
+++ b/make/main.cfg
@@ -0,0 +1,82 @@
+#
+# $Id$
+#
+# make/main.cfg
+#
+# Make(1) configuration file include'd by all Makefile's
+#
+
+#
+# where things are relative to PROJECT_ROOT; shouldn't need to change,
+# but could be overridden in custom files.
+#
+
+PROJECT_RELEASE=$(PROJECT_ROOT)/$(RTEMS_BSP)
+PROJECT_BIN=$(PROJECT_RELEASE)/bin
+PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include
+PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
+
+#
+# Target architecture; may be changed as per 'make "ARCH=${TARGET_ARCH}-debug"'
+# This is where the object files get put.
+#
+
+ARCH=${TARGET_ARCH}
+
+VARIANT=
+
+#
+# Initial target for make(1)
+# Once this is established we can safely include other targets
+# within this make-include file.
+#
+
+default_target: all
+
+#
+# Describe the host os
+#
+# include $(PROJECT_ROOT)/make/target.cfg
+# include $(PROJECT_ROOT)/make/host.cfg
+
+#
+# Default makefile name
+# May be overridden by command line macro assignment
+#
+
+MAKEFILE=Makefile
+
+#
+# Target variant names
+# and rule to expand them into (for example): sun4 sun4-debug sun4-profile
+# Note compiler config may add to TARGET_VARIANTS
+#
+
+TARGET_VARIANTS = debug profile
+
+#
+# Generate list of object directories: sun4, sun4-debug, sun4-profile
+#
+VARIANTS=${TARGET_ARCH} ${TARGET_VARIANTS:%=${TARGET_ARCH}-%}
+
+#
+# List of "recursion-able" targets for directory Makefiles
+#
+
+RECURSE_TARGETS=all clean protos get clobber depend \
+ $(TARGET_VARIANTS) $(TARGET_VARIANTS:%=%_install)
+
+ifeq ($(RTEMS_USE_OWN_PDIR),yes)
+MAKEFLAGS += --no-print-directory
+endif
+
+${ARCH}:
+ test -d ${ARCH} || $(MKDIR) ${ARCH}
+
+
+# general purpose forcing dependency; try to use .PHONY instead
+FORCEIT:
+
+FORCE:
+
+.PHONY: $(RECURSE_TARGETS)
diff --git a/make/target.cfg.in b/make/target.cfg.in
new file mode 100644
index 0000000000..b29c5baa6a
--- /dev/null
+++ b/make/target.cfg.in
@@ -0,0 +1,56 @@
+#
+#
+# Target specific settings. To be included in application Makefiles.
+#
+
+prefix = @prefix@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+DEFS = @DEFS@
+LDFLAGS =
+LIBS = @LIBS@
+CC_FOR_BUILD = gcc
+
+CC_FOR_TARGET = @program_prefix@gcc
+AS_FOR_TARGET = @program_prefix@as
+AR_FOR_TARGET = @program_prefix@ar
+NM_FOR_TARGET = @program_prefix@nm
+LD_FOR_TARGET = @program_prefix@ld
+SIZE_FOR_TARGET = @program_prefix@size
+OBJCOPY_FOR_TARGET = @program_prefix@objcopy
+
+CC= $(CC_FOR_TARGET)
+AS= $(AS_FOR_TARGET)
+LD= $(LD_FOR_TARGET)
+NM= $(NM_FOR_TARGET)
+AR= $(AR_FOR_TARGET)
+SIZE= $(SIZE_FOR_TARGET)
+OBJCOPY= $(OBJCOPY_FOR_TARGET)
+
+export CC
+export AS
+export LD
+export NM
+export AR
+export SIZE
+export OBJCOPY
+
+
+RTEMS_ROOT = @RTEMS_ROOT@
+RTEMS_HOST = @RTEMS_HOST@
+RTEMS_USE_OWN_PDIR = @RTEMS_USE_OWN_PDIR@
+RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
+RTEMS_HAS_KA9Q = @RTEMS_HAS_KA9Q@
+RTEMS_HAS_CPLUSPLUS = @RTEMS_HAS_CPLUSPLUS@
+RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
+RTEMS_USE_GCC272 = @RTEMS_USE_GCC272@
+RTEMS_LIBC_DIR = @RTEMS_LIBC_DIR@
+RTEMS_CUSTOM = $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
+
+INSTALL=$(PROJECT_ROOT)/$(RTEMS_BSP)/build-tools/install-if-change
+XCFLAGS=$(CFLAGS_FOR_TARGET)
+
+export RTEMS_BSP
+export RTEMS_CUSTOM
+export PROJECT_ROOT