Changeset 4896576c in rtems
- Timestamp:
- 01/28/03 18:44:38 (20 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 34e0189a
- Parents:
- 832d4bfd
- Location:
- doc/bsp_howto
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/bsp_howto/ChangeLog
r832d4bfd r4896576c 1 2003-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 1 6 2003-01-25 Ralf Corsepius <corsepiu@faw.uni-ulm.de> 2 7 -
doc/bsp_howto/makefiles.t
r832d4bfd r4896576c 36 36 @section Makefiles Used During The BSP Building Process 37 37 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 38 RTEMS uses the @b{GNU automake} and @b{GNU autoconf} automatic 39 configuration package. Consequently, there are a number of 40 automatically generated files in each directory in the RTEMS 41 source tree. The @code{bootstrap} script found in the top level 42 directory of the RTEMS source tree is executed to produce the 43 automatically generated files. That script must be run from 44 a directory with a @code{configure.ac} file in it. 45 46 There is a file named @code{Makefile.am} in each directory of a BSP. 47 This file is used by @b{automake} to produce the file 48 named @code{Makefile.in} which is also found in each directory of a BSP. 49 The configure process specializes the @code{Makefile.in} files at 50 the time that RTEMS 41 51 is configured for a specific development host and target. Makefiles 42 52 are 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 53 necessary for the BSP developer to provide the @code{Makefile.am} 54 files and generate the @code{Makefile.in} files. Most of the 55 time, it is possible to copy the @code{Makefile.am} from another 45 56 similar directory and edit it. 46 57 47 The @code{Makefile} files generated are processed when building48 RTEMS for a given BSP.49 50 The BSP developer is responsible for generating @code{Makefile. in}58 The @code{Makefile} files generated are processed when configuring 59 and building RTEMS for a given BSP. 60 61 The BSP developer is responsible for generating @code{Makefile.am} 51 62 files which properly build all the files associated with their BSP. 52 63 There are generally three types of Makefiles in a BSP source tree: … … 64 75 a set of subdirectories in a particular order. This order is usually 65 76 chosen to insure that build dependencies are properly processed. 66 Most BSPs only have one Directory class Makefile. The @code{Makefile. in}77 Most BSPs only have one Directory class Makefile. The @code{Makefile.am} 67 78 in 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: 79 following Makefile fragment shows how a BSP would specify the 80 directories to be built and their order: 71 81 72 82 @example 73 NETWORKING_DRIVER_yes_V = network74 NETWORKING_DRIVER = $(NETWORKING_DRIVER_$(HAS_NETWORKING)_V)75 76 [...]77 78 83 SUB_DIRS=include start340 startup clock console timer \ 79 $(NETWORKING_DRIVER)wrapup84 network wrapup 80 85 @end example 81 86 82 This fragment states that all the directories have to be processed,83 except for the @code{network} directory which is included only if the84 user configured networking.85 86 87 @subsection Source Directory Makefiles 87 88 88 There is a @code{Makefile. in} in most of the directories in a BSP. This89 There is a @code{Makefile.am} in most of the directories in a BSP. This 89 90 class of Makefile lists the files to be built as part of the driver. 90 91 When 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 92 the new files to the list of files to be built in the @code{Makefile.am} 93 and 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 97 only processed during the configure 94 98 process 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 99 a BSP and adding a new file to a @code{Makefile.am}, the 100 already generated @code{Makefile} will not automatically 101 include the new references unless you configured RTEMS with the 102 @code{--enable-maintainer-mode} option. 103 Otherwise, the new file not being be taken into account! 104 105 If adding a new directory, be sure to add it to the list of 106 automatically generated files in the BSP's @code{configure.ac} 107 script. 105 108 106 109 @subsection Wrapup Makefile … … 193 196 START_BASE=start340 194 197 195 [...]196 197 198 # This make-exe macro is used in template makefiles to build the 198 199 # final executable. Any other commands to follow, just as using 199 200 # objcopy to build a PROM image or converting the executable to binary. 200 201 201 ifeq ($(RTEMS_USE_GCC272),yes)202 # This has rules to link an application if an older version of GCC is203 # to be used with this BSP. It is not required for a BSP to support204 # older versions of GCC. This option is supported in some of the205 # BSPs which already had this support.206 [...]207 else208 # This has rules to link an application using gcc 2.8 or newer.209 # All BSPs should support this. This version is required to support210 # GNAT/RTEMS.211 202 define make-exe 212 203 $(CC) $(CFLAGS) $(CFLAGS_LD) -o $(basename $@@).exe $(LINK_OBJS) -
doc/bsp_howto/support.t
r832d4bfd r4896576c 190 190 found in @code{c/src/lib/libbsp/shared/sbrk.c}. Many of the BSPs 191 191 use this shared implementation. In order to use this implementation, 192 the file @code{Makefile. in} in the BSP's @code{startup} directory192 the file @code{Makefile.am} in the BSP's @code{startup} directory 193 193 must be modified so that the @code{$VPATH} variable searches 194 194 both the @code{startup} directory and the shared directory. The following 195 195 illustates the @code{VPATH} setting in the PowerPC psim BSP's 196 @code{startup/Makefile. in}:196 @code{startup/Makefile.am}: 197 197 198 198 @example
Note: See TracChangeset
for help on using the changeset viewer.