1 if ! [ Match "(.*)-haiku-(.*)" : $(JAMVERSION) ] {
2 Exit "You can only build Haiku with Haiku's Jam, not Perforce Jam or"
3 "some other variant (you are using $(JAMVERSION))." ;
9 Depends files : doc_files ;
11 # Prepare the optional build features before parsing the Jamfile tree.
12 local architectureObject ;
13 for architectureObject in [ MultiArchSubDirSetup ] {
14 on $(architectureObject) {
15 include [ FDirName $(HAIKU_BUILD_RULES_DIR) BuildFeatures ] ;
17 # Let the target platform depend on the external header directories such
18 # that those will be unpacked before anything is built for the target
20 Depends $(TARGET_PLATFORM) : [
21 BuildFeatureAttribute gcc_syslibs_devel : c++-headers
23 BuildFeatureAttribute gcc_syslibs_devel : gcc-headers
28 # Include required packages:
29 # primary architecture
30 AddHaikuImagePackages [ FFilterByBuildFeatures
31 bash bc coreutils curl freetype icu libsolv zlib zstd
34 bzip2 ctags diffutils expat ffmpeg findutils gawk glu grep gutenprint
35 gzip ilmbase jasper jpeg
36 less libicns libpcap libpng16 libwebp
37 mesa mesa_devel mesa_swpipe@!gcc2 mesa_swrast@gcc2
40 tar tcpdump unzip wget which zip
43 if $(HAIKU_PACKAGING_ARCHS[1]) != x86_gcc2 {
44 AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs ] ;
47 if $(HAIKU_PACKAGING_ARCHS[2]) {
48 # secondary architectures
49 local architectureObject ;
50 for architectureObject
51 in [ MultiArchSubDirSetup $(HAIKU_PACKAGING_ARCHS[2-]) ] {
52 on $(architectureObject) {
53 AddHaikuImagePackages [ FFilterByBuildFeatures
54 curl freetype icu libsolv zlib
57 ffmpeg glu jasper jpeg libicns libpng16 libwebp mesa
60 if $(TARGET_PACKAGING_ARCH) != x86_gcc2 {
61 AddHaikuImagePackages [ FFilterByBuildFeatures gcc_syslibs
68 # If enabled, make sure that OpenSSL is added to the image.
69 if [ FIsBuildFeatureEnabled openssl ] {
70 AddHaikuImagePackages openssl ;
73 # add additionally requested packages
74 AddHaikuImagePackages $(HAIKU_IMAGE_ADDITIONAL_PACKAGES) ;
76 # Optionally we allow not to include the "src" subdirectory.
77 if $(HAIKU_DONT_INCLUDE_SRC) {
78 # Don't include "src", but at least include the stuff needed for the
80 SubInclude HAIKU_TOP src build ;
81 SubInclude HAIKU_TOP src tools ;
83 SubInclude HAIKU_TOP src ;
85 if $(HAIKU_INCLUDE_3RDPARTY) {
86 SubInclude HAIKU_TOP 3rdparty ;
89 # Perform deferred SubIncludes.
90 ExecuteDeferredSubIncludes ;
95 # Execute post-build-target user config rules.
96 UserBuildConfigRulePostBuildTargets ;
98 # specify the Haiku repository contents
99 include [ FDirName $(HAIKU_BUILD_RULES_DIR) repositories Haiku ] ;
101 # specify the actual Haiku image contents
102 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuImage ] ;
104 # specify the additional image contents one for each boot type
105 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images NetBootArchive ] ;
106 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images FloppyBootImage ] ;
107 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootImage ] ;
108 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images CDBootPPCImage ] ;
109 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images HaikuCD ] ;
110 include [ FDirName $(HAIKU_BUILD_RULES_DIR) images AnybootImage ] ;
112 # Check whether all requested optional packages do actually exist.
115 for package in $(HAIKU_ADDED_OPTIONAL_PACKAGES) {
116 if ! [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_EXISTS) ] {
117 Echo "ERROR: Requested optional package \"$(package)\" does not"
126 # Pseudo-target to build all targets that are localized.
127 NotFile LocalizedTargets ;
128 Depends LocalizedTargets : $(HAIKU_LOCALIZED_TARGETS) ;
131 Depends catalogs : $(HAIKU_LOCALE_CATALOGS) ;
134 Depends catkeys : $(HAIKU_LOCALE_OUTPUT_CATKEYS) ;