1# set HAIKU_BUILD_TYPE early 2switch $(HAIKU_BUILD_PROFILE) { 3 case "bootstrap-*" : { 4 HAIKU_BUILD_TYPE = bootstrap ; 5 EnableBuildFeatures bootstrap_image ; 6 7 # Add a third pseudo target for the platform used when building anything 8 # for stage0 of the bootstrap process. 9 NotFile bootstrap_stage0 ; 10 11 HAIKU_DEFINES += HAIKU_BOOTSTRAP_BUILD ; 12 TARGET_DEFINES += HAIKU_BOOTSTRAP_BUILD ; 13 } 14 15 case "minimum-*" : { 16 HAIKU_BUILD_TYPE = minimum ; 17 EnableBuildFeatures minimum_image ; 18 19 HAIKU_DEFINES += HAIKU_MINIMUM_BUILD ; 20 TARGET_DEFINES += HAIKU_MINIMUM_BUILD ; 21 } 22 23 case "*" : { 24 HAIKU_BUILD_TYPE = regular ; 25 EnableBuildFeatures regular_image ; 26 27 HAIKU_DEFINES += HAIKU_REGULAR_BUILD ; 28 TARGET_DEFINES += HAIKU_REGULAR_BUILD ; 29 } 30} 31Echo "Starting build of type $(HAIKU_BUILD_TYPE) ..." ; 32 33 34rule DefineDefaultBuildProfiles 35{ 36 # release profiles 37 DefineBuildProfile release-raw : image : "haiku-release.image" ; 38 DefineBuildProfile release-vmware : vmware-image : "haiku-release.vmdk" ; 39 DefineBuildProfile release-cd : cd-image : "haiku-release.iso" ; 40 DefineBuildProfile release-anyboot : anyboot-image 41 : "haiku-release-anyboot.iso" ; 42 43 # nightly profiles 44 DefineBuildProfile nightly-raw : image : "haiku-nightly.image" ; 45 DefineBuildProfile nightly-vmware : vmware-image : "haiku-nightly.vmdk" ; 46 DefineBuildProfile nightly-cd : cd-image : "haiku-nightly.iso" ; 47 DefineBuildProfile nightly-anyboot : anyboot-image 48 : "haiku-nightly-anyboot.iso" ; 49 50 # bootstrap profiles 51 DefineBuildProfile bootstrap-raw : image : "haiku-bootstrap.image" ; 52 DefineBuildProfile bootstrap-mmc : haiku-mmc-image : "haiku-bootstrap.mmc" ; 53 DefineBuildProfile bootstrap-vmware : vmware-image 54 : "haiku-bootstrap.vmdk" ; 55 DefineBuildProfile bootstrap-anyboot : anyboot-image 56 : "haiku-bootstrap-anyboot.iso" ; 57 58 # minimum profiles 59 DefineBuildProfile minimum-raw : image : "haiku-minimum.image" ; 60 DefineBuildProfile minimum-mmc : haiku-mmc-image : "haiku-minimum.mmc" ; 61 DefineBuildProfile minimum-vmware : vmware-image : "haiku-minimum.vmdk" ; 62 DefineBuildProfile minimum-anyboot : anyboot-image 63 : "haiku-minimum-anyboot.iso" ; 64 65 66 switch $(HAIKU_BUILD_PROFILE) { 67 case "release-*" : { 68 Echo Building Haiku R1/development preview ; 69 HAIKU_ROOT_USER_NAME ?= user ; 70 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 71 AddGroupToHaikuImage party : 101 : user sshd ; 72 HAIKU_IMAGE_HOST_NAME ?= shredder ; 73 if $(DEBUG) != 0 { 74 HAIKU_IMAGE_SIZE ?= 900 ; 75 } 76 HAIKU_IMAGE_SIZE ?= 800 ; 77 78 AddHaikuImagePackages 79 bepdf 80 cvs 81 keymapswitcher 82 llvm 83 man 84 mercurial 85 nano 86 noto 87 noto_sans_cjk_jp 88 openssh 89 p7zip 90 pdfwriter 91 pe 92 python 93# subversion 94 timgmsoundfont 95 vision 96 wpa_supplicant 97 wqy_microhei 98 # xz_utils can't be built with gcc2, so we install it for 99 # primary gcc 4 architectures or gcc 2 hybrids. 100 xz_utils@!gcc2 101 gcc2 @{ xz_utils_x86@secondary_x86 }@ 102 ; 103 104 local architectureObject ; 105 for architectureObject in [ MultiArchSubDirSetup ] { 106 on $(architectureObject) { 107 AddHaikuImagePackages openssl wonderbrush@gcc2 ; 108 } 109 } 110 111 AddOptionalHaikuImagePackages BeBook Development Git Welcome ; 112 113 # WebPositive can only built for x86_gcc2, x86 and x86_64 114 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 115 AddOptionalHaikuImagePackages WebPositive ; 116 } else { 117 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 118 } 119 } 120 121 case "alpha-*" : { 122 Echo The alpha-* build profiles have been renamed to release-* ; 123 } 124 125 case "nightly-*" : { 126 Echo Building Haiku Nightly ; 127 HAIKU_ROOT_USER_NAME ?= user ; 128 HAIKU_ROOT_USER_REAL_NAME ?= "Yourself" ; 129 AddGroupToHaikuImage party : 101 : user sshd ; 130 HAIKU_IMAGE_HOST_NAME ?= shredder ; 131 if $(DEBUG) != 0 { 132 HAIKU_IMAGE_SIZE ?= 850 ; 133 } 134 HAIKU_IMAGE_SIZE ?= 600 ; 135 136 AddHaikuImagePackages 137 man 138 nano 139 noto 140 openssh 141 openssl 142 p7zip 143 pe 144 vision 145 wpa_supplicant 146 # xz_utils can't be built with gcc2, so we install it for 147 # primary gcc 4 architectures or gcc 2 hybrids. 148 xz_utils@!gcc2 149 gcc2 @{ xz_utils_x86@secondary_x86 }@ 150 ; 151 152 AddOptionalHaikuImagePackages Development Git ; 153 154 # WebPositive can only built for x86_gcc2, x86 and x86_64 155 if $(HAIKU_PACKAGING_ARCHS) in x86_gcc2 x86 x86_64 { 156 AddOptionalHaikuImagePackages WebPositive ; 157 } else { 158 Echo "WebPositive not available on $(HAIKU_PACKAGING_ARCHS)" ; 159 } 160 } 161 162 case "bootstrap-*" : { 163 Echo Building Haiku Bootstrap ; 164 HAIKU_IMAGE_HOST_NAME ?= shredder ; 165 HAIKU_IMAGE_SIZE ?= 20000 ; 166 167 AddHaikuImagePackages 168 binutils 169 bison 170 curl_devel 171 expat 172 flex 173 freetype_devel 174 gawk 175 gcc 176 grep 177 haikuporter 178 less 179 libedit 180 libedit_devel 181 m4 182 make 183 ncurses6 184 ncurses6_devel 185 noto 186 python 187 sed 188 texinfo 189 zlib_devel 190 ; 191 192 # secondary architecture packages 193 local architectureObject ; 194 for architectureObject 195 in [ MultiArchSubDirSetup $(TARGET_PACKAGING_ARCHS[2-]) ] { 196 on $(architectureObject) { 197 AddHaikuImagePackages 198 binutils 199 curl 200 curl_devel 201 expat 202 freetype 203 freetype_devel 204 gcc 205 icu 206 libsolv 207 libedit 208 libedit_devel 209 ncurses6 210 ncurses6_devel 211 zlib 212 zlib_devel 213 ; 214 } 215 } 216 217 AddOptionalHaikuImagePackages DevelopmentMin ; 218 } 219 220 case "minimum-*" : { 221 Echo Building Haiku Minimum Target ; 222 HAIKU_IMAGE_HOST_NAME ?= shredder ; 223 if $(DEBUG) != 0 { 224 HAIKU_IMAGE_SIZE ?= 450 ; 225 } 226 227 AddHaikuImagePackages 228 ; 229 } 230 } 231 232 233 # Uncomment in official release branch. 234 #HAIKU_DEFINES += HAIKU_OFFICIAL_RELEASE ; 235 #TARGET_DEFINES += HAIKU_OFFICIAL_RELEASE ; 236 237 238 # If a build profile was specified on the command line, now is the time to 239 # check whether it is unknown or one of the default profiles. 240 if $(HAIKU_BUILD_PROFILE) && ! $(HAIKU_BUILD_PROFILE_DEFINED) { 241 # define the obvious default profiles 242 if $(HAIKU_BUILD_PROFILE) in anyboot-image cd-image image install 243 vmware-image { 244 DefineBuildProfile $(HAIKU_BUILD_PROFILE) : $(HAIKU_BUILD_PROFILE) ; 245 } else { 246 Exit "Build profile" $(HAIKU_BUILD_PROFILE) "not defined." ; 247 } 248 } 249} 250