xref: /haiku/Jamfile (revision 6d8c8a9dfdd7c0250a2a7784cdca86750f786569)
1338b8dc3SIngo WeinholdSubDir HAIKU_TOP ;
269b97469SIngo Weinhold
3f35b607dSJérôme DuvalNotFile doc_files ;
4f35b607dSJérôme DuvalDepends files : doc_files ;
5f35b607dSJérôme Duval
6f4eb5cf7SMatt Madia# Prepare the optional build features before parsing the Jamfile tree.
7b0944c78SIngo Weinholdlocal architectureObject ;
8b0944c78SIngo Weinholdfor architectureObject in [ MultiArchSubDirSetup ] {
9b0944c78SIngo Weinhold	on $(architectureObject) {
10f0cacbb3SIngo Weinhold		include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
11b0944c78SIngo Weinhold	}
12b0944c78SIngo Weinhold}
13f4eb5cf7SMatt Madia
14*6d8c8a9dSOliver Tappeif $(HAIKU_BOOTSTRAP_BUILD) {
15*6d8c8a9dSOliver Tappe	EnableBuildFeatures bootstrap_image ;
16*6d8c8a9dSOliver Tappe} else if $(HAIKU_MINIMUM_BUILD) {
17*6d8c8a9dSOliver Tappe	EnableBuildFeatures minimum_image ;
18*6d8c8a9dSOliver Tappe} else {
19*6d8c8a9dSOliver Tappe	EnableBuildFeatures regular_image ;
2072e67791SOliver Tappe}
2172e67791SOliver Tappe
22*6d8c8a9dSOliver Tappe# Include required packages:
2372e67791SOliver Tappe# primary architecture
24*6d8c8a9dSOliver TappeAddHaikuImagePackages [ FFilterByBuildFeatures
25*6d8c8a9dSOliver Tappe	curl freetype icu libsolv zlib
26*6d8c8a9dSOliver Tappe
27*6d8c8a9dSOliver Tappe	regular_image @{
2872e67791SOliver Tappe		bzip2 ctags ffmpeg findutils gawk glu grep jpeg libpng
2972e67791SOliver Tappe		mesa mesa_devel mesa_swrast sed tar which
30*6d8c8a9dSOliver Tappe	}@
31*6d8c8a9dSOliver Tappe] ;
32271e9484SIngo Weinhold# secondary architectures
33271e9484SIngo Weinholdlocal architectureObject ;
34271e9484SIngo Weinholdfor architectureObject
35271e9484SIngo Weinhold		in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
36271e9484SIngo Weinhold	on $(architectureObject) {
37*6d8c8a9dSOliver Tappe		AddHaikuImagePackages [ FFilterByBuildFeatures
38*6d8c8a9dSOliver Tappe			curl freetype icu libsolv zlib
39*6d8c8a9dSOliver Tappe
40*6d8c8a9dSOliver Tappe			regular_image @{
4172e67791SOliver Tappe				ffmpeg glu jpeg libpng mesa
42*6d8c8a9dSOliver Tappe			}@
43*6d8c8a9dSOliver Tappe		] ;
44271e9484SIngo Weinhold	}
4578f4c163SIngo Weinhold}
46429618d2SMatt Madia
47429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image.
4857190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] {
4998c6dfa4SIngo Weinhold	AddHaikuImagePackages openssl ;
50429618d2SMatt Madia}
51a5c31cbbSMatt Madia
5224796718SIngo Weinhold# add additionally requested packages
5324796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
5424796718SIngo Weinhold
5548d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory.
5648d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) {
5748d60fa6SIngo Weinhold	# Don't include "src", but at least include the stuff needed for the
5848d60fa6SIngo Weinhold	# build.
5948d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src build ;
6048d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src tools ;
6148d60fa6SIngo Weinhold} else {
62338b8dc3SIngo Weinhold	SubInclude HAIKU_TOP src ;
6348d60fa6SIngo Weinhold}
64a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) {
65a7ec9c1dSFrançois Revol	SubInclude HAIKU_TOP 3rdparty ;
66a7ec9c1dSFrançois Revol}
6748d60fa6SIngo Weinhold
68be8a6e43SIngo Weinhold# Perform deferred SubIncludes.
69be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ;
70be8a6e43SIngo Weinhold
71689e6794SIngo Weinhold# reset subdir
72689e6794SIngo WeinholdSubDir HAIKU_TOP ;
73ad27081fSIngo Weinhold
74ad27081fSIngo Weinhold# Execute post-build-target user config rules.
75ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets	;
76689e6794SIngo Weinhold
77be5e6fefSIngo Weinhold# specify the Haiku repository contents
78be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ;
79be5e6fefSIngo Weinhold
80ff35d6c1SOliver Tappe# specify the actual Haiku image contents
81e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
82ff35d6c1SOliver Tappe
83ff35d6c1SOliver Tappe# specify the additional image contents one for each boot type
84e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
85e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
86e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
87e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
88e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
89e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
9037aefc9cSIngo Weinhold
9137aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist.
9237aefc9cSIngo Weinholdlocal package ;
9337aefc9cSIngo Weinholdlocal packageError ;
9437aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
9537aefc9cSIngo Weinhold	if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
9637aefc9cSIngo Weinhold		Echo "ERROR: Requested optional package \"$(package)\" does not"
9737aefc9cSIngo Weinhold			"exist." ;
9837aefc9cSIngo Weinhold		packageError = 1 ;
9937aefc9cSIngo Weinhold	}
10037aefc9cSIngo Weinhold}
10137aefc9cSIngo Weinholdif $(packageError) {
10237aefc9cSIngo Weinhold	Exit ;
10337aefc9cSIngo Weinhold}
10480ad173eSMatt Madia
10580ad173eSMatt Madia# Pseudo-target to build all targets that are localized.
106a8fcb885SMatt MadiaNotFile LocalizedTargets ;
107a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
1089de5b022SMatt Madia
1099de5b022SMatt MadiaNotFile catalogs ;
1109de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
1119de5b022SMatt Madia
1129de5b022SMatt MadiaNotFile catkeys ;
1139de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;
114