Files
rtems/make/Makefile.in
T
Joel Sherrill cce81a748f A patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>:
Here is another patch to hopefully enhance rtems' configuration.

    Motivation: Try to support other c-compilers besides gcc (I tried to
    build rtems under Solaris using sun's WSPro c-compiler).

    Here is a couple of small patches concerning the host compiler
    configuration, which fix/work-around the worst problems when using sun's
    WSPro c-compiler.

    Changes:
        * Replaced make/compilers/gcc.cfg with make/compilers/gcc.cfg.in, ie.
          gcc.cfg is generated by configure now.
        * Removed a line containing a hard-coded "gcc" from gcc.cfg (BUG-fix).
        * Add -g to host compiler flags only if configure reported -g to work
        * Add -Wall to host compiler flags only if configure reported that the
          host compiler is gcc (WSPro's cc chokes on -Wall).
        * Some modifications to make/Makefile.in
        * Adapted make/custom/default.cfg to the new location of gcc.cfg

    BTW, gcc.cfg/gcc.cfg.in seems to be full of unused code (DEBUG-VARIANTS
    etc.) which deserves to be cleaned up, IMO.

    IMO, a similar patch should be applied to gcc-target-default.cfg
1998-08-21 17:43:22 +00:00

92 lines
2.6 KiB
Makefile

#
# $Id$
#
# Not strictly necessary to pull in this stuff. But it helps with
# working with the templates and poking around.
#
@SET_MAKE@
srcdir = @srcdir@
VPATH = @srcdir@
RTEMS_ROOT = @top_srcdir@
PROJECT_ROOT = @PROJECT_ROOT@
include $(RTEMS_ROOT)/make/custom/$(RTEMS_BSP).cfg
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 each other
#CUSTOM_FILES := custom/default.cfg $(patsubst %,custom/%.cfg, posix)
# This version of the rule is pretty ugly but I think it works ALL the time.
# + Figure out what this BSP.cfg includes
# + Make those files have the correct relative path.
# + Now fix $(RTEMS_HOST) to the real host name
CUSTOM_FILES := custom/default.cfg custom/$(RTEMS_BSP).cfg \
$(shell grep "^include.*make/custom" $(srcdir)/custom/$(RTEMS_BSP).cfg | \
sed -e 's/^.*make\///' | sed -e s/\\$$\(RTEMS_HOST\)/${RTEMS_HOST}/)
# 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:
@INSTALL@ $(INSTDIRFLAGS) $@
install: $(prefix)/rtems install_files
$(prefix)/rtems/make:
@INSTALL@ $(INSTDIRFLAGS) $@
install_files:: $(GENERIC_FILES) $(MAKEFILES) $(prefix)/rtems/make
@INSTALL@ $(INSTDATAFLAGS) $(GENERIC_FILES) $(MAKEFILES) \
$(prefix)/rtems/make
$(prefix)/rtems/make/compilers:
@INSTALL@ $(INSTDIRFLAGS) $@
install_files:: $(COMPILER_FILES) $(prefix)/rtems/make/compilers
@INSTALL@ $(INSTDATAFLAGS) $(COMPILER_FILES) \
$(prefix)/rtems/make/compilers
$(prefix)/rtems/make/custom:
@INSTALL@ $(INSTDIRFLAGS) $@
install_files:: $(CUSTOM_FILES) $(prefix)/rtems/make/custom
@INSTALL@ $(INSTDATAFLAGS) $(CUSTOM_FILES) \
$(prefix)/rtems/make/custom
$(prefix)/rtems/make/Templates:
@INSTALL@ $(INSTDIRFLAGS) $@
install_files:: $(TEMPLATE_FILES) $(prefix)/rtems/make/Templates
@INSTALL@ $(INSTDATAFLAGS) $(TEMPLATE_FILES) \
$(prefix)/rtems/make/Templates