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