xref: /haiku/build/jam/UserBuildConfig.sample (revision 603b62fe609c885a65671d06649520a0581d0e22)
1# UserBuildConfig can be used to customize the build according to your needs.
2# If existent it is included by the build system, but it is ignored by svn.
3# This file documents a few examples, what can be done.
4
5
6# Adjusting Build Variables
7
8# The following variables can be configured per subdirectory (or subtree) or
9# even per object file:
10#
11#	CCFLAGS C++FLAGS DEBUG DEFINES HDRS LINKFLAGS OPTIM OPTIMIZE SYSHDRS
12#	WARNINGS
13#	HOST_WARNING_CCFLAGS HOST_WARNING_C++FLAGS
14#	TARGET_WARNING_CCFLAGS TARGET_WARNING_C++FLAGS
15#	PLATFORM SUPPORTED_PLATFORMS
16#
17# The following examples would work analogously for any of these variables.
18
19# Turn off warnings in directory src/system/kernel. As fourth (scope) parameter
20# "local" is specified, which means, that this setting applies only to the
21# given directory, but not any of its subdirectories.
22#SetConfigVar WARNINGS : HAIKU_TOP src system kernel : 0 : local ;
23
24# Set the debug level for directory src/system/boot/loader and recursively all
25# of its subdirectories (scope is "global") to 1. All affected generated files
26# will be put into another subtree of the "generated" directory, which allows
27# for fast switching between normal and debug builds.
28#SetConfigVar DEBUG : HAIKU_TOP src system boot loader : 1 : global ;
29
30# Add "RUN_WITHOUT_REGISTRAR" to the DEFINES for the directory src/kits and
31# all of its subdirectories.
32#AppendToConfigVar DEFINES : HAIKU_TOP src kits : RUN_WITHOUT_REGISTRAR
33#	: global ;
34
35# Set the debug level for file src/bin/gdb/gdb/haiku-nat.c (note, that
36# the object file must be specified) to 1. It is worth mentioning, that the
37# executable the object file is linked into (gdb), will still be placed in
38# generated/objects/.../release/... Only when setting DEBUG for the executable,
39# too, it will be placed in .../debug_1/.... Apart from that, the DEBUG variable
40# has no effect on executables or other shared objects.
41#DEBUG on <src!bin!gdb!gdb!>haiku-nat.o = 1 ;
42
43
44# Haiku Image Related Modifications
45
46# Create a 100 MB image at /tmp/walter.image.
47#HAIKU_IMAGE_NAME	= walter.image ;
48#HAIKU_IMAGE_DIR		= /tmp ;
49#HAIKU_IMAGE_SIZE	= 100 ;
50
51# Name the VMWare image walter.vmdk (in directory $(HAIKU_IMAGE_DIR)).
52#HAIKU_VMWARE_IMAGE_NAME	= walter.vmdk ;
53
54# Install Haiku in directory /Haiku.
55#HAIKU_INSTALL_DIR = /Haiku ;
56
57# If the image does already exist it won't be zeroed out. It will nevertheless
58# freshly be initialized with BFS. Useful when installing Haiku on a partition.
59#HAIKU_DONT_CLEAR_IMAGE = 1 ;
60
61
62# Affects the haiku-image, haiku-vmware-image, and install-haiku targets. Only
63# targets on which the HAIKU_INCLUDE_IN_IMAGE variable has been set will be
64# updated in the image file/installation directory.
65# The update-image, update-vmware-image, and update-install targets always invoke
66# this rule, so one likely doesn't ever need to do it manually.
67#SetUpdateHaikuImageOnly 1 ;
68
69# libbe.so and the kernel will be updated on image updates. Note that this
70# generally doesn't work for pseudo targets (it does where special support
71# has been added, like for "kernel").
72#HAIKU_INCLUDE_IN_IMAGE on libbe.so kernel = 1 ;
73
74# Add "crashing_app" to the beos/bin directory of the Haiku image/installation.
75# Note, that this also makes the image depend on the target, i.e. it is
76# automatically updated when the image is built.
77#AddFilesToHaikuImage beos bin : crashing_app ;
78
79# Make a symlink to home/config/bin/crash.
80#AddSymlinkToHaikuImage home config bin : /beos/bin/crashing_app : crash ;
81
82# Adds the source directories src/kits/storage and src/tests/servers/debug
83# (recursively) to the image (as /boot/home/HaikuSources/src/kits/storage
84# and /boot/home/HaikuSources/src/tests/servers/debug respectively).
85# Note that the second directory will also be copied, if the image will only
86# be updated; the first one won't in that case.
87#AddSourceDirectoryToHaikuImage src/kits/storage ;
88#AddSourceDirectoryToHaikuImage src/tests/servers/debug : 1 ;
89
90# Unzips the given zip archive onto the image under /boot/develop/tools.
91#UnzipArchiveToHaikuImage develop tools
92#	: /home/bonefish/develop/haiku/misc/gcc-2.95.3-beos-070218/gcc-2.95.3_binutils-2.17_rel-070218.zip ;
93
94# Adds the optional package WonderBrush to the image. The package is downloaded
95# via wget (i.e. wget must be installed).
96#AddOptionalHaikuImagePackages WonderBrush ;
97
98# Adds the optional package Vision to the image. See above.
99#AddOptionalHaikuImagePackages Vision ;
100
101# Adds the optional package Pe to the image. See above.
102#AddOptionalHaikuImagePackages Pe ;
103
104# Adds the optional package Links to the image. See above.
105#AddOptionalHaikuImagePackages Links ;
106
107# Add all available optional packages.
108#HAIKU_ADD_ALL_OPTIONAL_PACKAGES = 1 ;
109
110# Specify scripts that shall be run when populating the image/installation
111# directory. The "early" script is run before anything has been copied onto
112# the image/into the installation directory. The "late" script is run after
113# everything has been copied, but before the MIME database is installed.
114#HAIKU_IMAGE_EARLY_USER_SCRIPTS	= $(HAIKU_TOP)/../early-image-script.sh ;
115#HAIKU_IMAGE_LATE_USER_SCRIPTS	= $(HAIKU_TOP)/../late-image-script.sh ;
116
117
118# Creating Sourceable Shell Scripts
119
120# If you use shell scripts (e.g. for testing) that need to access targets or
121# build system properties, you can tell the build system to generate a
122# variables defining shell script you can source from your shell script.
123
124# General setup for the shell script to generate. Name is test.inc, located
125# in the output directory.
126#MakeLocate test.inc : $(HAIKU_OUTPUT_DIR) ;
127#Always test.inc ;
128
129# Define variable "outputDir" in the shell script, with the value of
130# HAIKU_OUTPUT_DIR.
131#AddVariableToScript test.inc : outputDir : $(HAIKU_OUTPUT_DIR) ;
132
133# Define variables "bfsShell" and "fsShellCommand" referring to the
134# generated bfs_shell and fs_shell_command respectively.
135#AddTargetVariableToScript test.inc : bfs_shell : bfsShell ;
136#AddTargetVariableToScript test.inc : fs_shell_command : fsShellCommand ;
137
138# If no variable name is given, the name (without grist) of the target is
139# used, i.e. a variable "rc" referring to the rc command built for the host
140# platform is defined in the script.
141#AddTargetVariableToScript test.inc : <build>rc ;
142
143
144# Optimizing Jamfile Parsing Times
145
146# Setting this variable will prevent the root Jamfile to include the Jamfile
147# in the src directory. Instead only the directories required for building the
148# build tools are included. Only useful in combination with DeferredSubInclude.
149#HAIKU_DONT_INCLUDE_SRC = 1 ;
150
151# Schedule the given subdirectory for inclusion at the end of the root
152# Jamfile (directly using SubInclude here is not possible). Using this
153# feature together with HAIKU_DONT_INCLUDE_SRC allows developers working
154# only on a subproject to reduce Jamfile parsing times considerably.
155#DeferredSubInclude HAIKU_TOP src tests add-ons kernel file_systems
156#	userlandfs ;
157
158
159# Copy the posix test suite onto the image (or on the installation) into
160# "home/posixtestsuite" directory, including the run script.
161#HAIKU_ADD_POSIX_TEST_SUITE_TO_IMAGE = 1 ;
162