xref: /haiku/build/jam/DefaultBuildProfiles (revision 46d4471af7fad4e52cfbd09174598cf5318aceed)
1# set HAIKU_BUILD_TYPE early
2switch $(HAIKU_BUILD_PROFILE) {
3	case "bootstrap-*" : {
4		HAIKU_BUILD_TYPE = bootstrap ;
5		EnableBuildFeatures bootstrap_image ;
6
7		# Add a third pseudo target for the platform used when building anything
8		# for stage0 of the bootstrap process.
9		NotFile bootstrap_stage0 ;
10
11		HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
12		TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
13	}
14
15	case "minimum-*" : {
16		HAIKU_BUILD_TYPE = minimum ;
17		EnableBuildFeatures minimum_image ;
18
19		HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ;
20		TARGET_DEFINES += HAIKU_MINIMUM_BUILD ;
21	}
22
23	case "*" : {
24		HAIKU_BUILD_TYPE = regular ;
25		EnableBuildFeatures regular_image ;
26
27		HAIKU_DEFINES += HAIKU_REGULAR_BUILD ;
28		TARGET_DEFINES += HAIKU_REGULAR_BUILD ;
29	}
30}
31Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ;
32
33
34rule DefineDefaultBuildProfiles
35{
36	# release profiles
37	DefineBuildProfile release-raw : image : "haiku-release.image" ;
38	DefineBuildProfile release-vmware : vmware-image : "haiku-release.vmdk" ;
39	DefineBuildProfile release-cd : cd-image : "haiku-release.iso" ;
40	DefineBuildProfile release-anyboot : anyboot-image
41		: "haiku-release-anyboot.image" ;
42
43	# nightly profiles
44	DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ;
45	DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ;
46	DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ;
47	DefineBuildProfile nightly-anyboot : anyboot-image
48		: "haiku-nightly-anyboot.image" ;
49
50	# bootstrap profiles
51	DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ;
52	DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-bootstrap.mmc" ;
53	DefineBuildProfile bootstrap-vmware : vmware-image
54		: "haiku-bootstrap.vmdk" ;
55
56	# minimum profiles
57	DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ;
58	DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ;
59	DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ;
60	DefineBuildProfile minimum-anyboot : anyboot-image
61		: "haiku-minimum-anyboot.image" ;
62
63
64	switch $(HAIKU_BUILD_PROFILE) {
65		case "release-*" : {
66			Echo Building Haiku R1/development preview ;
67			HAIKU_ROOT_USER_NAME ?= user ;
68			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
69			AddGroupToHaikuImage party : 101 : user sshd ;
70			HAIKU_IMAGE_HOST_NAME ?= shredder ;
71			HAIKU_IMAGE_SIZE ?= 800 ;
72
73			AddHaikuImagePackages
74				bepdf
75				cvs
76				keymapswitcher
77				llvm
78				man
79				mercurial
80				nano
81				openssh
82				p7zip
83				pe
84				python
85				subversion
86				timgmsoundfont
87				vision
88				wpa_supplicant
89				wqy_microhei
90				# xz_utils can't be built with gcc2, so we install it for
91				# primary gcc 4 architectures or gcc 2 hybrids.
92				xz_utils@!gcc2
93				gcc2 @{ xz_utils_x86@secondary_x86 }@
94				;
95
96			local architectureObject ;
97			for architectureObject in [ MultiArchSubDirSetup ] {
98				on $(architectureObject) {
99					AddHaikuImagePackages openssl wonderbrush@gcc2 ;
100				}
101			}
102
103			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
104
105			# WebPositive can only built for x86_gcc2, x86 and x86_64
106			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
107				AddOptionalHaikuImagePackages WebPositive ;
108			} else {
109				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
110			}
111		}
112
113		case "alpha-*" : {
114			Echo The alpha-* build profiles have been renamed to release-* ;
115		}
116
117		case "nightly-*" : {
118			Echo Building Haiku Nightly ;
119			HAIKU_ROOT_USER_NAME ?= user ;
120			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
121			AddGroupToHaikuImage party : 101 : user sshd ;
122			HAIKU_IMAGE_HOST_NAME ?= shredder ;
123			HAIKU_IMAGE_SIZE ?= 600 ;
124
125			AddHaikuImagePackages
126				man
127				nano
128				openssh
129				openssl
130				p7zip
131				pe
132				vision
133				wpa_supplicant
134				# xz_utils can't be built with gcc2, so we install it for
135				# primary gcc 4 architectures or gcc 2 hybrids.
136				xz_utils@!gcc2
137				gcc2 @{ xz_utils_x86@secondary_x86 }@
138				;
139
140			AddOptionalHaikuImagePackages Development Git ;
141
142			# WebPositive can only built for x86_gcc2, x86 and x86_64
143			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
144				AddOptionalHaikuImagePackages WebPositive ;
145			} else {
146				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
147			}
148		}
149
150		case "bootstrap-*" : {
151			Echo Building Haiku Bootstrap ;
152			HAIKU_IMAGE_HOST_NAME ?= shredder ;
153			HAIKU_IMAGE_SIZE ?= 20000 ;
154
155			AddHaikuImagePackages
156				autoconf
157				automake
158				binutils
159				bison
160				curl_devel
161				flex
162				freetype_devel
163				gawk
164				gcc
165				grep
166				haikuporter
167				less
168				libtool
169				libtool_libltdl
170				m4
171				make
172				ncurses
173				ncurses_devel
174				python
175				sed
176				texinfo
177				zlib_devel
178				;
179
180			# secondary architecture packages
181			local architectureObject ;
182			for architectureObject
183					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
184				on $(architectureObject) {
185					AddHaikuImagePackages
186						binutils
187						curl
188						curl_devel
189						freetype
190						freetype_devel
191						gcc
192						icu
193						libsolv
194						ncurses
195						ncurses_devel
196						zlib
197						zlib_devel
198						;
199				}
200			}
201
202			AddOptionalHaikuImagePackages DevelopmentMin ;
203		}
204
205		case "minimum-*" : {
206			Echo Building Haiku Minimum Target ;
207			HAIKU_IMAGE_HOST_NAME ?= shredder ;
208
209			AddHaikuImagePackages
210				;
211		}
212	}
213
214
215	# Uncomment in official release branch.
216	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
217	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
218
219
220	# If a build profile was specified on the command line, now is the time to
221	# check whether it is unknown or one of the default profiles.
222	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
223		# define the obvious default profiles
224		if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install
225				vmware-image {
226			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
227		} else {
228			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
229		}
230	}
231}
232