xref: /haiku/build/jam/DefaultBuildProfiles (revision 4b918abdb02a26a770d898594eaaccc6f1726e9b)
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			AddHaikuImageSystemPackages
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 8 architectures or gcc 2 hybrids.
101				xz_utils@!gcc2
102				gcc2 @{ xz_utils_x86@secondary_x86 }@
103				;
104			AddHaikuImageSourcePackages
105				bepdf
106				man
107				nano
108				p7zip
109				gcc
110				;
111
112			local architectureObject ;
113			for architectureObject in [ MultiArchSubDirSetup ] {
114				on $(architectureObject) {
115					AddHaikuImageSystemPackages openssl wonderbrush@gcc2 ;
116				}
117			}
118
119			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
120
121			# WebPositive can only built for x86_gcc2, x86 and x86_64
122			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
123				AddOptionalHaikuImagePackages WebPositive ;
124			} else {
125				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
126			}
127		}
128
129		case "nightly-*" : {
130			Echo Building Haiku Nightly ;
131			HAIKU_ROOT_USER_NAME ?= user ;
132			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
133			AddGroupToHaikuImage party : 101 : user sshd ;
134			HAIKU_IMAGE_HOST_NAME ?= shredder ;
135			if $(DEBUG) != 0 {
136				HAIKU_IMAGE_SIZE ?= 850 ;
137			}
138			HAIKU_IMAGE_SIZE ?= 600 ;
139			HAIKU_NIGHTLY_BUILD = 1 ;
140
141			AddHaikuImageSystemPackages
142				man
143				nano
144				noto
145				openssh
146				openssl
147				p7zip
148				pe
149				vision
150				wpa_supplicant
151				# xz_utils can't be built with gcc2, so we install it for
152				# primary gcc 4 architectures or gcc 2 hybrids.
153				xz_utils@!gcc2
154				gcc2 @{ xz_utils_x86@secondary_x86 }@
155				;
156			AddHaikuImageSourcePackages
157				man
158				nano
159				p7zip
160				gcc
161				;
162
163			AddOptionalHaikuImagePackages Development Git ;
164
165			# WebPositive can only built for x86_gcc2, x86 and x86_64
166			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
167				AddOptionalHaikuImagePackages WebPositive ;
168			} else {
169				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
170			}
171		}
172
173		case "minimum-*" : {
174			Echo Building Haiku Minimum Target ;
175			HAIKU_IMAGE_HOST_NAME ?= shredder ;
176			if $(DEBUG) != 0 {
177				HAIKU_IMAGE_SIZE ?= 450 ;
178			}
179
180			AddHaikuImageSystemPackages
181				openssl
182				;
183		}
184
185		case "bootstrap-*" : {
186			Echo Building Haiku Bootstrap ;
187			HAIKU_IMAGE_HOST_NAME ?= shredder ;
188			HAIKU_IMAGE_SIZE ?= 20000 ;
189
190			AddHaikuImageSystemPackages
191				binutils
192				bison
193				expat
194				flex
195				gawk
196				gcc
197				grep
198				haikuporter
199				less
200				libedit
201				m4
202				make
203				ncurses6
204				noto
205				python
206				sed
207				texinfo
208				;
209
210			AddHaikuImageDisabledPackages
211				curl_devel
212				freetype_devel
213				libedit_devel
214				ncurses6_devel
215				zlib_devel
216			;
217
218			# secondary architecture packages
219			local architectureObject ;
220			for architectureObject
221					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
222				on $(architectureObject) {
223					AddHaikuImageSystemPackages
224						binutils
225						curl
226						expat
227						freetype
228						gcc
229						icu
230						libsolv
231						libedit
232						ncurses6
233						zlib
234						;
235					AddHaikuImageDisabledPackages
236						curl_devel
237						freetype_devel
238						libedit_devel
239						ncurses6_devel
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