SubDir HAIKU_TOP src system boot libs ;local zlibSourceDirectory = [ BuildFeatureAttribute zlib : sources : path ] ;UseHeaders $(zlibSourceDirectory) ;UseHeaders $(zlibSourceDirectory) : true ;local zlibSources =adler32.ccrc32.cinffast.cinflate.cinftrees.cuncompr.czutil.c;local zstdSourceDirectory = [ BuildFeatureAttribute zstd : sources : path ] ;UseHeaders [ FDirName $(zstdSourceDirectory) lib ] ;UseHeaders [ FDirName $(zstdSourceDirectory) lib common ] ;local zstdCommonSources =error_private.centropy_common.c fse_decompress.c zstd_common.cxxhash.c;local zstdDecSources =huf_decompress.c zstd_ddict.c zstd_decompress.c zstd_decompress_block.c;local libFDTSourceDirectory = [ FDirName $(HAIKU_TOP) src libs libfdt ] ;local libFDTSources =fdt.cfdt_ro.cfdt_rw.cfdt_strerror.cfdt_sw.cfdt_wip.cfdt_addresses.cfdt_check.cfdt_empty_tree.cfdt_overlay.c;SubDirCcFlags -Wno-error=missing-prototypes -Wno-error=sign-compare -Wno-error=missing-braces ;local platform ;for platform in [ MultiBootSubDirSetup ] {on $(platform) {# zlibUsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;LOCATE on [ FGristFiles $(zlibSources) ] = $(zlibSourceDirectory) ;Depends [ FGristFiles $(zlibSources) ]: [ BuildFeatureAttribute zlib : sources ] ;BootStaticLibrary [ MultiBootGristFiles boot_zlib ] :$(zlibSources);# zstdLOCATE on [ FGristFiles $(zstdCommonSources) ] =[ FDirName $(zstdSourceDirectory) lib common ] ;LOCATE on [ FGristFiles $(zstdDecSources) ] =[ FDirName $(zstdSourceDirectory) lib decompress ] ;# tune build for smaller sizeDEFINES += HUF_FORCE_DECOMPRESS_X1 ZSTD_FORCE_DECOMPRESS_SEQUENCES_SHORT ;# prevent weak symbolsDEFINES += ZSTD_HAVE_WEAK_SYMBOLS=0 ;BootStaticLibrary [ MultiBootGristFiles boot_zstd ] :$(zstdCommonSources) $(zstdDecSources);Depends [ FGristFiles $(zstdCommonSources) $(zstdDecSources) ]: [ BuildFeatureAttribute zstd : sources ] ;# fdtUseLibraryHeaders [ FDirName libfdt ] ;BootStaticLibrary [ MultiBootGristFiles boot_fdt ] :$(libFDTSources) ;LOCATE on [ FGristFiles $(libFDTSources) ] = $(libFDTSourceDirectory) ;}}