• Home
  • Raw
  • Download

Lines Matching +full:build +full:- +full:rules

1 Short introduction into LTP build system
15 -----------
20 (maintenance). Furthermore, proper option-based cross-compilation was
22 system, and the appropriate implicit / static rules hadn't been configured to
23 compile into multiple object directories for out-of-tree build support (ease of
32 ------
36 build the system.
39 directly tie into applications, e.g. baz.c -> baz):
41 -------------------------------------------------------------------------------
43 |--> Makefile
45 --> bar/
47 --> Makefile
49 --> baz.c
50 -------------------------------------------------------------------------------
54 -------------------------------------------------------------------------------
57 # Copyright disclaimer goes here -- please use GPLv2.
67 # Copyright disclaimer goes here -- please use GPLv2.
74 -------------------------------------------------------------------------------
77 --------------
79 Some of the tests need to build kernel modules, happily LTP has
82 -------------------------------------------------------------------------------
85 obj-m := module01.o
100 -------------------------------------------------------------------------------
102 This is example Makefile that allows you build kernel modules inside of LTP.
103 The prerequisites for the build are detected by the 'configure' script.
106 version for which the build system tries to build the module.
109 internal API so that if module fails to build the failure is ignored both on
110 build and installation. If the userspace counterpart of the test fails to load
114 Makefile is executed twice, once by LTP build system and once by kernel
116 details on external module build.
118 Make Rules and Make Variables
119 -----------------------------
121 When using make rules, avoid writing ad hoc rules like:
123 -------------------------------------------------------------------------------
125 cc -I../../include $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(LDLIBS) \
126 -o [prog] [dependencies]
127 -------------------------------------------------------------------------------
129 etc. This makes cross-compilation and determinism difficult, if not impossible.
130 Besides, implicit rules are your friends and as long as you use `MAKEOPTS=;' in
131 the top-level caller (or do $(subst r,$(MAKEOPTS)) to remove -r), the compile
135 -------------------------------------------------------------------------------
144 $(CPPFLAGS) : Preprocessor flags, e.g. -I arguments.
146 $(DEBUG_CFLAGS) : Debug flags to pass to $(CC), -g, etc.
151 to build files named *-payload.o.
156 $(LDFLAGS) : What to pass in to the linker, including -L arguments
157 and other ld arguments, apart from -l library
161 when LD := $(CC), e.g. `-Wl,-foo', as opposed to
162 `-foo'.
164 $(LDLIBS) : Libraries to pass to the linker (e.g. -lltp, etc).
168 $(OPT_CFLAGS) : Optimization flags to pass into the C compiler, -O2,
169 etc. If you specify -O2 or higher, you should also
170 specify -fno-strict-aliasing, because of gcc
171 fstrict-aliasing optimization bugs in the tree
172 optimizer. Search for `fstrict-aliasing optimization
176 1. tree-optimization/17510
177 2. tree-optimization/39100
180 logic in the tree-optimization portion of the gcc
185 $(WCFLAGS) : Warning flags to pass to $(CC), e.g. -Werror,
186 -Wall, etc.
187 -------------------------------------------------------------------------------
190 ---------------------
198 ------------------------------
203 link:http://www.gnu.org/software/make/manual/make.html#Implicit-Rules[Implicit Rules]
204 link:http://www.gnu.org/software/make/manual/make.html#Using-Variables[Variables and Expansion]
205 link:http://www.gnu.org/software/make/manual/make.html#Origin-Function[Origin Use]
206 link:http://www.gnu.org/software/make/manual/make.html#Directory-Search[VPath Use]
209 -----------------
215 ------------
218 build structure / source tree in general.