Support building more libraries for secondary architecture

This commit is contained in:
Ingo Weinhold 2013-08-10 09:53:03 +02:00
parent 47fd9e6dc6
commit f51bf7d932
8 changed files with 226 additions and 177 deletions

View File

@ -2,12 +2,17 @@ SubDir HAIKU_TOP src add-ons translators exr openexr half ;
SubDirSysHdrs [ FDirName $(SUBDIR) ] ;
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
}
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
}
StaticLibrary libhalf.a :
eLut.cpp
half.cpp
toFloat.cpp
;
StaticLibrary [ MultiArchDefaultGristFiles libhalf.a ] :
eLut.cpp
half.cpp
toFloat.cpp
;
}
}

View File

@ -2,8 +2,12 @@ SubDir HAIKU_TOP src add-ons translators exr openexr iex ;
SubDirSysHdrs [ FDirName $(SUBDIR) ] ;
StaticLibrary libiex.a :
IexBaseExc.cpp
IexThrowErrnoExc.cpp
;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
StaticLibrary [ MultiArchDefaultGristFiles libiex.a ] :
IexBaseExc.cpp
IexThrowErrnoExc.cpp
;
}
}

View File

@ -7,76 +7,83 @@ SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) ilmthread ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) imath ] ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) config ] ;
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
UseBuildFeatureHeaders zlib ;
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
}
Includes [ FGristFiles ImfPxr24Compressor.cpp ImfZipCompressor.cpp ]
: [ BuildFeatureAttribute zlib : headers ] ;
#StaticLibrary [ MultiArchDefaultGristFiles libilmimf.a ] :
SharedLibrary [ MultiArchDefaultGristFiles libilmimf.so ] :
b44ExpLogTable.cpp
ImfAttribute.cpp
ImfB44Compressor.cpp
ImfBoxAttribute.cpp
ImfChannelListAttribute.cpp
ImfChannelList.cpp
ImfChromaticitiesAttribute.cpp
ImfChromaticities.cpp
ImfCompressionAttribute.cpp
ImfCompressor.cpp
ImfConvert.cpp
ImfCRgbaFile.cpp
ImfDoubleAttribute.cpp
ImfEnvmapAttribute.cpp
ImfEnvmap.cpp
ImfFloatAttribute.cpp
ImfFrameBuffer.cpp
ImfFramesPerSecond.cpp
ImfHeader.cpp
ImfHuf.cpp
ImfInputFile.cpp
ImfIntAttribute.cpp
ImfIO.cpp
ImfKeyCodeAttribute.cpp
ImfKeyCode.cpp
ImfLineOrderAttribute.cpp
ImfLut.cpp
ImfMatrixAttribute.cpp
ImfMisc.cpp
ImfOpaqueAttribute.cpp
ImfOutputFile.cpp
ImfPizCompressor.cpp
ImfPreviewImageAttribute.cpp
ImfPreviewImage.cpp
ImfPxr24Compressor.cpp
ImfRationalAttribute.cpp
ImfRational.cpp
ImfRgbaFile.cpp
ImfRgbaYca.cpp
ImfRleCompressor.cpp
ImfScanLineInputFile.cpp
ImfStandardAttributes.cpp
ImfStdIO.cpp
ImfStringAttribute.cpp
ImfTestFile.cpp
ImfThreading.cpp
ImfTileDescriptionAttribute.cpp
ImfTiledInputFile.cpp
ImfTiledMisc.cpp
ImfTiledOutputFile.cpp
ImfTiledRgbaFile.cpp
ImfTileOffsets.cpp
ImfTimeCodeAttribute.cpp
ImfTimeCode.cpp
ImfVecAttribute.cpp
ImfVersion.cpp
ImfWav.cpp
ImfZipCompressor.cpp
:
[ MultiArchDefaultGristFiles libhalf.a libiex.a libimath.a
libilmthread.a ]
$(TARGET_LIBSTDC++)
[ BuildFeatureAttribute zlib : library ]
;
}
}
UseBuildFeatureHeaders zlib ;
Includes [ FGristFiles ImfPxr24Compressor.cpp ImfZipCompressor.cpp ]
: [ BuildFeatureAttribute zlib : headers ] ;
#StaticLibrary libilmimf.a :
SharedLibrary libilmimf.so :
b44ExpLogTable.cpp
ImfAttribute.cpp
ImfB44Compressor.cpp
ImfBoxAttribute.cpp
ImfChannelListAttribute.cpp
ImfChannelList.cpp
ImfChromaticitiesAttribute.cpp
ImfChromaticities.cpp
ImfCompressionAttribute.cpp
ImfCompressor.cpp
ImfConvert.cpp
ImfCRgbaFile.cpp
ImfDoubleAttribute.cpp
ImfEnvmapAttribute.cpp
ImfEnvmap.cpp
ImfFloatAttribute.cpp
ImfFrameBuffer.cpp
ImfFramesPerSecond.cpp
ImfHeader.cpp
ImfHuf.cpp
ImfInputFile.cpp
ImfIntAttribute.cpp
ImfIO.cpp
ImfKeyCodeAttribute.cpp
ImfKeyCode.cpp
ImfLineOrderAttribute.cpp
ImfLut.cpp
ImfMatrixAttribute.cpp
ImfMisc.cpp
ImfOpaqueAttribute.cpp
ImfOutputFile.cpp
ImfPizCompressor.cpp
ImfPreviewImageAttribute.cpp
ImfPreviewImage.cpp
ImfPxr24Compressor.cpp
ImfRationalAttribute.cpp
ImfRational.cpp
ImfRgbaFile.cpp
ImfRgbaYca.cpp
ImfRleCompressor.cpp
ImfScanLineInputFile.cpp
ImfStandardAttributes.cpp
ImfStdIO.cpp
ImfStringAttribute.cpp
ImfTestFile.cpp
ImfThreading.cpp
ImfTileDescriptionAttribute.cpp
ImfTiledInputFile.cpp
ImfTiledMisc.cpp
ImfTiledOutputFile.cpp
ImfTiledRgbaFile.cpp
ImfTileOffsets.cpp
ImfTimeCodeAttribute.cpp
ImfTimeCode.cpp
ImfVecAttribute.cpp
ImfVersion.cpp
ImfWav.cpp
ImfZipCompressor.cpp
: libhalf.a libiex.a libimath.a libilmthread.a $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute zlib : library ]
;

View File

@ -4,13 +4,18 @@ SubDirSysHdrs [ FDirName $(SUBDIR) ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) iex ] ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) config ] ;
StaticLibrary libilmthread.a :
IlmThread.cpp
IlmThreadMutex.cpp
IlmThreadMutexPosix.cpp
IlmThreadPool.cpp
IlmThreadPosix.cpp
IlmThreadSemaphore.cpp
IlmThreadSemaphorePosixCompat.cpp
IlmThreadSemaphorePosix.cpp
;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
StaticLibrary [ MultiArchDefaultGristFiles libilmthread.a ] :
IlmThread.cpp
IlmThreadMutex.cpp
IlmThreadMutexPosix.cpp
IlmThreadPool.cpp
IlmThreadPosix.cpp
IlmThreadSemaphore.cpp
IlmThreadSemaphorePosixCompat.cpp
IlmThreadSemaphorePosix.cpp
;
}
}

View File

@ -4,16 +4,21 @@ SubDirSysHdrs [ FDirName $(SUBDIR) ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) half ] ;
SubDirSysHdrs [ FDirName $(SUBDIR) $(DOTDOT) iex ] ;
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
}
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
if $(TARGET_PACKAGING_ARCH) = x86_gcc2 {
SubDirC++Flags -Dios_base=ios -ftemplate-depth-24 ;
}
StaticLibrary libimath.a :
ImathBox.cpp
ImathColorAlgo.cpp
ImathFun.cpp
ImathMatrixAlgo.cpp
ImathRandom.cpp
ImathShear.cpp
ImathVec.cpp
;
StaticLibrary [ MultiArchDefaultGristFiles libimath.a ] :
ImathBox.cpp
ImathColorAlgo.cpp
ImathFun.cpp
ImathMatrixAlgo.cpp
ImathRandom.cpp
ImathShear.cpp
ImathVec.cpp
;
}
}

View File

@ -2,11 +2,6 @@ SubDir HAIKU_TOP src kits opengl ;
SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders interface ;
UsePrivateSystemHeaders ;
UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ;
local sources =
GLView.cpp
GLDispatcher.cpp
@ -20,38 +15,52 @@ if $(TARGET_PLATFORM) != haiku {
# We need our public GL headers also when not compiling for Haiku.
}
Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute glu : headers ] ;
Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UseHeaders [ BuildFeatureAttribute mesa : headers : path ] ;
local privateHeaders = [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(privateHeaders) mesa ] ;
UseHeaders [ FDirName $(privateHeaders) mesa main ] ;
UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mapi glapi ] ;
UsePrivateHeaders interface ;
UsePrivateSystemHeaders ;
UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ;
# For older versions of Mesa
UseHeaders [ FDirName $(privateHeaders) mesa glapi ] ;
Includes [ FGristFiles $(sources) ]
: [ BuildFeatureAttribute glu : headers ] ;
Includes [ FGristFiles $(sources) ]
: [ BuildFeatureAttribute mesa : headers ] ;
LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ]
-Xlinker --whole-archive -Xlinker --no-undefined ;
UseHeaders [ BuildFeatureAttribute mesa : headers : path ] ;
local privateHeaders
= [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(privateHeaders) mesa ] ;
UseHeaders [ FDirName $(privateHeaders) mesa main ] ;
UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mapi glapi ] ;
# For GCC2
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) < 3 {
SubDirC++Flags --no-warnings ;
# For older versions of Mesa
UseHeaders [ FDirName $(privateHeaders) mesa glapi ] ;
LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ]
-Xlinker --whole-archive -Xlinker --no-undefined ;
# For GCC2
if $(architecture) = x86_gcc2 {
SubDirC++Flags --no-warnings ;
}
SharedLibrary [ MultiArchDefaultGristFiles libGL.so ] : $(sources) :
# GLU
[ BuildFeatureAttribute glu : library ]
# GLAPI Dispatch code (from Mesa buildpackage)
[ BuildFeatureAttribute mesa : glapiLibrary ]
# External libraries:
game # BWindowScreen needed by BGLScreen stub class
network
be
$(TARGET_LIBSTDC++)
;
}
}
SharedLibrary libGL.so : $(sources) :
# GLU
[ BuildFeatureAttribute glu : library ]
# GLAPI Dispatch code (from Mesa buildpackage)
[ BuildFeatureAttribute mesa : glapiLibrary ]
# External libraries:
game # BWindowScreen needed by BGLScreen stub class
network
be
$(TARGET_LIBSTDC++)
;

View File

@ -1,6 +1,4 @@
SubDir HAIKU_TOP src libs glut ;
UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ;
@ -50,22 +48,31 @@ local sourcesCpp =
;
# For GCC2
if $(TARGET_GCC_VERSION_$(TARGET_PACKAGING_ARCH)[1]) < 3 {
SubDirC++Flags --no-warnings ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
local architecture = $(TARGET_PACKAGING_ARCH) ;
UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ;
# For GCC2
if $(architecture) = x86_gcc2 {
SubDirC++Flags --no-warnings ;
}
# Ensure Mesa dependency is met
Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
SharedLibrary [ MultiArchDefaultGristFiles libglut.so ] :
$(sourcesCpp)
$(sourcesCc)
:
GL game be $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute glu : library ]
;
}
}
# Ensure Mesa dependency is met
Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
SharedLibrary libglut.so :
$(sourcesCpp)
$(sourcesCc)
:
GL game be $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute glu : library ]
;

View File

@ -1,9 +1,5 @@
SubDir HAIKU_TOP src libs tiff ;
UseLibraryHeaders tiff ;
UseBuildFeatureHeaders jpeg ;
UseBuildFeatureHeaders zlib ;
SubDirHdrs [ FDirName $(SUBDIR) $(DOTDOT) shared ] ;
local shared_files =
@ -46,17 +42,28 @@ local shared_files =
tif_zip.c
;
Includes [ FGristFiles tif_jpeg.c tif_ojpeg.c ]
: [ BuildFeatureAttribute jpeg : headers ] ;
Includes [ FGristFiles tif_pixarlog.c tif_zip.c ]
: [ BuildFeatureAttribute zlib : headers ] ;
local architectureObject ;
for architectureObject in [ MultiArchSubDirSetup ] {
on $(architectureObject) {
UseLibraryHeaders tiff ;
UseBuildFeatureHeaders jpeg ;
UseBuildFeatureHeaders zlib ;
Objects $(shared_files) ;
Includes [ FGristFiles tif_jpeg.c tif_ojpeg.c ]
: [ BuildFeatureAttribute jpeg : headers ] ;
Includes [ FGristFiles tif_pixarlog.c tif_zip.c ]
: [ BuildFeatureAttribute zlib : headers ] ;
SharedLibrary libtiff.so : [ FGristFiles $(shared_files:S=.o) ]
:
[ BuildFeatureAttribute jpeg : library ]
[ BuildFeatureAttribute zlib : library ]
: 3.8 ;
Objects $(shared_files) ;
StaticLibrary libtiff.a : [ FGristFiles $(shared_files:S=.o) ] ;
SharedLibrary [ MultiArchDefaultGristFiles libtiff.so ]
: [ FGristFiles $(shared_files:S=.o) ]
:
[ BuildFeatureAttribute jpeg : library ]
[ BuildFeatureAttribute zlib : library ]
: 3.8 ;
StaticLibrary [ MultiArchDefaultGristFiles libtiff.a ]
: [ FGristFiles $(shared_files:S=.o) ] ;
}
}