xref: /haiku/build/jam/DefaultBuildProfiles (revision 89f1fd6512c10854013d231a85289797e47c7543)
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.iso" ;
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.iso" ;
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	DefineBuildProfile bootstrap-anyboot : anyboot-image
56		: "haiku-bootstrap-anyboot.iso" ;
57
58	# minimum profiles
59	DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ;
60	DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ;
61	DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ;
62	DefineBuildProfile minimum-cd : cd-image : "haiku-minimum.iso" ;
63	DefineBuildProfile minimum-anyboot : anyboot-image
64		: "haiku-minimum-anyboot.iso" ;
65
66	switch $(HAIKU_BUILD_PROFILE) {
67		case "release-*" : {
68			Echo Building Haiku R1/development preview ;
69			HAIKU_ROOT_USER_NAME ?= user ;
70			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
71			AddGroupToHaikuImage party : 101 : user sshd ;
72			HAIKU_IMAGE_HOST_NAME ?= shredder ;
73			if $(DEBUG) != 0 {
74				HAIKU_IMAGE_SIZE ?= 1300 ;
75			}
76			if $(HAIKU_INCLUDE_SOURCES) = 1 {
77				HAIKU_IMAGE_SIZE ?= 1100 ;
78			} else {
79				HAIKU_IMAGE_SIZE ?= 690 ;
80			}
81
82			AddHaikuImagePackages
83				bepdf
84				keymapswitcher
85				llvm
86				man
87				nano
88				noto
89				noto_sans_cjk_jp
90				openssh
91				p7zip
92				pdfwriter
93				pe
94				python
95				timgmsoundfont
96				vision
97				wpa_supplicant
98				wqy_microhei
99				# xz_utils can't be built with gcc2, so we install it for
100				# primary gcc 4 architectures or gcc 2 hybrids.
101				xz_utils@!gcc2
102				gcc2 @{ xz_utils_x86@secondary_x86 }@
103				;
104			AddHaikuImageSourcePackages
105				bepdf
106				man
107				mercurial
108				nano
109				p7zip
110				gcc
111				;
112
113			local architectureObject ;
114			for architectureObject in [ MultiArchSubDirSetup ] {
115				on $(architectureObject) {
116					AddHaikuImagePackages openssl wonderbrush@gcc2 ;
117				}
118			}
119
120			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
121
122			# WebPositive can only built for x86_gcc2, x86 and x86_64
123			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
124				AddOptionalHaikuImagePackages WebPositive ;
125			} else {
126				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
127			}
128		}
129
130		case "alpha-*" : {
131			Echo The alpha-* build profiles have been renamed to release-* ;
132			Exit ;
133		}
134
135		case "nightly-*" : {
136			Echo Building Haiku Nightly ;
137			HAIKU_ROOT_USER_NAME ?= user ;
138			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
139			AddGroupToHaikuImage party : 101 : user sshd ;
140			HAIKU_IMAGE_HOST_NAME ?= shredder ;
141			if $(DEBUG) != 0 {
142				HAIKU_IMAGE_SIZE ?= 850 ;
143			}
144			HAIKU_IMAGE_SIZE ?= 600 ;
145			HAIKU_NIGHTLY_BUILD = 1 ;
146
147			AddHaikuImagePackages
148				man
149				nano
150				noto
151				openssh
152				openssl
153				p7zip
154				pe
155				vision
156				wpa_supplicant
157				# xz_utils can't be built with gcc2, so we install it for
158				# primary gcc 4 architectures or gcc 2 hybrids.
159				xz_utils@!gcc2
160				gcc2 @{ xz_utils_x86@secondary_x86 }@
161				;
162			AddHaikuImageSourcePackages
163				man
164				nano
165				p7zip
166				gcc
167				;
168
169			AddOptionalHaikuImagePackages Development Git ;
170
171			# WebPositive can only built for x86_gcc2, x86 and x86_64
172			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
173				AddOptionalHaikuImagePackages WebPositive ;
174			} else {
175				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
176			}
177		}
178
179		case "minimum-*" : {
180			Echo Building Haiku Minimum Target ;
181			HAIKU_IMAGE_HOST_NAME ?= shredder ;
182			if $(DEBUG) != 0 {
183				HAIKU_IMAGE_SIZE ?= 450 ;
184			}
185
186			AddHaikuImagePackages
187				;
188		}
189
190		case "bootstrap-*" : {
191			Echo Building Haiku Bootstrap ;
192			HAIKU_IMAGE_HOST_NAME ?= shredder ;
193			HAIKU_IMAGE_SIZE ?= 20000 ;
194
195			AddHaikuImagePackages
196				binutils
197				bison
198				curl_devel
199				expat
200				flex
201				freetype_devel
202				gawk
203				gcc
204				grep
205				haikuporter
206				less
207				libedit
208				libedit_devel
209				m4
210				make
211				ncurses6
212				ncurses6_devel
213				noto
214				python
215				sed
216				texinfo
217				zlib_devel
218				;
219
220			# secondary architecture packages
221			local architectureObject ;
222			for architectureObject
223					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
224				on $(architectureObject) {
225					AddHaikuImagePackages
226						binutils
227						curl
228						curl_devel
229						expat
230						freetype
231						freetype_devel
232						gcc
233						icu
234						libsolv
235						libedit
236						libedit_devel
237						ncurses6
238						ncurses6_devel
239						zlib
240						zlib_devel
241						;
242				}
243			}
244
245			AddOptionalHaikuImagePackages DevelopmentMin ;
246		}
247	}
248
249
250	# Uncomment in official release branch.
251	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
252	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
253
254
255	# If a build profile was specified on the command line, now is the time to
256	# check whether it is unknown or one of the default profiles.
257	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
258		# define the obvious default profiles
259		if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install
260				vmware-image {
261			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
262		} else {
263			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
264		}
265	}
266}
267