Initial rework of the build system to support the latest Haiku changes. Patch from Adrien Destgues included, Thanks!

This commit is contained in:
barrett17 2013-10-12 17:59:00 +00:00
parent 00440a3ffc
commit 007d2bda0a
8 changed files with 54 additions and 106 deletions

View File

@ -46,20 +46,16 @@ LOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(GENERATED_DIR) ;
include [ FDirName $(JAM_DIR) CheckRules ] ;
CheckGccPlatform ;
#CheckCurl ;
#if ! $(HAVE_CURL) {
# Echo "** Caya needs Curl" ;
#}
CheckCaya ;
if ! $(HAVE_CAYA) {
Echo "** Caya library is needed!" ;
Exit 1 ;
}
CheckOpenSSL ;
if ! $(HAVE_OPENSSL) {
Echo "** MSN, Jabber, GoogleTalk and Facebook protocols are disabled for lack of OpenSSL" ;
Echo "Warning OpenSSL is missing!" ;
exit 0 ;
}
CheckExpat ;
if ! $(HAVE_EXPAT) {
Echo "Warning Expat is missing!" ;
exit 1 ;
}
# Include jam scripts

View File

@ -68,6 +68,8 @@ Depends Caya : libinterface.a ;
Depends Caya : librunview.a ;
Depends Caya : libsupport.a ;
LINKFLAGS on Caya += -L$(EXPAT_LIBRARY_DIR) ;
InstallBin $(CAYA_DIRECTORY) : Caya ;
InstallFile $(COMMON_INCLUDE_DIRECTORY)/caya : CayaConstants.h ;

View File

@ -14,7 +14,7 @@ rule CheckGccPlatform
# /boot/develop/lib/x86 to judge whether this is a BeOS compatible and thus
# gcc 2 platform. This is not entirely correct, but should be good enough
# for the time being.
local haveLibStdC++.R4 = [ Glob /boot/develop/lib/x86 : libstdc++.r4.so ] ;
local haveLibStdC++.R4 = [ Glob /boot/system/develop/tools/lib : libstdc++.r4.so ] ;
if ! $(haveLibStdC++.R4) {
IS_GCC4_PLATFORM = 1 ;
Echo Using GCC4 platform ;
@ -33,101 +33,38 @@ rule CheckOpenSSL
OPENSSL_INCLUDE_DIR = ;
OPENSSL_LIBRARY_DIR = ;
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/openssl : ssl.h ] ;
local haveHeaders = [ Glob $(USER_INCLUDE_DIRECTORY)/openssl : ssl.h ] ;
if $(haveHeaders) {
OPENSSL_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/openssl ;
OPENSSL_INCLUDE_DIR = $(USER_INCLUDE_DIRECTORY) ;
local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libssl.so ] ;
local haveLibs = [ Glob $(USER_LIB_DIRECTORY) : libssl.so ] ;
if $(haveLibs) {
OPENSSL_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
OPENSSL_LIBRARY_DIR = $(USER_LIB_DIRECTORY) ;
Echo OpenSSL Headers: $(OPENSSL_INCLUDE_DIR) ;
Echo OpenSSL Libs: $(OPENSSL_LIBRARY_DIR) ;
}
HAVE_OPENSSL = $(haveLibs) ;
}
}
rule CheckCurl
rule CheckExpat
{
# CheckCurl ;
# Check for Curl and defined HAVE_CURL according, it also defines
# CURL_INCLUDE_DIR and CURL_LIBRARY_DIR with location of respectively
# include and library files.
HAVE_EXPAT = ;
EXPAT_INCLUDE_DIR = ;
EXPAT_LIBRARY_DIR = ;
HAVE_CURL = ;
CURL_INCLUDE_DIR = ;
CURL_LIBRARY_DIR = ;
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/curl : curl.h ] ;
local haveHeaders = [ Glob $(USER_INCLUDE_DIRECTORY)/ : expat.h ] ;
if $(haveHeaders) {
CURL_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/curl ;
EXPAT_INCLUDE_DIR = $(USER_INCLUDE_DIRECTORY)/ ;
local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libcurl.so ] ;
local haveLibs = [ Glob $(USER_LIB_DIRECTORY) : libexpat.so ] ;
if $(haveLibs) {
CURL_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
EXPAT_LIBRARY_DIR = $(USER_LIB_DIRECTORY) ;
Echo Curl Headers: $(CURL_INCLUDE_DIR) ;
Echo Curl Libs: $(CURL_LIBRARY_DIR) ;
Echo Expat Headers: $(EXPAT_INCLUDE_DIR) ;
Echo Expat Libs: $(EXPAT_LIBRARY_DIR) ;
}
HAVE_CURL = $(haveLibs) ;
HAVE_EXPAT = $(haveLibs) ;
}
}
rule CheckLibYahoo2
{
# CheckLibYahoo2
# Check for LibYahoo2 and defined HAVE_LIBYAHOO2 according, it also defines
# LIBYAHOO2_INCLUDE_DIR and LIBYAHOO2_LIBRARY_DIR with location of respectively
# include and library files.
HAVE_LIBYAHOO2 = ;
LIBYAHOO2_INCLUDE_DIR = ;
LIBYAHOO2_LIBRARY_DIR = ;
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/libyahoo2 : yahoo2.h ] ;
if $(haveHeaders) {
LIBYAHOO2_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/libyahoo2 ;
local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libyahoo2.so ] ;
if $(haveLibs) {
LIBYAHOO2_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
Echo Yahoo Headers: $(LIBYAHOO2_INCLUDE_DIR) ;
Echo Yahoo Libs: $(LIBYAHOO2_LIBRARY_DIR) ;
}
HAVE_LIBYAHOO2 = $(haveLibs) ;
}
}
rule CheckCaya
{
# CheckCaya
# Check for Caya and defined HAVE_CAYA according, it also defines
# CAYA_INCLUDE_DIR and CAYA_LIBRARY_DIR with location of respectively
# include and library files.
HAVE_CAYA = ;
CAYA_INCLUDE_DIR = ;
CAYA_LIBRARY_DIR = ;
local haveHeaders = [ Glob $(COMMON_INCLUDE_DIRECTORY)/caya : CayaProtocol.h ] ;
if $(haveHeaders) {
CAYA_INCLUDE_DIR = $(COMMON_INCLUDE_DIRECTORY)/caya ;
# local haveLibs = [ Glob $(COMMON_LIB_DIRECTORY) : libinfopopper.so ] ;
# if $(haveLibs) {
# CAYA_LIBRARY_DIR = $(COMMON_LIB_DIRECTORY) ;
Echo Caya Headers: $(CAYA_INCLUDE_DIR) ;
# Echo Caya Libs: $(CAYA_LIBRARY_DIR) ;
# }
# HAVE_CAYA = $(haveLibs) ;
}
HAVE_CAYA = $(haveHeaders) ;
}

24
configure vendored
View File

@ -121,23 +121,27 @@ SETTYPE = ${settypebin} ;
MIMESET = ${mimesetbin} ;
SETVERSION = ${setversionbin} ;
COPYATTR = ${copyattrbin} ;
COMMON_BIN_DIRECTORY = $(finddir B_SYSTEM_BIN_DIRECTORY) ;
COMMON_INCLUDE_DIRECTORY = $(finddir B_SYSTEM_HEADERS_DIRECTORY) ;
COMMON_LIB_DIRECTORY = $(finddir B_SYSTEM_DEVELOP_DIRECTORY)/lib ;
COMMON_SERVERS_DIRECTORY = $(finddir B_SYSTEM_SERVERS_DIRECTORY) ;
COMMON_ADDONS_DIRECTORY = $(finddir B_SYSTEM_ADDONS_DIRECTORY) ;
COMMON_DEVELOP_DIRECTORY = $(finddir B_SYSTEM_DEVELOP_DIRECTORY) ;
COMMON_DIRECTORY = $(finddir B_COMMON_DIRECTORY) ;
COMMON_BIN_DIRECTORY = $(finddir B_COMMON_BIN_DIRECTORY) ;
COMMON_INCLUDE_DIRECTORY = $(finddir B_COMMON_DIRECTORY)/include ;
COMMON_LIB_DIRECTORY = $(finddir B_COMMON_LIB_DIRECTORY) ;
COMMON_SERVERS_DIRECTORY = $(finddir B_COMMON_SERVERS_DIRECTORY) ;
COMMON_ADDONS_DIRECTORY = $(finddir B_COMMON_ADDONS_DIRECTORY) ;
COMMON_DEVELOP_DIRECTORY = $(finddir B_COMMON_DEVELOP_DIRECTORY) ;
USER_CONFIG_DIRECTORY = $(finddir B_USER_CONFIG_DIRECTORY) ;
USER_INCLUDE_DIRECTORY = $(finddir B_USER_CONFIG_DIRECTORY)/include ;
USER_INCLUDE_DIRECTORY = $(finddir B_USER_HEADERS_DIRECTORY) ;
USER_LIB_DIRECTORY = $(finddir B_USER_DEVELOP_DIRECTORY)/lib ;
SYSTEM_DIRECTORY = $(finddir B_SYSTEM_DIRECTORY) ;
SYSTEM_LIB_DIRECTORY = $(finddir B_SYSTEM_LIB_DIRECTORY) ;
BEOS_PREFERENCES_DIRECTORY = $(finddir B_BEOS_PREFERENCES_DIRECTORY) ;
PREFERENCES_DIRECTORY = $(finddir B_PREFERENCES_DIRECTORY) ;
USER_PREFERENCES_DIRECTORY = $(finddir B_USER_CONFIG_DIRECTORY)/be/Preferences ;
APPS_DIRECTORY = $(finddir B_APPS_DIRECTORY) ;
CAYA_DIRECTORY = $(finddir B_APPS_DIRECTORY)/Caya ;
APPS_DIRECTORY = $(finddir B_USER_APPS_DIRECTORY) ;
CAYA_DIRECTORY = $(finddir B_USER_APPS_DIRECTORY)/Caya ;
DEFINES += ${defines} ;
EOF

View File

@ -6,7 +6,7 @@ SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;
SEARCH_SOURCE += [ FDirName $(TOP) libs ] ;
StaticLibrary libgloox.a :
local sources =
adhoc.cpp
amp.cpp
annotations.cpp
@ -104,3 +104,8 @@ StaticLibrary libgloox.a :
vcardupdate.cpp
xhtmlim.cpp
;
StaticLibrary libgloox.a : $(sources) ;
Depends libssl.so ;

View File

@ -3,6 +3,8 @@ SubDir TOP libs librunview ;
SubDirSysHdrs [ FDirName $(TOP) ] ;
SubDirSysHdrs [ FDirName $(TOP) libs ] ;
SubDirSysHdrs [ FDirName $(EXPAT_INCLUDE_DIR) ] ;
SEARCH_SOURCE += [ FDirName $(TOP) libs ] ;
local sources =
@ -15,7 +17,7 @@ local sources =
Emoconfig.cpp
;
StaticLibrary librunview.a : $(sources) ;
Depends libjabber.a ;
LINKFLAGS on librunview.a += -L$(EXPAT_LIBRARY_DIR) ;

View File

@ -4,9 +4,9 @@ SubDirSysHdrs [ FDirName $(TOP) ] ;
SubDirSysHdrs [ FDirName $(TOP) libs ] ;
SubDirSysHdrs [ FDirName $(TOP) libs libyahoo2 ] ;
#SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;
SubDirSysHdrs [ FDirName $(OPENSSL_INCLUDE_DIR) ] ;
#SEARCH_SOURCE += [ FDirName $(TOP) libs ] ;
SEARCH_SOURCE += [ FDirName $(TOP) libs ] ;
local sources =
# libyahoo

View File

@ -1,5 +1,7 @@
SubDir TOP protocols ;
CAYA_INCLUDE_DIR = $(TOP) application ;
# Include all the components.
SubInclude TOP protocols aim ;
SubInclude TOP protocols xmpp ;