xref: /haiku/build/jam/DefaultBuildProfiles (revision ded5af13dcf0b71231fee57a5d9502d388c1f758)
1# set HAIKU_BUILD_TYPE early
2switch $(HAIKU_BUILD_PROFILE) {
3	case "bootstrap-*" : {
4		HAIKU_BUILD_TYPE = bootstrap ;
5		EnableBuildFeatures bootstrap_image ;
6
7		HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
8		TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ;
9	}
10
11	case "minimum-*" : {
12		HAIKU_BUILD_TYPE = minimum ;
13		EnableBuildFeatures minimum_image ;
14
15		HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ;
16		TARGET_DEFINES += HAIKU_MINIMUM_BUILD ;
17	}
18
19	case "*" : {
20		HAIKU_BUILD_TYPE = regular ;
21		EnableBuildFeatures regular_image ;
22
23		HAIKU_DEFINES += HAIKU_REGULAR_BUILD ;
24		TARGET_DEFINES += HAIKU_REGULAR_BUILD ;
25	}
26}
27Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ;
28
29
30rule DefineDefaultBuildProfiles
31{
32	# release profiles
33	DefineBuildProfile release-raw : image : "haiku-release.image" ;
34	DefineBuildProfile release-vmware : vmware-image : "haiku-release.vmdk" ;
35	DefineBuildProfile release-cd : cd-image : "haiku-release.iso" ;
36	DefineBuildProfile release-anyboot : anyboot-image
37		: "haiku-release-anyboot.image" ;
38
39	# nightly profiles
40	DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ;
41	DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ;
42	DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ;
43	DefineBuildProfile nightly-anyboot : anyboot-image
44		: "haiku-nightly-anyboot.image" ;
45
46	# bootstrap profiles
47	DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ;
48	DefineBuildProfile bootstrap-vmware : vmware-image
49		: "haiku-bootstrap.vmdk" ;
50
51	# minimum profiles
52	DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ;
53	DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ;
54	DefineBuildProfile minimum-anyboot : anyboot-image
55		: "haiku-minimum-anyboot.image" ;
56
57
58	switch $(HAIKU_BUILD_PROFILE) {
59		case "release-*" : {
60			Echo Building Haiku R1/development preview ;
61			HAIKU_ROOT_USER_NAME ?= user ;
62			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
63			AddGroupToHaikuImage party : 101 : user sshd ;
64			HAIKU_IMAGE_HOST_NAME ?= shredder ;
65			HAIKU_IMAGE_SIZE ?= 800 ;
66
67			AddHaikuImagePackages
68				bepdf
69				cvs
70				keymapswitcher
71				llvm
72				man
73				mercurial
74				nano
75				openssh
76				p7zip
77				pe
78				python
79				subversion
80				timgmsoundfont
81				vision
82				wpa_supplicant
83				wqy_microhei
84				# xz_utils can't be built with gcc2, so we install it for
85				# primary gcc 4 architectures or gcc 2 hybrids.
86				xz_utils@!gcc2
87				gcc2 @{ xz_utils_x86@secondary_x86 }@
88				;
89
90			local architectureObject ;
91			for architectureObject in [ MultiArchSubDirSetup ] {
92				on $(architectureObject) {
93					AddHaikuImagePackages openssl wonderbrush@gcc2 ;
94				}
95			}
96
97			AddOptionalHaikuImagePackages BeBook Development Git Welcome ;
98
99			# WebPositive can only built for x86_gcc2, x86 and x86_64
100			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
101				AddOptionalHaikuImagePackages WebPositive ;
102			} else {
103				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
104			}
105		}
106
107		case "alpha-*" : {
108			Echo The alpha-* build profiles have been renamed to release-* ;
109		}
110
111		case "nightly-*" : {
112			Echo Building Haiku Nightly ;
113			HAIKU_ROOT_USER_NAME ?= user ;
114			HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ;
115			AddGroupToHaikuImage party : 101 : user sshd ;
116			HAIKU_IMAGE_HOST_NAME ?= shredder ;
117			HAIKU_IMAGE_SIZE ?= 600 ;
118
119			AddHaikuImagePackages
120				man
121				nano
122				openssh
123				openssl
124				p7zip
125				pe
126				vision
127				wpa_supplicant
128				# xz_utils can't be built with gcc2, so we install it for
129				# primary gcc 4 architectures or gcc 2 hybrids.
130				xz_utils@!gcc2
131				gcc2 @{ xz_utils_x86@secondary_x86 }@
132				;
133
134			AddOptionalHaikuImagePackages Development Git ;
135
136			# WebPositive can only built for x86_gcc2, x86 and x86_64
137			if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 {
138				AddOptionalHaikuImagePackages WebPositive ;
139			} else {
140				Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ;
141			}
142		}
143
144		case "bootstrap-*" : {
145			Echo Building Haiku Bootstrap ;
146			HAIKU_IMAGE_HOST_NAME ?= shredder ;
147			HAIKU_IMAGE_SIZE ?= 20000 ;
148
149			AddHaikuImagePackages
150				autoconf
151				automake
152				binutils
153				bison
154				curl_devel
155				flex
156				freetype_devel
157				gawk
158				gcc
159				grep
160				haikuporter
161				libtool
162				libtool_libltdl
163				m4
164				make
165				ncurses
166				ncurses_devel
167				python
168				sed
169				texinfo
170				zlib_devel
171				;
172
173			# secondary architecture packages
174			local architectureObject ;
175			for architectureObject
176					in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] {
177				on $(architectureObject) {
178					AddHaikuImagePackages
179						binutils
180						curl
181						curl_devel
182						freetype
183						freetype_devel
184						gcc
185						icu
186						libsolv
187						ncurses
188						ncurses_devel
189						zlib
190						zlib_devel
191						;
192				}
193			}
194
195			AddOptionalHaikuImagePackages DevelopmentMin ;
196		}
197
198		case "minimum-*" : {
199			Echo Building Haiku Minimum Target ;
200			HAIKU_IMAGE_HOST_NAME ?= shredder ;
201
202			AddHaikuImagePackages
203				;
204		}
205	}
206
207
208	# Uncomment in official release branch.
209	#HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ;
210	#TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ;
211
212
213	# If a build profile was specified on the command line, now is the time to
214	# check whether it is unknown or one of the default profiles.
215	if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) {
216		# define the obvious default profiles
217		if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install
218				vmware-image {
219			DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ;
220		} else {
221			Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ;
222		}
223	}
224}
225