boot: Move boot_zlib build out of tarfs directory.
It is also used by packagefs. Another library is coming in the next commit.
This commit is contained in:
@@ -401,5 +401,6 @@ for platform in [ MultiBootSubDirSetup ] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SubInclude HAIKU_TOP src system boot arch $(TARGET_KERNEL_ARCH_DIR) ;
|
SubInclude HAIKU_TOP src system boot arch $(TARGET_KERNEL_ARCH_DIR) ;
|
||||||
|
SubInclude HAIKU_TOP src system boot libs ;
|
||||||
SubInclude HAIKU_TOP src system boot loader ;
|
SubInclude HAIKU_TOP src system boot loader ;
|
||||||
SubInclude HAIKU_TOP src system boot platform ;
|
SubInclude HAIKU_TOP src system boot platform ;
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
SubDir HAIKU_TOP src system boot libs ;
|
||||||
|
|
||||||
|
local zlibSourceDirectory = [ BuildFeatureAttribute zlib : sources : path ] ;
|
||||||
|
UseHeaders $(zlibSourceDirectory) ;
|
||||||
|
UseHeaders $(zlibSourceDirectory) : true ;
|
||||||
|
|
||||||
|
DEFINES += _BOOT_MODE ;
|
||||||
|
|
||||||
|
local zlibSources =
|
||||||
|
adler32.c
|
||||||
|
crc32.c
|
||||||
|
inffast.c
|
||||||
|
inflate.c
|
||||||
|
inftrees.c
|
||||||
|
uncompr.c
|
||||||
|
zutil.c
|
||||||
|
;
|
||||||
|
|
||||||
|
local platform ;
|
||||||
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
|
on $(platform) {
|
||||||
|
# zlib
|
||||||
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
|
|
||||||
|
LOCATE on [ FGristFiles $(zlibSources) ] = $(zlibSourceDirectory) ;
|
||||||
|
|
||||||
|
Depends [ FGristFiles $(zlibSources) ]
|
||||||
|
: [ BuildFeatureAttribute zlib : sources ] ;
|
||||||
|
|
||||||
|
BootStaticLibrary [ MultiBootGristFiles boot_zlib ] :
|
||||||
|
$(zlibSources)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,47 +3,21 @@ SubDir HAIKU_TOP src system boot loader file_systems tarfs ;
|
|||||||
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
UsePrivateHeaders [ FDirName kernel disk_device_manager ] ;
|
||||||
UsePrivateHeaders kernel shared storage ;
|
UsePrivateHeaders kernel shared storage ;
|
||||||
|
|
||||||
local zlibSourceDirectory = [ BuildFeatureAttribute zlib : sources : path ] ;
|
UseBuildFeatureHeaders zlib ;
|
||||||
UseHeaders $(zlibSourceDirectory) ;
|
|
||||||
UseHeaders $(zlibSourceDirectory) : true ;
|
|
||||||
|
|
||||||
local defines = [ FDefines _BOOT_MODE ] ;
|
local defines = [ FDefines _BOOT_MODE ] ;
|
||||||
SubDirCcFlags $(defines) ;
|
SubDirCcFlags $(defines) ;
|
||||||
SubDirC++Flags -fno-rtti $(defines) ;
|
SubDirC++Flags -fno-rtti $(defines) ;
|
||||||
|
|
||||||
|
|
||||||
local zlibSources =
|
|
||||||
adler32.c
|
|
||||||
crc32.c
|
|
||||||
inffast.c
|
|
||||||
inflate.c
|
|
||||||
inftrees.c
|
|
||||||
uncompr.c
|
|
||||||
zutil.c
|
|
||||||
;
|
|
||||||
|
|
||||||
local platform ;
|
local platform ;
|
||||||
for platform in [ MultiBootSubDirSetup ] {
|
for platform in [ MultiBootSubDirSetup ] {
|
||||||
on $(platform) {
|
on $(platform) {
|
||||||
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
UsePrivateHeaders [ FDirName kernel boot platform $(TARGET_BOOT_PLATFORM) ] ;
|
||||||
|
|
||||||
LOCATE on [ FGristFiles $(zlibSources) ] = $(zlibSourceDirectory) ;
|
|
||||||
Depends [ FGristFiles $(zlibSources) ]
|
|
||||||
: [ BuildFeatureAttribute zlib : sources ] ;
|
|
||||||
|
|
||||||
BootStaticLibrary [ MultiBootGristFiles boot_zlib ] :
|
|
||||||
$(zlibSources)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
|
||||||
Includes [ FGristFiles tarfs.cpp ] : [ BuildFeatureAttribute zlib : sources ] ;
|
|
||||||
# Strictly speaking it should be "headers", but the sources contain the
|
|
||||||
# headers as well and we have already added the sources directory to the
|
|
||||||
# header search path for the subdirectory. Should building boot_zlib be
|
|
||||||
# moved to its own directory, this should better be changes as well.
|
|
||||||
|
|
||||||
BootStaticLibrary [ MultiBootGristFiles boot_tarfs ] :
|
BootStaticLibrary [ MultiBootGristFiles boot_tarfs ] :
|
||||||
tarfs.cpp
|
tarfs.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Includes [ FGristFiles tarfs.cpp ] : [ BuildFeatureAttribute zlib : headers ] ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user