xref: /haiku/Jamfile (revision 5b3c88f1dab23aed6be4e6f89b09e95dde1c2d09)
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 ] ;
11afde4473SOliver Tappe
12afde4473SOliver Tappe		# Let the target platform depend on the external header directories such
13afde4473SOliver Tappe		# that those will be unpacked before anything is built for the target
14afde4473SOliver Tappe		# platform.
15afde4473SOliver Tappe		Depends $(TARGET_PLATFORM) : [
16afde4473SOliver Tappe			BuildFeatureAttribute gcc_syslibs_devel : c++-headers
17afde4473SOliver Tappe		] [
18afde4473SOliver Tappe			BuildFeatureAttribute gcc_syslibs_devel : gcc-headers
19afde4473SOliver Tappe		] ;
20b0944c78SIngo Weinhold	}
21b0944c78SIngo Weinhold}
22f4eb5cf7SMatt Madia
236d8c8a9dSOliver Tappe# Include required packages:
2472e67791SOliver Tappe# primary architecture
256d8c8a9dSOliver TappeAddHaikuImagePackages [ FFilterByBuildFeatures
26950ee984SJérôme Duval	bash coreutils curl freetype icu libsolv zlib
276d8c8a9dSOliver Tappe
286d8c8a9dSOliver Tappe	regular_image @{
29ed92a105SJérôme Duval		bzip2 ctags diffutils expat ffmpeg findutils gawk glu grep gutenprint
30ed92a105SJérôme Duval		gzip jasper jpeg
31*5b3c88f1SJérôme Duval		less libicns libpcap libpng16 libwebp
32105c7e27SJérôme Duval		mesa mesa_devel mesa_swrast
33f19ef175SJérôme Duval		netcat
34242c022aSJérôme Duval		sed sharutils
35105c7e27SJérôme Duval		tar tcpdump tiff unzip wget which zip
366d8c8a9dSOliver Tappe	}@
376d8c8a9dSOliver Tappe] ;
38220d0402SOliver Tappeif $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 {
39220d0402SOliver Tappe	AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
40220d0402SOliver Tappe}
41220d0402SOliver Tappe
42220d0402SOliver Tappeif $(HAIKU_PACKAGING_ARCHS[2]) {
43271e9484SIngo Weinhold	# secondary architectures
44271e9484SIngo Weinhold	local architectureObject ;
45271e9484SIngo Weinhold	for architectureObject
46271e9484SIngo Weinhold			in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
47271e9484SIngo Weinhold		on $(architectureObject) {
486d8c8a9dSOliver Tappe			AddHaikuImagePackages [ FFilterByBuildFeatures
496d8c8a9dSOliver Tappe				curl freetype icu libsolv zlib
506d8c8a9dSOliver Tappe
516d8c8a9dSOliver Tappe				regular_image @{
5282e60cd5SJérôme Duval					ffmpeg glu jasper jpeg libicns libpng libwebp mesa
536d8c8a9dSOliver Tappe				}@
546d8c8a9dSOliver Tappe			] ;
55220d0402SOliver Tappe			if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
56220d0402SOliver Tappe				AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
57220d0402SOliver Tappe			}
58220d0402SOliver Tappe		}
59271e9484SIngo Weinhold	}
6078f4c163SIngo Weinhold}
61429618d2SMatt Madia
62429618d2SMatt Madia# If enabled, make sure that OpenSSL is added to the image.
6357190167SIngo Weinholdif [ FIsBuildFeatureEnabled openssl ] {
6498c6dfa4SIngo Weinhold	AddHaikuImagePackages openssl ;
65429618d2SMatt Madia}
66a5c31cbbSMatt Madia
6724796718SIngo Weinhold# add additionally requested packages
6824796718SIngo WeinholdAddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
6924796718SIngo Weinhold
7048d60fa6SIngo Weinhold# Optionally we allow not to include the "src" subdirectory.
7148d60fa6SIngo Weinholdif $(HAIKU_DONT_INCLUDE_SRC) {
7248d60fa6SIngo Weinhold	# Don't include "src", but at least include the stuff needed for the
7348d60fa6SIngo Weinhold	# build.
7448d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src build ;
7548d60fa6SIngo Weinhold	SubInclude HAIKU_TOP src tools ;
7648d60fa6SIngo Weinhold} else {
77338b8dc3SIngo Weinhold	SubInclude HAIKU_TOP src ;
7848d60fa6SIngo Weinhold}
79a7ec9c1dSFrançois Revolif $(HAIKU_INCLUDE_3RDPARTY) {
80a7ec9c1dSFrançois Revol	SubInclude HAIKU_TOP 3rdparty ;
81a7ec9c1dSFrançois Revol}
8248d60fa6SIngo Weinhold
83be8a6e43SIngo Weinhold# Perform deferred SubIncludes.
84be8a6e43SIngo WeinholdExecuteDeferredSubIncludes ;
85be8a6e43SIngo Weinhold
86689e6794SIngo Weinhold# reset subdir
87689e6794SIngo WeinholdSubDir HAIKU_TOP ;
88ad27081fSIngo Weinhold
89ad27081fSIngo Weinhold# Execute post-build-target user config rules.
90ad27081fSIngo WeinholdUserBuildConfigRulePostBuildTargets	;
91689e6794SIngo Weinhold
92be5e6fefSIngo Weinhold# specify the Haiku repository contents
93be5e6fefSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ;
94be5e6fefSIngo Weinhold
95ff35d6c1SOliver Tappe# specify the actual Haiku image contents
96e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
97ff35d6c1SOliver Tappe
98ff35d6c1SOliver Tappe# specify the additional image contents one for each boot type
99e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
100e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
101e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
102e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
103e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
104e8c5236aSIngo Weinholdinclude [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
10537aefc9cSIngo Weinhold
10637aefc9cSIngo Weinhold# Check whether all requested optional packages do actually exist.
10737aefc9cSIngo Weinholdlocal package ;
10837aefc9cSIngo Weinholdlocal packageError ;
10937aefc9cSIngo Weinholdfor package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
11037aefc9cSIngo Weinhold	if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
11137aefc9cSIngo Weinhold		Echo "ERROR: Requested optional package \"$(package)\" does not"
11237aefc9cSIngo Weinhold			"exist." ;
11337aefc9cSIngo Weinhold		packageError = 1 ;
11437aefc9cSIngo Weinhold	}
11537aefc9cSIngo Weinhold}
11637aefc9cSIngo Weinholdif $(packageError) {
11737aefc9cSIngo Weinhold	Exit ;
11837aefc9cSIngo Weinhold}
11980ad173eSMatt Madia
12080ad173eSMatt Madia# Pseudo-target to build all targets that are localized.
121a8fcb885SMatt MadiaNotFile LocalizedTargets ;
122a8fcb885SMatt MadiaDepends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
1239de5b022SMatt Madia
1249de5b022SMatt MadiaNotFile catalogs ;
1259de5b022SMatt MadiaDepends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
1269de5b022SMatt Madia
1279de5b022SMatt MadiaNotFile catkeys ;
1289de5b022SMatt MadiaDepends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;
129