xref: /haiku/Jamfile (revision ff35d6c18a2a0bb58109ceca26b37755a32d265b)
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
1472e67791SOliver Tappe# Include packages that are required by all images:
15271e9484SIngo Weinhold# primary architecture
1678f4c163SIngo WeinholdAddHaikuImagePackages
1772e67791SOliver Tappe	curl freetype icu libsolv zlib
1872e67791SOliver Tappe	;
1972e67791SOliver Tappe# secondary architectures
2072e67791SOliver Tappelocal architectureObject ;
2172e67791SOliver Tappefor architectureObject
2272e67791SOliver Tappe		in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
2372e67791SOliver Tappe	on $(architectureObject) {
2472e67791SOliver Tappe		AddHaikuImagePackages
2572e67791SOliver Tappe			curl freetype icu libsolv zlib
2672e67791SOliver Tappe			;
2772e67791SOliver Tappe	}
2872e67791SOliver Tappe}
2972e67791SOliver Tappe
3072e67791SOliver Tappe# Include packages that are required by non-basic images:
3172e67791SOliver Tappeif ! ( $(HAIKU_BOOTSTRAP_BUILD) || $(HAIKU_MINIMUM_BUILD) ) {
3272e67791SOliver Tappe	# primary architecture
3372e67791SOliver Tappe	AddHaikuImagePackages
3472e67791SOliver Tappe		bzip2 ctags ffmpeg findutils gawk glu grep jpeg libpng
3572e67791SOliver Tappe		mesa mesa_devel mesa_swrast sed tar which
3678f4c163SIngo Weinhold		;
37271e9484SIngo Weinhold
38271e9484SIngo Weinhold	# secondary architectures
39271e9484SIngo Weinhold	local architectureObject ;
40271e9484SIngo Weinhold	for architectureObject
41271e9484SIngo Weinhold			in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
42271e9484SIngo Weinhold		on $(architectureObject) {
43271e9484SIngo Weinhold			AddHaikuImagePackages
4472e67791SOliver Tappe				ffmpeg glu jpeg libpng mesa
45271e9484SIngo Weinhold				;
46271e9484SIngo Weinhold		}
47271e9484SIngo Weinhold	}
4878f4c163SIngo Weinhold}
49429618d2SMatt Madia
50429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image.
5157190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] {
5298c6dfa4SIngo Weinhold	AddHaikuImagePackages openssl ;
53429618d2SMatt Madia}
54a5c31cbbSMatt Madia
5524796718SIngo Weinhold# add additionally requested packages
5624796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
5724796718SIngo Weinhold
5848d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory.
5948d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) {
6048d60fa6SIngo Weinhold	# Don't include "src", but at least include the stuff needed for the
6148d60fa6SIngo Weinhold	# build.
6248d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src build ;
6348d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src tools ;
6448d60fa6SIngo Weinhold} else {
65338b8dc3SIngo Weinhold	SubInclude HAIKU_TOP src ;
6648d60fa6SIngo Weinhold}
67a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) {
68a7ec9c1dSFrançois Revol	SubInclude HAIKU_TOP 3rdparty ;
69a7ec9c1dSFrançois Revol}
7048d60fa6SIngo Weinhold
71be8a6e43SIngo Weinhold# Perform deferred SubIncludes.
72be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ;
73be8a6e43SIngo Weinhold
74689e6794SIngo Weinhold# reset subdir
75689e6794SIngo WeinholdSubDir HAIKU_TOP ;
76ad27081fSIngo Weinhold
77ad27081fSIngo Weinhold# Execute post-build-target user config rules.
78ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets	;
79689e6794SIngo Weinhold
80be5e6fefSIngo Weinhold# specify the Haiku repository contents
81be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ;
82be5e6fefSIngo Weinhold
83*ff35d6c1SOliver Tappe# specify the actual Haiku image contents
84e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
85*ff35d6c1SOliver Tappe
86*ff35d6c1SOliver Tappe# specify the additional image contents one for each boot type
87e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
88e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
89e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
90e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
91e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
92e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
9337aefc9cSIngo Weinhold
9437aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist.
9537aefc9cSIngo Weinholdlocal package ;
9637aefc9cSIngo Weinholdlocal packageError ;
9737aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
9837aefc9cSIngo Weinhold	if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
9937aefc9cSIngo Weinhold		Echo "ERROR: Requested optional package \"$(package)\" does not"
10037aefc9cSIngo Weinhold			"exist." ;
10137aefc9cSIngo Weinhold		packageError = 1 ;
10237aefc9cSIngo Weinhold	}
10337aefc9cSIngo Weinhold}
10437aefc9cSIngo Weinholdif $(packageError) {
10537aefc9cSIngo Weinhold	Exit ;
10637aefc9cSIngo Weinhold}
10780ad173eSMatt Madia
10880ad173eSMatt Madia# Pseudo-target to build all targets that are localized.
109a8fcb885SMatt MadiaNotFile LocalizedTargets ;
110a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
1119de5b022SMatt Madia
1129de5b022SMatt MadiaNotFile catalogs ;
1139de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
1149de5b022SMatt Madia
1159de5b022SMatt MadiaNotFile catkeys ;
1169de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;
117