xref: /haiku/Jamfile (revision af56dec460a5ffd7f2519f7a47dde48b1ffaa8c2)
1SubDir HAIKU_TOP ;
2
3NotFile doc_files ;
4Depends files : doc_files ;
5
6# Prepare the optional build features before parsing the Jamfile tree.
7local architectureObject ;
8for architectureObject in [ MultiArchSubDirSetup ] {
9	on $(architectureObject) {
10		include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
11
12		# Let the target platform depend on the external header directories such
13		# that those will be unpacked before anything is built for the target
14		# platform.
15		Depends $(TARGET_PLATFORM) : [
16			BuildFeatureAttribute gcc_syslibs_devel : c++-headers
17		] [
18			BuildFeatureAttribute gcc_syslibs_devel : gcc-headers
19		] ;
20	}
21}
22
23# Include required packages:
24# primary architecture
25AddHaikuImagePackages [ FFilterByBuildFeatures
26	curl freetype icu libsolv zlib
27
28	regular_image @{
29		bzip2 ctags ffmpeg findutils gawk glu grep gutenprint jpeg less
30		libpng libwebp mesa mesa_devel mesa_swrast sed sharutils tar tiff wget
31		which
32	}@
33] ;
34if $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 {
35	AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
36}
37
38if $(HAIKU_PACKAGING_ARCHS[2]) {
39	# secondary architectures
40	local architectureObject ;
41	for architectureObject
42			in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
43		on $(architectureObject) {
44			AddHaikuImagePackages [ FFilterByBuildFeatures
45				curl freetype icu libsolv zlib
46
47				regular_image @{
48					ffmpeg glu jpeg libpng libwebp mesa
49				}@
50			] ;
51			if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
52				AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
53			}
54		}
55	}
56}
57
58# If enabled, make sure that OpenSSL is added to the image.
59if [ FIsBuildFeatureEnabled openssl ] {
60	AddHaikuImagePackages openssl ;
61}
62
63# add additionally requested packages
64AddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
65
66# Optionally we allow not to include the "src" subdirectory.
67if $(HAIKU_DONT_INCLUDE_SRC) {
68	# Don't include "src", but at least include the stuff needed for the
69	# build.
70	SubInclude HAIKU_TOP src build ;
71	SubInclude HAIKU_TOP src tools ;
72} else {
73	SubInclude HAIKU_TOP src ;
74}
75if $(HAIKU_INCLUDE_3RDPARTY) {
76	SubInclude HAIKU_TOP 3rdparty ;
77}
78
79# Perform deferred SubIncludes.
80ExecuteDeferredSubIncludes ;
81
82# reset subdir
83SubDir HAIKU_TOP ;
84
85# Execute post-build-target user config rules.
86UserBuildConfigRulePostBuildTargets	;
87
88# specify the Haiku repository contents
89include [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ;
90
91# specify the actual Haiku image contents
92include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
93
94# specify the additional image contents one for each boot type
95include [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
96include [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
97include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
98include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
99include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
100include [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
101
102# Check whether all requested optional packages do actually exist.
103local package ;
104local packageError ;
105for package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
106	if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
107		Echo "ERROR: Requested optional package \"$(package)\" does not"
108			"exist." ;
109		packageError = 1 ;
110	}
111}
112if $(packageError) {
113	Exit ;
114}
115
116# Pseudo-target to build all targets that are localized.
117NotFile LocalizedTargets ;
118Depends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
119
120NotFile catalogs ;
121Depends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
122
123NotFile catkeys ;
124Depends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;
125