Changeset 4896576c in rtems


Ignore:
Timestamp:
Jan 28, 2003, 6:44:38 PM (18 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
34e0189a
Parents:
832d4bfd
Message:

2003-01-28 Joel Sherrill <joel@…>

  • makefiles.t, support.t: Updated to reflect use of automake in addition to autoconf.
Location:
doc/bsp_howto
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • doc/bsp_howto/ChangeLog

    r832d4bfd r4896576c  
     12003-01-28      Joel Sherrill <joel@OARcorp.com>
     2
     3        * makefiles.t, support.t: Updated to reflect use of automake in
     4        addition to autoconf.
     5
    162003-01-25      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    27
  • doc/bsp_howto/makefiles.t

    r832d4bfd r4896576c  
    3636@section Makefiles Used During The BSP Building Process
    3737
    38 There is a file named @code{Makefile.in} in each directory of a BSP.
    39 RTEMS uses the @b{GNU autoconf} automatic configuration package.
    40 This tool specializes the @code{Makefile.in} files at the time that RTEMS
     38RTEMS uses the @b{GNU automake} and @b{GNU autoconf} automatic
     39configuration package.  Consequently, there are a number of
     40automatically generated files in each directory in the RTEMS
     41source tree.  The @code{bootstrap} script found in the top level
     42directory of the RTEMS source tree is executed to produce the
     43automatically generated files.  That script must be run from
     44a directory with a @code{configure.ac} file in it.
     45
     46There is a file named @code{Makefile.am} in each directory of a BSP.
     47This file is used by @b{automake} to produce the file
     48named @code{Makefile.in} which is also found in each directory of a BSP.
     49The configure process specializes the @code{Makefile.in} files at
     50the time that RTEMS
    4151is configured for a specific development host and target.  Makefiles
    4252are automatically generated from the @code{Makefile.in} files.  It is
    43 necessary for the BSP developer to provide these files.  Most of the
    44 time, it is possible to copy the @code{Makefile.in} from another
     53necessary for the BSP developer to provide the @code{Makefile.am}
     54files and generate the @code{Makefile.in} files.  Most of the
     55time, it is possible to copy the @code{Makefile.am} from another
    4556similar directory and edit it.
    4657
    47 The @code{Makefile} files generated are processed when building
    48 RTEMS for a given BSP.
    49 
    50 The BSP developer is responsible for generating @code{Makefile.in}
     58The @code{Makefile} files generated are processed when configuring
     59and building RTEMS for a given BSP.
     60
     61The BSP developer is responsible for generating @code{Makefile.am}
    5162files which properly build all the files associated with their BSP.
    5263There are generally three types of Makefiles in a BSP source tree:
     
    6475a set of subdirectories in a particular order.  This order is usually
    6576chosen to insure that build dependencies are properly processed.
    66 Most BSPs only have one Directory class Makefile.  The @code{Makefile.in}
     77Most BSPs only have one Directory class Makefile.  The @code{Makefile.am}
    6778in the BSP root directory (@code{c/src/lib/libbsp/CPU/BSP}) specifies
    68 which directories are to be built for this BSP. For example, the
    69 following Makefile fragment shows how a BSP would only build the
    70 networking device driver if HAS_NETWORKING was defined:
     79following Makefile fragment shows how a BSP would specify the
     80directories to be built and their order:
    7181
    7282@example
    73 NETWORKING_DRIVER_yes_V = network
    74 NETWORKING_DRIVER = $(NETWORKING_DRIVER_$(HAS_NETWORKING)_V)
    75 
    76 [...]
    77 
    7883SUB_DIRS=include start340 startup clock console timer \
    79     $(NETWORKING_DRIVER) wrapup
     84    network wrapup
    8085@end example
    8186
    82 This fragment states that all the directories have to be processed,
    83 except for the @code{network} directory which is included only if the
    84 user configured networking.
    85 
    8687@subsection Source Directory Makefiles
    8788
    88 There is a @code{Makefile.in} in most of the directories in a BSP. This
     89There is a @code{Makefile.am} in most of the directories in a BSP. This
    8990class of Makefile lists the files to be built as part of the driver.
    9091When adding new files to an existing directory, Do not forget to add
    91 the new files to the list of files to be built in the @code{Makefile.in}.
    92 
    93 @b{NOTE:} The @code{Makefile.in} files are ONLY processed during the configure
     92the new files to the list of files to be built in the @code{Makefile.am}
     93and run @code{bootstrap}.
     94
     95@b{NOTE:} The @code{Makefile.am} files are ONLY processed by
     96@code{bootstrap} and the resulting @code{Makefile.in} files are
     97only processed during the configure
    9498process of a RTEMS build. Therefore, when developing
    95 a BSP and adding a new file to a @code{Makefile.in}, the
    96 already generated @code{Makefile} will not include the new references.
    97 This results in the new file not being be taken into account!
    98 The @code{configure} script must be run again or the @code{Makefile}
    99 (the result of the configure process) modified by hand.  This file will
    100 be in a directory such as the following:
    101 
    102 @example
    103 MY_BUILD_DIR/c/src/lib/libbsp/CPU/BSP/DRIVER
    104 @end example
     99a BSP and adding a new file to a @code{Makefile.am}, the
     100already generated @code{Makefile} will not automatically
     101include the new references unless you configured RTEMS with the
     102@code{--enable-maintainer-mode} option.
     103Otherwise, the new file not being be taken into account!
     104
     105If adding a new directory, be sure to add it to the list of
     106automatically generated files in the BSP's @code{configure.ac}
     107script.
    105108
    106109@subsection Wrapup Makefile
     
    193196START_BASE=start340
    194197
    195 [...]
    196 
    197198# This make-exe macro is used in template makefiles to build the
    198199# final executable. Any other commands to follow, just as using
    199200# objcopy to build a PROM image or converting the executable to binary.
    200201
    201 ifeq ($(RTEMS_USE_GCC272),yes)
    202 # This has rules to link an application if an older version of GCC is
    203 # to be used with this BSP.  It is not required for a BSP to support
    204 # older versions of GCC.  This option is supported in some of the
    205 # BSPs which already had this support.
    206 [...]
    207 else
    208 # This has rules to link an application using gcc 2.8 or newer.
    209 # All BSPs should support this.  This version is required to support
    210 # GNAT/RTEMS.
    211202define make-exe
    212203        $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@@).exe $(LINK_OBJS)
  • doc/bsp_howto/support.t

    r832d4bfd r4896576c  
    190190found in @code{c/src/lib/libbsp/shared/sbrk.c}.  Many of the BSPs
    191191use this shared implementation.  In order to use this implementation,
    192 the file @code{Makefile.in} in the BSP's @code{startup} directory
     192the file @code{Makefile.am} in the BSP's @code{startup} directory
    193193must be modified so that the @code{$VPATH} variable searches
    194194both the @code{startup} directory and the shared directory.  The following
    195195illustates the @code{VPATH} setting in the PowerPC psim BSP's
    196 @code{startup/Makefile.in}:
     196@code{startup/Makefile.am}:
    197197
    198198@example
Note: See TracChangeset for help on using the changeset viewer.