Update glu and mesa package

Also use the new build feature rules.
This commit is contained in:
Ingo Weinhold
2013-06-14 00:48:08 +02:00
parent 178da21ad1
commit e97e4b74a0
21 changed files with 198 additions and 161 deletions
+39 -63
View File
@@ -264,21 +264,24 @@ if $(TARGET_ARCH) = x86 {
# GLU (GL Utilities) # GLU (GL Utilities)
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
if $(HAIKU_GCC_VERSION[1]) >= 4 { if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_GLU_FILE = glu-9.0-x86-gcc4-2012-11-13.zip ; # TODO:...
HAIKU_GLU_PACKAGE = glu-9.0-x86-gcc4-2012-11-13.zip ;
} else { } else {
HAIKU_GLU_FILE = glu-9.0-x86-gcc2-2012-11-13.zip ; HAIKU_GLU_PACKAGE = glu-9.0.0-1-x86_gcc2.hpkg ;
HAIKU_GLU_DEVEL_PACKAGE = glu_devel-9.0.0-1-x86_gcc2.hpkg ;
} }
local zipFile = [ DownloadFile $(HAIKU_GLU_FILE) HAIKU_GLU_URL = $(hpkgBaseURL)/$(HAIKU_GLU_PACKAGE) ;
: $(baseURL)/lib/$(HAIKU_GLU_FILE) ] ; HAIKU_GLU_DEVEL_URL = $(hpkgBaseURL)/$(HAIKU_GLU_DEVEL_PACKAGE) ;
HAIKU_GLU_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) ExtractBuildFeatureArchives glu :
$(HAIKU_GLU_FILE:B) ] ; file: base $(HAIKU_GLU_URL)
HAIKU_GLU_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_GLU_DIR) runtime: lib
: develop/headers/os/opengl/GL : $(zipFile) : extracted-glu-headers ] ; file: devel $(HAIKU_GLU_DEVEL_URL)
HAIKU_GLU_LIBS = [ ExtractArchive $(HAIKU_GLU_DIR) depends: base
: system/lib/libGLU.a : $(zipFile) : extracted-glu ] ; library: develop/lib/libGLU.so
HAIKU_GLU_HEADERS = [ FDirName $(HAIKU_GLU_DIR) develop headers os opengl ] ; headers: develop/headers
;
EnableBuildFeatures glu ; EnableBuildFeatures glu ;
} else { } else {
@@ -290,64 +293,37 @@ if $(TARGET_ARCH) = x86 {
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
local zipFile ; local zipFile ;
if $(HAIKU_GCC_VERSION[1]) >= 4 { if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_MESA_FILE = mesa-9.1.1-x86-gcc4-2013-04-27.zip ; # TODO:...
HAIKU_MESA_PACKAGE = mesa-9.1.1-x86-gcc4-2013-04-27.zip ;
} else { } else {
HAIKU_MESA_FILE = mesa-7.8.2-x86-gcc2-2013-04-28.zip ; HAIKU_MESA_PACKAGE = mesa-7.8.2-3-x86_gcc2.hpkg ;
HAIKU_MESA_DEVEL_PACKAGE = mesa_devel-7.8.2-3-x86_gcc2.hpkg ;
} }
zipFile = [ DownloadFile $(HAIKU_MESA_FILE) HAIKU_MESA_URL = $(hpkgBaseURL)/$(HAIKU_MESA_PACKAGE) ;
: $(baseURL)/$(HAIKU_MESA_FILE) ] ; HAIKU_MESA_DEVEL_URL = $(hpkgBaseURL)/$(HAIKU_MESA_DEVEL_PACKAGE) ;
HAIKU_MESA_DIR = [ FDirName $(HAIKU_OPTIONAL_BUILD_PACKAGES_DIR) ExtractBuildFeatureArchives mesa : [ FFilterByBuildFeatures
$(HAIKU_MESA_FILE:B) ] ; file: devel $(HAIKU_MESA_DEVEL_URL)
mesaLibrary: develop/lib/libmesa.a
glapiLibrary: develop/lib/libglapi.a
headers: develop/headers
privateHeaders: develop/headers/mesa_private
HAIKU_MESA_HEADERS = [ FDirName $(HAIKU_MESA_DIR) include ] ; !gcc2 @{
HAIKU_MESA_HEADERS_DEPENDENCY = [ ExtractArchive $(HAIKU_MESA_DIR) glslLibrary: develop/lib/libglsl.a
: include/ : $(zipFile) : extracted-mesa ] ; galliumLibrary: develop/lib/libgallium.a
llvm @{
galliumLlvmpipeLibrary: develop/lib/libllvmpipe.a
}@
!llvm @{
galliumSoftpipeLibrary: develop/lib/libsoftpipe.a
}@
}@ # !gcc2
] ;
# Base Mesa libraries Depends [ BuildFeatureAttribute mesa : galliumLlvmpipeLibrary ]
HAIKU_MESA_LIB = [ ExtractArchive $(HAIKU_MESA_DIR) : $(HAIKU_LLVM_LIBS) ;
:
lib.haiku/libmesa.a
: $(zipFile)
: extracted-mesa ] ;
HAIKU_GLAPI_LIB = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libglapi.a
: $(zipFile)
: extracted-mesa ] ;
Depends $(HAIKU_MESA_HEADERS_DEPENDENCY) : $(HAIKU_GLU_HEADERS_DEPENDENCY) ;
Depends $(HAIKU_GLAPI_LIBS) : $(HAIKU_GLU_LIBS) ;
# Extended Mesa libraries for newer versions
if $(HAIKU_GCC_VERSION[1]) >= 4 {
HAIKU_GLSL_LIB = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libglsl.a
: $(zipFile)
: extracted-mesa ] ;
HAIKU_GALLIUM_LIB = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libgallium.a
: $(zipFile)
: extracted-mesa ] ;
if FIsBuildFeatureEnabled(llvm) {
HAIKU_GALLIUM_LLVMPIPE_LIB = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libllvmpipe.a
: $(zipFile)
: extracted-mesa ] ;
Depends $(HAIKU_GALLIUM_LLVMPIPE_LIB) : $(HAIKU_LLVM_LIBS) ;
} else {
HAIKU_GALLIUM_SOFTPIPE_LIB = [ ExtractArchive $(HAIKU_MESA_DIR)
:
lib.haiku/libsoftpipe.a
: $(zipFile)
: extracted-mesa ] ;
}
}
EnableBuildFeatures mesa ; EnableBuildFeatures mesa ;
} else { } else {
+3 -2
View File
@@ -11,7 +11,8 @@ OptionalPackageDependencies Caya : Expat ;
OptionalPackageDependencies CDRecord : GetTextLibintl LibIconv ; OptionalPackageDependencies CDRecord : GetTextLibintl LibIconv ;
OptionalPackageDependencies Curl : OpenSSL ; OptionalPackageDependencies Curl : OpenSSL ;
OptionalPackageDependencies DevelopmentBase : CDRecord DevelopmentMin Yasm ; OptionalPackageDependencies DevelopmentBase : CDRecord DevelopmentMin Yasm ;
OptionalPackageDependencies Development : DevelopmentBase Perl Zlib-devel ; OptionalPackageDependencies Development
: DevelopmentBase GLU-devel Perl Zlib-devel ;
OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ; OptionalPackageDependencies DevelopmentPowerPC : DevelopmentMin ;
OptionalPackageDependencies GetText : GetTextLibintl ; OptionalPackageDependencies GetText : GetTextLibintl ;
OptionalPackageDependencies GetTextLibintl : LibIconv ; OptionalPackageDependencies GetTextLibintl : LibIconv ;
@@ -45,4 +46,4 @@ OptionalPackageDependencies XZ-Utils : Tar ;
OptionalPackageDependencies Zlib-devel : Zlib ; OptionalPackageDependencies Zlib-devel : Zlib ;
OptionalPackageDependencies MandatoryPackages OptionalPackageDependencies MandatoryPackages
: Bzip Ctags Grep ICU LibSolv Sed Tar Zlib ; : Bzip Ctags GLU Grep ICU LibSolv Mesa Sed Tar Zlib ;
+36
View File
@@ -49,6 +49,8 @@
# GetTextLibintl - GetText's libintl # GetTextLibintl - GetText's libintl
# Git - the distributed version control system # Git - the distributed version control system
# GitDoc - documentation for the distributed version control system # GitDoc - documentation for the distributed version control system
# GLU - OpenGL Utilities
# GLU-devel - GLU development files
# GPerf - the perfect hash function generator. # GPerf - the perfect hash function generator.
# Grep - program to search for strings inside a file # Grep - program to search for strings inside a file
# Groff - text formatter used for man pages # Groff - text formatter used for man pages
@@ -959,6 +961,30 @@ if [ IsOptionalHaikuImagePackageAdded GitDoc ] {
} }
# GLU
if [ IsOptionalHaikuImagePackageAdded GLU ] {
if $(TARGET_ARCH) = x86 {
InstallOptionalHaikuImagePackage
$(hpkgBaseURL)/$(HAIKU_GLU_URL)
: system ;
} else {
Echo "No optional package GLU available for $(TARGET_ARCH)" ;
}
}
# GLU-devel
if [ IsOptionalHaikuImagePackageAdded GLU-devel ] {
if $(TARGET_ARCH) = x86 {
InstallOptionalHaikuImagePackage
$(hpkgBaseURL)/$(HAIKU_GLU_DEVEL_PACKAGE)
: system ;
} else {
Echo "No optional package GLU-devel available for $(TARGET_ARCH)" ;
}
}
# GPerf # GPerf
if [ IsOptionalHaikuImagePackageAdded GPerf ] { if [ IsOptionalHaikuImagePackageAdded GPerf ] {
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
@@ -1294,6 +1320,16 @@ if [ IsOptionalHaikuImagePackageAdded Mercurial ] {
} }
# Mesa
if [ IsOptionalHaikuImagePackageAdded Mesa ] {
if $(TARGET_ARCH) = x86 {
InstallOptionalHaikuImagePackage $(HAIKU_MESA_URL) : system ;
} else {
Echo "No optional package Mesa available for $(TARGET_ARCH)" ;
}
}
# Nano # Nano
if [ IsOptionalHaikuImagePackageAdded Nano ] { if [ IsOptionalHaikuImagePackageAdded Nano ] {
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
-11
View File
@@ -97,20 +97,9 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
} }
# libGL.so has GLU (like BeOS) built-in
SYSTEM_LIBS_LIBGL_ALIASES = libGLU.so ;
if $(TARGET_ARCH) = x86 {
local lib ;
for lib in $(SYSTEM_LIBS_LIBGL_ALIASES) {
AddSymlinkToPackage lib : libGL.so : $(lib) ;
}
}
SYSTEM_LIBS_ALIASES = SYSTEM_LIBS_ALIASES =
$(SYSTEM_LIBS_LIBNETWORK_ALIASES) $(SYSTEM_LIBS_LIBNETWORK_ALIASES)
libnetapi.so libnetapi.so
$(SYSTEM_LIBS_LIBGL_ALIASES)
; ;
OPTIONAL_LIBS_ALIASES = OPTIONAL_LIBS_ALIASES =
+6 -6
View File
@@ -22,7 +22,7 @@ AddFilesToPackage lib : $(developmentLibs) ;
# library symlinks # library symlinks
local lib ; local lib ;
for lib in $(SYSTEM_LIBS) $(SYSTEM_LIBS_LIBGL_ALIASES) $(developmentLibs) { for lib in $(SYSTEM_LIBS) $(developmentLibs) {
AddSymlinkToPackage $(developDirTokens) lib : /system/lib $(lib:BS) ; AddSymlinkToPackage $(developDirTokens) lib : /system/lib $(lib:BS) ;
local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ; local abiVersion = [ on $(lib) return $(HAIKU_LIB_ABI_VERSION) ] ;
if $(abiVersion) { if $(abiVersion) {
@@ -88,13 +88,13 @@ if $(HAIKU_GCC_VERSION[1]) = 2 {
# OpenGL headers # OpenGL headers
if $(TARGET_ARCH) = x86 { if $(TARGET_ARCH) = x86 {
local mesaGlHeaders = [ FDirName $(HAIKU_MESA_HEADERS) GL ] ; local mesaGlHeaders
mesaGlHeaders = $(mesaGlHeaders:G=$(HAIKU_MESA_HEADERS_DEPENDENCY:G)) ; = [ FDirName [ BuildFeatureAttribute mesa : headers : path ] GL ] ;
Depends $(mesaGlHeaders) : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; local mesaGlHeadersDependency = [ BuildFeatureAttribute mesa : headers ] ;
mesaGlHeaders = $(mesaGlHeaders:G=$(mesaGlHeadersDependency:G)) ;
Depends $(mesaGlHeaders) : $(mesaGlHeadersDependency) ;
CopyDirectoryToPackage $(developDirTokens) headers os opengl CopyDirectoryToPackage $(developDirTokens) headers os opengl
: $(mesaGlHeaders) : : : isTarget ; : $(mesaGlHeaders) : : : isTarget ;
CopyDirectoryToPackage $(developDirTokens) headers os opengl
: $(HAIKU_GLU_HEADERS_DEPENDENCY) : : : isTarget ;
} }
BuildHaikuPackage $(haikuDevelPackage) : haiku_devel ; BuildHaikuPackage $(haikuDevelPackage) : haiku_devel ;
+13 -12
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src add-ons opengl swpipe ; SubDir HAIKU_TOP src add-ons opengl swpipe ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
@@ -10,13 +10,14 @@ local sources =
GalliumFramebuffer.cpp GalliumFramebuffer.cpp
bitmap_wrapper.cpp ; bitmap_wrapper.cpp ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src gallium auxiliary ] ; local privateHeaders = [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src gallium drivers ] ; UseHeaders [ FDirName $(privateHeaders) gallium auxiliary ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src gallium include ] ; UseHeaders [ FDirName $(privateHeaders) gallium drivers ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; UseHeaders [ FDirName $(privateHeaders) gallium include ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ; UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mesa ] ;
AddResources Software\ Renderer : SoftwareRenderer.rdef ; AddResources Software\ Renderer : SoftwareRenderer.rdef ;
@@ -36,11 +37,11 @@ Addon Software\ Renderer :
$(sources) $(sources)
: :
libGL.so libGL.so
$(HAIKU_GALLIUM_SOFTPIPE_LIB) [ BuildFeatureAttribute mesa : galliumSoftpipeLibrary ]
$(HAIKU_GALLIUM_LLVMPIPE_LIB) [ BuildFeatureAttribute mesa : galliumLlvmpipeLibrary ]
$(HAIKU_MESA_LIB) [ BuildFeatureAttribute mesa : mesaLibrary ]
$(HAIKU_GLSL_LIB) [ BuildFeatureAttribute mesa : glslLibrary ]
$(HAIKU_GALLIUM_LIB) [ BuildFeatureAttribute mesa : galliumLibrary ]
$(HAIKU_LLVM_LIBS) $(HAIKU_LLVM_LIBS)
be translation stdc++ $(TARGET_LIBSUPC++) be translation stdc++ $(TARGET_LIBSUPC++)
; ;
+10 -9
View File
@@ -14,21 +14,22 @@ SubDirC++Flags [ FDefines $(defines) ] ;
local sources = MesaSoftwareRenderer.cpp ; local sources = MesaSoftwareRenderer.cpp ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ; UseHeaders [ BuildFeatureAttribute mesa : headers : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ; local privateHeaders = [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa main ] ; UseHeaders [ FDirName $(privateHeaders) mesa ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; UseHeaders [ FDirName $(privateHeaders) mesa main ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi glapi ] ; UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mapi glapi ] ;
AddResources Software\ Rasterizer : MesaSoftwareRenderer.rdef ; AddResources Software\ Rasterizer : MesaSoftwareRenderer.rdef ;
Addon Software\ Rasterizer : Addon Software\ Rasterizer :
MesaSoftwareRenderer.cpp MesaSoftwareRenderer.cpp
: :
$(HAIKU_MESA_LIB) [ BuildFeatureAttribute mesa : mesaLibrary ]
$(HAIKU_GLSL_LIB) [ BuildFeatureAttribute mesa : glslLibrary ]
libGL.so be $(TARGET_LIBSUPC++) libGL.so be $(TARGET_LIBSUPC++)
; ;
+12 -11
View File
@@ -28,19 +28,20 @@ if $(TARGET_PLATFORM) != haiku {
local sources = MesaSoftwareRenderer.cpp ; local sources = MesaSoftwareRenderer.cpp ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ; UseHeaders [ BuildFeatureAttribute mesa : headers : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ; local privateHeaders = [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa main ] ; UseHeaders [ FDirName $(privateHeaders) mesa ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; UseHeaders [ FDirName $(privateHeaders) mesa main ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi glapi ] ; UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mapi glapi ] ;
# For older versions of Mesa # For older versions of Mesa
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa glapi ] ; UseHeaders [ FDirName $(privateHeaders) mesa glapi ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa tnl ] ; UseHeaders [ FDirName $(privateHeaders) mesa tnl ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa x86 ] ; UseHeaders [ FDirName $(privateHeaders) mesa x86 ] ;
AddResources Legacy\ Software\ Rasterizer : MesaSoftwareRenderer.rdef ; AddResources Legacy\ Software\ Rasterizer : MesaSoftwareRenderer.rdef ;
@@ -48,6 +49,6 @@ AddResources Legacy\ Software\ Rasterizer : MesaSoftwareRenderer.rdef ;
Addon Legacy\ Software\ Rasterizer : Addon Legacy\ Software\ Rasterizer :
$(sources) $(sources)
: :
$(HAIKU_MESA_LIB) [ BuildFeatureAttribute mesa : mesaLibrary ]
libGL.so be $(TARGET_LIBSUPC++) libGL.so be $(TARGET_LIBSUPC++)
; ;
+7 -3
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src add-ons screen_savers flurry ; SubDir HAIKU_TOP src add-ons screen_savers flurry ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
AddResources Message : Flurry.rdef ; AddResources Message : Flurry.rdef ;
@@ -12,13 +12,17 @@ local sources =
Texture.cpp Texture.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
# Dependency needed to trigger downloading/unzipping the package before # Dependency needed to trigger downloading/unzipping the package before
# compiling the files. # compiling the files.
ScreenSaver Flurry : ScreenSaver Flurry :
$(sources) : $(sources) :
be screensaver GL libshared.a $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) be screensaver GL libshared.a $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute glu : library ]
; ;
DoCatalogs Flurry : DoCatalogs Flurry :
+7 -3
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src add-ons screen_savers glife ; SubDir HAIKU_TOP src add-ons screen_savers glife ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -14,7 +14,10 @@ local sources =
GLifeConfig.cpp GLifeConfig.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
# Dependency needed to trigger downloading/unzipping the package before # Dependency needed to trigger downloading/unzipping the package before
# compiling the files. # compiling the files.
@@ -23,6 +26,7 @@ AddResources GLife : GLife.rdef ;
ScreenSaver GLife : ScreenSaver GLife :
$(sources) : $(sources) :
be screensaver GL $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) be screensaver GL $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute glu : library ]
; ;
DoCatalogs GLife : DoCatalogs GLife :
+9 -4
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src add-ons screen_savers gravity ; SubDir HAIKU_TOP src add-ons screen_savers gravity ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
# For GCC2 # For GCC2
if $(HAIKU_GCC_VERSION[1]) < 3 { if $(HAIKU_GCC_VERSION[1]) < 3 {
@@ -18,13 +18,18 @@ local sources =
main.cpp main.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
# Dependency needed to trigger downloading/unzipping the package before # Dependency needed to trigger downloading/unzipping the package before
# compiling the files. # compiling the files.
ScreenSaver Gravity : ScreenSaver Gravity :
$(sources) $(sources)
: be screensaver GL $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++) :
be screensaver GL $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute glu : library ]
; ;
DoCatalogs Gravity : DoCatalogs Gravity :
+2 -2
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src apps 3dmov ; SubDir HAIKU_TOP src apps 3dmov ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -19,7 +19,7 @@ local sources =
GLUtility.cpp GLUtility.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
Application 3DMov : Application 3DMov :
$(sources) $(sources)
+9 -4
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src apps glteapot ; SubDir HAIKU_TOP src apps glteapot ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -13,11 +13,16 @@ local sources =
TeapotApp.cpp TeapotApp.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
Application GLTeapot : Application GLTeapot :
$(sources) $(sources)
: be GL game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++) :
be GL game $(HAIKU_LOCALE_LIBS) $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute glu : library ]
: GLTeapot.rdef : GLTeapot.rdef
; ;
+9 -4
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src apps haiku3d ; SubDir HAIKU_TOP src apps haiku3d ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders mesa ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders glu ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) mesh ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) mesh ] ;
SEARCH_SOURCE += [ FDirName $(SUBDIR) texture ] ; SEARCH_SOURCE += [ FDirName $(SUBDIR) texture ] ;
@@ -30,10 +30,15 @@ local sources =
VideoFileTexture.cpp VideoFileTexture.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
Application Haiku3d : Application Haiku3d :
$(sources) $(sources)
: be game GL media translation $(TARGET_LIBSTDC++) :
be game GL media translation $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute glu : library ]
: Haiku3d.rdef : Haiku3d.rdef
; ;
+13 -12
View File
@@ -4,6 +4,8 @@ SetSubDirSupportedPlatformsBeOSCompatible ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
UsePrivateSystemHeaders ; UsePrivateSystemHeaders ;
UseBuildFeatureHeaders glu ;
UseBuildFeatureHeaders mesa ;
local sources = local sources =
GLView.cpp GLView.cpp
@@ -18,19 +20,18 @@ if $(TARGET_PLATFORM) != haiku {
# We need our public GL headers also when not compiling for Haiku. # We need our public GL headers also when not compiling for Haiku.
} }
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute glu : headers ] ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_GLU_HEADERS_DEPENDENCY) ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) include ] ; UseHeaders [ BuildFeatureAttribute mesa : headers : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa ] ; local privateHeaders = [ BuildFeatureAttribute mesa : privateHeaders : path ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa main ] ; UseHeaders [ FDirName $(privateHeaders) mesa ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi ] ; UseHeaders [ FDirName $(privateHeaders) mesa main ] ;
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mapi glapi ] ; UseHeaders [ FDirName $(privateHeaders) mapi ] ;
UseHeaders [ FDirName $(privateHeaders) mapi glapi ] ;
# For older versions of Mesa # For older versions of Mesa
UseHeaders [ FDirName $(HAIKU_MESA_DIR) src mesa glapi ] ; UseHeaders [ FDirName $(privateHeaders) mesa glapi ] ;
LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ] LINKFLAGS on libGL.so = [ on libGL.so return $(LINKFLAGS) ]
-Xlinker --whole-archive -Xlinker --no-undefined ; -Xlinker --whole-archive -Xlinker --no-undefined ;
@@ -43,10 +44,10 @@ if $(HAIKU_GCC_VERSION[1]) < 3 {
SharedLibrary libGL.so : $(sources) : SharedLibrary libGL.so : $(sources) :
# GLU # GLU
$(HAIKU_GLU_LIBS) [ BuildFeatureAttribute glu : library ]
# GLAPI Dispatch code (from Mesa buildpackage) # GLAPI Dispatch code (from Mesa buildpackage)
$(HAIKU_GLAPI_LIB) [ BuildFeatureAttribute mesa : glapiLibrary ]
# External libraries: # External libraries:
game # BWindowScreen needed by BGLScreen stub class game # BWindowScreen needed by BGLScreen stub class
+7 -4
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src libs glut ; SubDir HAIKU_TOP src libs glut ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -57,12 +57,15 @@ if $(HAIKU_GCC_VERSION[1]) < 3 {
# Ensure Mesa dependency is met # Ensure Mesa dependency is met
Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] Includes [ FGristFiles $(sourcesCc) $(sourcesCpp) ] :
: $(HAIKU_MESA_HEADERS_DEPENDENCY) ; [ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
SharedLibrary libglut.so : SharedLibrary libglut.so :
$(sourcesCpp) $(sourcesCpp)
$(sourcesCc) $(sourcesCc)
: :
GL game be $(TARGET_LIBSTDC++) GL game be $(TARGET_LIBSTDC++)
[ BuildFeatureAttribute glu : library ]
; ;
+2 -2
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src tests kits opengl demos gears ; SubDir HAIKU_TOP src tests kits opengl demos gears ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -15,7 +15,7 @@ local sources =
gears.c gears.c
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
SimpleTest GLGears : SimpleTest GLGears :
+2 -2
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src tests kits opengl direct_mode ; SubDir HAIKU_TOP src tests kits opengl direct_mode ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -14,7 +14,7 @@ local sources =
GLDirectMode.cpp GLDirectMode.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
SimpleTest GLDirectMode : SimpleTest GLDirectMode :
$(sources) $(sources)
+7 -3
View File
@@ -1,6 +1,6 @@
SubDir HAIKU_TOP src tests kits opengl glinfo ; SubDir HAIKU_TOP src tests kits opengl glinfo ;
SubDirSysHdrs $(HAIKU_GLU_HEADERS) ; UseBuildFeatureHeaders glu ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
UsePrivateHeaders interface ; UsePrivateHeaders interface ;
@@ -14,7 +14,10 @@ local sources =
GearsView.cpp GearsView.cpp
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] :
[ BuildFeatureAttribute glu : headers ]
[ BuildFeatureAttribute mesa : headers ]
;
# Dependency needed to trigger downloading/unzipping the package before # Dependency needed to trigger downloading/unzipping the package before
# compiling the files. # compiling the files.
@@ -24,6 +27,7 @@ Preference GLInfo :
be GL libglut.so be GL libglut.so
translation libcolumnlistview.a $(HAIKU_LOCALE_LIBS) translation libcolumnlistview.a $(HAIKU_LOCALE_LIBS)
$(TARGET_LIBSUPC++) $(TARGET_LIBSUPC++)
[ BuildFeatureAttribute glu : library ]
: :
GLInfo.rdef GLInfo.rdef
; ;
+3 -2
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src tests kits opengl glsl ; SubDir HAIKU_TOP src tests kits opengl glsl ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -14,7 +14,8 @@ local shadersources =
shaderutil.c shaderutil.c
; ;
Includes [ FGristFiles $(shadersources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(shadersources) ]
: [ BuildFeatureAttribute mesa : headers ] ;
StaticLibrary libshaderutil.a : StaticLibrary libshaderutil.a :
$(shadersources) $(shadersources)
+2 -2
View File
@@ -1,5 +1,5 @@
SubDir HAIKU_TOP src tests kits opengl glut game_mode ; SubDir HAIKU_TOP src tests kits opengl glut game_mode ;
SubDirSysHdrs $(HAIKU_MESA_HEADERS) ; UseBuildFeatureHeaders mesa ;
SetSubDirSupportedPlatformsBeOSCompatible ; SetSubDirSupportedPlatformsBeOSCompatible ;
@@ -14,7 +14,7 @@ local sources =
game_mode.c game_mode.c
; ;
Includes [ FGristFiles $(sources) ] : $(HAIKU_MESA_HEADERS_DEPENDENCY) ; Includes [ FGristFiles $(sources) ] : [ BuildFeatureAttribute mesa : headers ] ;
SimpleTest GLUTGameMode : SimpleTest GLUTGameMode :
$(sources) $(sources)