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