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