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

1 Build Framework
4 The perf build framework was adopted from the kernel build system, hence the
7 Basically the user provides set of 'Build' files that list objects and
8 directories to nest for specific target to be build.
10 Unlike the kernel we don't have a single build object 'obj-y' list that where
11 we setup source objects, but we support more. This allows one 'Build' file to
12 carry a sources list for multiple build objects.
15 Build framework makefiles
16 -------------------------
18 The build framework consists of 2 Makefiles:
20 Build.include
21 Makefile.build
23 While the 'Build.include' file contains just some generic definitions, the
24 'Makefile.build' file is the makefile used from the outside. It's
27 $ make -f tools/build/Makefile.build srctree=$(KSRC) dir=$(DIR) obj=$(OBJECT)
31 KSRC - is the path to kernel sources
32 DIR - is the path to the project to be built
33 OBJECT - is the name of the build object
36 called $(OBJECT)-in.o:
38 $ ls $(DIR)/$(OBJECT)-in.o
40 which includes all compiled sources described in 'Build' makefiles.
43 Build makefiles
44 ---------------
46 The user supplies 'Build' makefiles that contains a objects list, and connects
47 the build to nested directories.
58 Out of which you build the 'ex' binary ' and the 'libex.a' library:
60 'ex' - consists of 'a.o', 'b.o' and libex.a
61 'libex.a' - consists of 'c.o', 'd.o', 'e.o' and 'f.o'
63 The build framework does not create the 'ex' and 'libex.a' binaries for you, it
66 To follow the above example, the user provides following 'Build' files:
68 ex/Build:
69 ex-y += a.o
70 ex-y += b.o
71 ex-y += b.o # duplicates in the lists are allowed
73 libex-y += c.o
74 libex-y += d.o
75 libex-y += arch/
77 ex/arch/Build:
78 libex-y += e.o
79 libex-y += f.o
83 $ make -f tools/build/Makefile.build dir=. obj=ex
84 $ make -f tools/build/Makefile.build dir=. obj=libex
88 ex/ex-in.o
89 ex/libex-in.o
91 that contain request objects names in Build files.
95 $ ar rcs libex.a libex-in.o
96 $ gcc -o ex ex-in.o libex.a
98 You can check the 'ex' example in 'tools/build/tests/ex' for more details.
102 ----------------
104 The tools/build/Makefile.include makefile could be included
109 - build macro definition:
110 build := -f $(srctree)/tools/build/Makefile.build dir=. obj
112 to make it easier to invoke build like:
113 make $(build)=ex
117 ------
118 It is necessary to build the fixdep helper before invoking the build.
123 Rules
124 -----
126 The build framework provides standard compilation rules to handle .S and .c
134 ------
138 CFLAGS_perf.o += '...' - adds CFLAGS for perf.o object
139 CFLAGS_gtk += '...' - adds CFLAGS for gtk build object
140 CFLAGS_REMOVE_perf.o += '...' - removes CFLAGS for perf.o object
141 CFLAGS_REMOVE_gtk += '...' - removes CFLAGS for gtk build object
143 This C flags changes has the scope of the Build makefile they are defined in.
147 ------------
151 - Command line used to built that object
154 - Dependency rules generated by 'gcc -Wp,-MD,...'
157 All existing '.cmd' files are included in the Build process to follow properly
161 Single rules
162 ------------
164 It's possible to build single object file by choice, like: