Use libbe_build also on Haiku

This means the build tools will no longer be built against the host
platform's libbe, which avoids compatibility problems -- e.g. an
older Haiku host libbe may not have certain features the build tools
require -- and also makes the build behave more similiar on Haiku and
other platforms. The host libroot dependency still remains and is not
easy to get rid of.

Also remove some bits of BeOS/Dano/Zeta build support.
This commit is contained in:
Ingo Weinhold
2013-05-09 18:08:55 +02:00
parent 0c53204ecc
commit 204dee708a
14 changed files with 52 additions and 131 deletions
+19 -30
View File
@@ -788,13 +788,6 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE)
HOST_DEFINES += $(HOST_ARCH_MACRO_DEFINE) ; HOST_DEFINES += $(HOST_ARCH_MACRO_DEFINE) ;
HOST_DEFINES += _NO_INLINE_ASM ; HOST_DEFINES += _NO_INLINE_ASM ;
if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
# TODO: That's obviously not correct, but in the way the COMPILE_FOR_R5
# macro is used, it actually seems to mean r5/bone/dano.
# TODO: Deprecated. Remove!
HOST_DEFINES += COMPILE_FOR_R5 ;
}
# for builds of tools in the current environment # for builds of tools in the current environment
HOST_BUILD_COMPATIBILITY_LIB_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) lib ] ; HOST_BUILD_COMPATIBILITY_LIB_DIR = [ FDirName $(HOST_OBJECT_BASE_DIR) lib ] ;
@@ -814,8 +807,9 @@ if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_LIBROOT = root ; HOST_LIBROOT = root ;
HOST_STATIC_LIBROOT = $(HOST_LIBROOT) ; HOST_STATIC_LIBROOT = $(HOST_LIBROOT) ;
HOST_LIBBE = be ; HOST_LIBBE = libbe_build.so ;
HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR = "export LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ; HOST_ADD_BUILD_COMPATIBILITY_LIB_DIR
= "export LIBRARY_PATH=$LIBRARY_PATH:$(HOST_BUILD_COMPATIBILITY_LIB_DIR)" ;
HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ; HOST_LIBRARY_NAME_MAP_input_server = /system/servers/input_server ;
HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ; HOST_DEFINES += __STDC_FORMAT_MACROS __STDC_LIMIT_MACROS ;
@@ -951,31 +945,26 @@ HOST_BE_API_HEADERS = ;
HOST_BE_API_CCFLAGS = ; HOST_BE_API_CCFLAGS = ;
HOST_BE_API_C++FLAGS = ; HOST_BE_API_C++FLAGS = ;
if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_BE_API_HEADERS =
[ FDirName $(HAIKU_TOP) headers build ]
[ FDirName $(HAIKU_TOP) headers build os ]
[ FDirName $(HAIKU_TOP) headers build os app ]
[ FDirName $(HAIKU_TOP) headers build os drivers ]
[ FDirName $(HAIKU_TOP) headers build os kernel ]
[ FDirName $(HAIKU_TOP) headers build os interface ]
[ FDirName $(HAIKU_TOP) headers build os locale ]
[ FDirName $(HAIKU_TOP) headers build os opengl ]
[ FDirName $(HAIKU_TOP) headers build os storage ]
[ FDirName $(HAIKU_TOP) headers build os support ]
[ FDirName $(HAIKU_TOP) headers build private ]
;
HOST_BE_API_CCFLAGS = -include BeOSBuildCompatibility.h ;
HOST_BE_API_C++FLAGS = $(HOST_BE_API_CCFLAGS) ;
}
# Add directory with system headers we need when building something for the host # Add directory with system headers we need when building something for the host
# platform, e.g. containing missing POSIX/GNU headers. # platform, e.g. containing missing POSIX/GNU headers.
HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ; HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host $(HOST_PLATFORM) ] ;
# For all versions of BeOS also add the common beos directory. HOST_BE_API_HEADERS =
if $(HOST_PLATFORM) in r5 bone dano { [ FDirName $(HAIKU_TOP) headers build ]
HOST_HDRS += [ FDirName $(HAIKU_TOP) headers build host beos_common ] ; [ FDirName $(HAIKU_TOP) headers build os ]
[ FDirName $(HAIKU_TOP) headers build os app ]
[ FDirName $(HAIKU_TOP) headers build os drivers ]
[ FDirName $(HAIKU_TOP) headers build os kernel ]
[ FDirName $(HAIKU_TOP) headers build os interface ]
[ FDirName $(HAIKU_TOP) headers build os locale ]
[ FDirName $(HAIKU_TOP) headers build os opengl ]
[ FDirName $(HAIKU_TOP) headers build os storage ]
[ FDirName $(HAIKU_TOP) headers build os support ]
[ FDirName $(HAIKU_TOP) headers build private ]
;
if ! $(HOST_PLATFORM_BEOS_COMPATIBLE) {
HOST_BE_API_CCFLAGS = -include BeOSBuildCompatibility.h ;
HOST_BE_API_C++FLAGS = $(HOST_BE_API_CCFLAGS) ;
} }
+1
View File
@@ -0,0 +1 @@
#include "/boot/system/develop/headers/os/support/Errors.h"
@@ -0,0 +1 @@
#include "/boot/system/develop/headers/config/HaikuConfig.h"
@@ -0,0 +1 @@
#include "/boot/system/develop/headers/config/types.h"
+1 -1
View File
@@ -439,7 +439,7 @@ copy_entry(const char *sourcePath, const char *destPath,
destNode->SetOwner(sourceStat.st_uid); destNode->SetOwner(sourceStat.st_uid);
destNode->SetGroup(sourceStat.st_gid); destNode->SetGroup(sourceStat.st_gid);
destNode->SetPermissions(sourceStat.st_mode); destNode->SetPermissions(sourceStat.st_mode);
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
destNode->SetCreationTime(sourceStat.st_crtime); destNode->SetCreationTime(sourceStat.st_crtime);
#endif #endif
destNode->SetModificationTime(sourceStat.st_mtime); destNode->SetModificationTime(sourceStat.st_mtime);
+13 -13
View File
@@ -491,7 +491,7 @@ Keymap::LoadSource(FILE* file)
status_t status_t
Keymap::SaveAsCurrent() Keymap::SaveAsCurrent()
{ {
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
BPath path; BPath path;
status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path, true); status_t status = find_directory(B_USER_SETTINGS_DIRECTORY, &path, true);
if (status != B_OK) if (status != B_OK)
@@ -564,7 +564,7 @@ Keymap::SaveAsSource(const char* name)
if (file == NULL) if (file == NULL)
return errno; return errno;
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
text_run_array* textRuns; text_run_array* textRuns;
_SaveSourceText(file, &textRuns); _SaveSourceText(file, &textRuns);
@@ -718,7 +718,7 @@ Keymap::SaveAsCppHeader(const char* fileName, const char* mapName)
status_t status_t
Keymap::Use() Keymap::Use()
{ {
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
return _restore_key_map_(); return _restore_key_map_();
#else // ! __BEOS__ #else // ! __BEOS__
@@ -731,7 +731,7 @@ Keymap::Use()
void void
Keymap::RestoreSystemDefault() Keymap::RestoreSystemDefault()
{ {
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
// work-around to get rid of this stupid find_directory_r() on Zeta // work-around to get rid of this stupid find_directory_r() on Zeta
# ifdef find_directory # ifdef find_directory
# undef find_directory # undef find_directory
@@ -790,7 +790,7 @@ Keymap::GetKey(const char* chars, int32 offset, char* buffer, size_t bufferSize)
} }
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
void void
Keymap::_SaveSourceText(FILE* file, text_run_array** _textRuns) Keymap::_SaveSourceText(FILE* file, text_run_array** _textRuns)
{ {
@@ -808,7 +808,7 @@ Keymap::_SaveSourceText(FILE* file)
static const rgb_color kCommentColor = (rgb_color){200, 92, 92, 255}; static const rgb_color kCommentColor = (rgb_color){200, 92, 92, 255};
static const rgb_color kTextColor = (rgb_color){0, 0, 0, 255}; static const rgb_color kTextColor = (rgb_color){0, 0, 0, 255};
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
BFont font = *be_fixed_font; BFont font = *be_fixed_font;
if (runs != NULL) { if (runs != NULL) {
@@ -822,7 +822,7 @@ Keymap::_SaveSourceText(FILE* file)
"#\n" "#\n"
"#\tRaw key numbering for 102-key keyboard...\n"); "#\tRaw key numbering for 102-key keyboard...\n");
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[1].offset = bytes; runs->runs[1].offset = bytes;
runs->runs[1].font = font; runs->runs[1].font = font;
@@ -851,7 +851,7 @@ Keymap::_SaveSourceText(FILE* file)
"# [ ctrl ] [ cmd ] [ space ] [ cmd ] [ ctrl ] [lft] [dwn] [rgt] [ 0 ] [ . ]\n" "# [ ctrl ] [ cmd ] [ space ] [ cmd ] [ ctrl ] [lft] [dwn] [rgt] [ 0 ] [ . ]\n"
"# 0x5c 0x5d 0x5e 0x5f 0x60 0x61 0x62 0x63 0x64 0x65\n"); "# 0x5c 0x5d 0x5e 0x5f 0x60 0x61 0x62 0x63 0x64 0x65\n");
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[2].offset = bytes; runs->runs[2].offset = bytes;
runs->runs[2].font = font; runs->runs[2].font = font;
@@ -871,7 +871,7 @@ Keymap::_SaveSourceText(FILE* file)
"#\t\t\tkeypad '=' = 0x6a\n" "#\t\t\tkeypad '=' = 0x6a\n"
"#\t\t\tpower key = 0x6b\n"); "#\t\t\tpower key = 0x6b\n");
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[3].offset = bytes; runs->runs[3].offset = bytes;
runs->runs[3].font = *be_fixed_font; runs->runs[3].font = *be_fixed_font;
@@ -898,7 +898,7 @@ Keymap::_SaveSourceText(FILE* file)
fKeys.left_control_key, fKeys.right_control_key, fKeys.left_control_key, fKeys.right_control_key,
fKeys.left_option_key, fKeys.right_option_key, fKeys.menu_key); fKeys.left_option_key, fKeys.right_option_key, fKeys.menu_key);
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[4].offset = bytes; runs->runs[4].offset = bytes;
runs->runs[4].font = *be_fixed_font; runs->runs[4].font = *be_fixed_font;
@@ -915,7 +915,7 @@ Keymap::_SaveSourceText(FILE* file)
"# LockSettings = CapsLock NumLock ScrollLock\n" "# LockSettings = CapsLock NumLock ScrollLock\n"
"#\n"); "#\n");
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[5].offset = bytes; runs->runs[5].offset = bytes;
runs->runs[5].font = *be_fixed_font; runs->runs[5].font = *be_fixed_font;
@@ -932,7 +932,7 @@ Keymap::_SaveSourceText(FILE* file)
bytes += fprintf(file, "ScrollLock "); bytes += fprintf(file, "ScrollLock ");
bytes += fprintf(file, "\n"); bytes += fprintf(file, "\n");
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[6].offset = bytes; runs->runs[6].offset = bytes;
runs->runs[6].font = *be_fixed_font; runs->runs[6].font = *be_fixed_font;
@@ -950,7 +950,7 @@ Keymap::_SaveSourceText(FILE* file)
"C Cs Co Cos \n", file); "C Cs Co Cos \n", file);
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
if (runs != NULL) { if (runs != NULL) {
runs->runs[7].offset = bytes; runs->runs[7].offset = bytes;
runs->runs[7].font = *be_fixed_font; runs->runs[7].font = *be_fixed_font;
+2 -2
View File
@@ -12,7 +12,7 @@
#include <Keymap.h> #include <Keymap.h>
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
# include <TextView.h> # include <TextView.h>
#endif #endif
@@ -43,7 +43,7 @@ public:
char* buffer, size_t bufferSize); char* buffer, size_t bufferSize);
private: private:
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
void _SaveSourceText(FILE* file, void _SaveSourceText(FILE* file,
text_run_array** _textRuns = NULL); text_run_array** _textRuns = NULL);
#else #else
@@ -43,7 +43,7 @@
# define USE_PARTITION_MAP 1 # define USE_PARTITION_MAP 1
#endif #endif
#ifdef __HAIKU__ #ifdef HAIKU_TARGET_PLATFORM_HAIKU
# include <image.h> # include <image.h>
# include <DiskDevice.h> # include <DiskDevice.h>
@@ -197,7 +197,7 @@ write_boot_code_part(const char *fileName, int fd, off_t imageOffset,
} }
#ifdef __HAIKU__ #ifdef HAIKU_TARGET_PLATFORM_HAIKU
static status_t static status_t
find_own_image(image_info *info) find_own_image(image_info *info)
@@ -297,7 +297,7 @@ main(int argc, const char *const *argv)
// read the boot code // read the boot code
uint8 *bootCodeData = NULL; uint8 *bootCodeData = NULL;
#ifndef __HAIKU__ #ifndef HAIKU_TARGET_PLATFORM_HAIKU
bootCodeData = read_boot_code_data(argv[0]); bootCodeData = read_boot_code_data(argv[0]);
#else #else
image_info info; image_info info;
@@ -334,7 +334,7 @@ main(int argc, const char *const *argv)
int64 partitionOffset = 0; int64 partitionOffset = 0;
fs_info info; // needs to be here (we use the device name later) fs_info info; // needs to be here (we use the device name later)
if (S_ISDIR(st.st_mode)) { if (S_ISDIR(st.st_mode)) {
#if defined(__BEOS__) || defined(__HAIKU__) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
// a directory: get the device // a directory: get the device
error = fs_stat_dev(st.st_dev, &info); error = fs_stat_dev(st.st_dev, &info);
@@ -361,7 +361,8 @@ main(int argc, const char *const *argv)
} else if (S_ISCHR(st.st_mode)) { } else if (S_ISCHR(st.st_mode)) {
// character special: a device or partition under BeOS // character special: a device or partition under BeOS
// or under FreeBSD // or under FreeBSD
#if !(defined(__BEOS__) || defined(__HAIKU__)) && !defined(HAIKU_HOST_PLATFORM_FREEBSD) #if !defined(HAIKU_TARGET_PLATFORM_HAIKU) \
&& !defined(HAIKU_HOST_PLATFORM_FREEBSD)
fprintf(stderr, "Error: Character special devices not " fprintf(stderr, "Error: Character special devices not "
"supported on this platform.\n"); "supported on this platform.\n");
@@ -612,11 +613,11 @@ main(int argc, const char *const *argv)
partitionOffset = partition->Offset(); partitionOffset = partition->Offset();
#else #else
// partitions are block devices under Haiku, but not under BeOS // partitions are block devices under Haiku, but not under BeOS
#ifndef __HAIKU__ #ifdef HAIKU_TARGET_PLATFORM_HAIKU
fprintf(stderr, "Error: Block devices not supported on this " fprintf(stderr, "Error: Block devices not supported on this "
"platform!\n"); "platform!\n");
exit(1); exit(1);
#endif // __HAIKU__ #endif // HAIKU_TARGET_PLATFORM_HAIKU
#endif #endif
} else { } else {
@@ -633,7 +634,7 @@ main(int argc, const char *const *argv)
exit(1); exit(1);
} }
#if (defined(__BEOS__) || defined(__HAIKU__)) #ifdef HAIKU_TARGET_PLATFORM_HAIKU
// get a partition info // get a partition info
if (!noPartition if (!noPartition
@@ -668,7 +669,7 @@ main(int argc, const char *const *argv)
kSecondBootCodePartOffset, kSecondBootCodePartSize, kSecondBootCodePartOffset, kSecondBootCodePartSize,
dryRun); dryRun);
#ifdef __HAIKU__ #ifdef HAIKU_TARGET_PLATFORM_HAIKU
// check if this partition is mounted // check if this partition is mounted
BDiskDeviceRoster roster; BDiskDeviceRoster roster;
BPartition* partition; BPartition* partition;
@@ -703,7 +704,7 @@ main(int argc, const char *const *argv)
"partition is mounted!\n"); "partition is mounted!\n");
} }
} }
#endif // __HAIKU__ #endif // HAIKU_TARGET_PLATFORM_HAIKU
close(fd); close(fd);
} }
-9
View File
@@ -1,14 +1,5 @@
SubDir HAIKU_TOP src build libpackage ; SubDir HAIKU_TOP src build libpackage ;
# TODO: Hack to make things build on Haiku. The right solution is to build
# libbe_build and friends on Haiku as well and use the exact same build
# environment as on other systems.
if $(HOST_PLATFORM) = haiku_host {
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
UsePrivateBuildHeaders . ;
}
UsePrivateBuildHeaders kernel package shared ; UsePrivateBuildHeaders kernel package shared ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package ] ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits package ] ;
-1
View File
@@ -2,7 +2,6 @@ SubDir HAIKU_TOP src build libshared ;
USES_BE_API on libshared_build.a = true ; USES_BE_API on libshared_build.a = true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UsePrivateBuildHeaders shared ; UsePrivateBuildHeaders shared ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits shared ] ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src kits shared ] ;
+3 -37
View File
@@ -1,6 +1,5 @@
SubDir HAIKU_TOP src tools ; SubDir HAIKU_TOP src tools ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UsePrivateBuildHeaders app storage ; UsePrivateBuildHeaders app storage ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src/bin ] ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src/bin ] ;
@@ -22,16 +21,6 @@ local tools =
USES_BE_API on $(tools) = true ; USES_BE_API on $(tools) = true ;
# TODO: temporary kludge
local libHaikuCompat ;
if $(HOST_PLATFORM) in r5 bone dano {
ObjectC++Flags database_support.cpp UpdateMimeInfoThread.cpp
MimeUpdateThread.cpp
: -include [ FDirName $(HAIKU_TOP) headers build
HaikuBuildCompatibility.h ] ;
libHaikuCompat = libhaikucompat_build.a ;
}
BuildPlatformMain <build>catattr : catattr.cpp : $(HOST_LIBBE) ; BuildPlatformMain <build>catattr : catattr.cpp : $(HOST_LIBBE) ;
UsePrivateObjectHeaders copyattr.cpp : shared : : true ; UsePrivateObjectHeaders copyattr.cpp : shared : : true ;
@@ -55,34 +44,11 @@ BuildPlatformMain <build>generate_boot_screen :
BuildPlatformMain <build>listattr : listattr.cpp : $(HOST_LIBBE) ; BuildPlatformMain <build>listattr : listattr.cpp : $(HOST_LIBBE) ;
if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
AddResources <build>mimeset : mimeset.rdef ;
}
local mimesetSources =
mimeset.cpp
# Mime.cpp
# UpdateMimeInfoThread.cpp
# MimeUpdateThread.cpp
;
if $(HOST_PLATFORM) = haiku_host {
mimesetSources += AppFileInfo.cpp ;
}
BuildPlatformMain <build>mimeset : BuildPlatformMain <build>mimeset :
$(mimesetSources) mimeset.cpp
: $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(libHaikuCompat) : $(HOST_LIBBE) $(HOST_LIBSTDC++) $(HOST_LIBSUPC++)
; ;
if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
SEARCH on [ FGristFiles AppFileInfo.cpp ]
= [ FDirName $(HAIKU_TOP) src build libbe storage ] ;
SourceSysHdrs AppFileInfo.cpp UpdateMimeInfoThread.cpp
: [ FDirName $(HAIKU_TOP) headers build os storage ] ;
}
BuildPlatformMain <build>mkindex : mkindex.cpp : $(HOST_LIBBE) ; BuildPlatformMain <build>mkindex : mkindex.cpp : $(HOST_LIBBE) ;
BuildPlatformMain <build>rm_attrs_tmp : rm_attrs.cpp BuildPlatformMain <build>rm_attrs_tmp : rm_attrs.cpp
@@ -101,7 +67,7 @@ BuildPlatformMain <build>settype : settype.cpp : $(HOST_LIBBE)
$(HOST_LIBSTDC++) $(HOST_LIBSUPC++) ; $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) ;
BuildPlatformMain <build>setversion : setversion.cpp : $(HOST_LIBBE) BuildPlatformMain <build>setversion : setversion.cpp : $(HOST_LIBBE)
$(HOST_LIBSTDC++) $(HOST_LIBSUPC++) $(libHaikuCompat) ; $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) ;
BuildPlatformMain <build>xres : xres.cpp : $(HOST_LIBBE) $(HOST_LIBSTDC++) BuildPlatformMain <build>xres : xres.cpp : $(HOST_LIBBE) $(HOST_LIBSTDC++)
$(HOST_LIBSUPC++) ; $(HOST_LIBSUPC++) ;
-10
View File
@@ -1,6 +1,5 @@
SubDir HAIKU_TOP src tools keymap ; SubDir HAIKU_TOP src tools keymap ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UsePrivateBuildHeaders shared storage ; UsePrivateBuildHeaders shared storage ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ;
@@ -8,23 +7,17 @@ SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin keymap ] ;
USES_BE_API on <build>keymap = true ; USES_BE_API on <build>keymap = true ;
local regexSources ; local regexSources ;
local storageSources ;
if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos { if $(HOST_PLATFORM) = cygwin || $(HOST_PLATFORM) = sunos {
UseHeaders [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ; UseHeaders [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ;
SubDirCcFlags -D__USE_GNU -DHAVE_STDBOOL_H ; SubDirCcFlags -D__USE_GNU -DHAVE_STDBOOL_H ;
regexSources = regex.c ; regexSources = regex.c ;
} }
if $(HOST_PLATFORM) = haiku_host {
# those are missing from early Haiku builds
storageSources = FileIO.cpp ;
}
BuildPlatformMain <build>keymap : BuildPlatformMain <build>keymap :
main.cpp main.cpp
Keymap.cpp Keymap.cpp
$(regexSources) $(regexSources)
$(storageSources)
: libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++) : libshared_build.a $(HOST_LIBSTDC++) $(HOST_LIBSUPC++)
; ;
@@ -32,6 +25,3 @@ LinkAgainst <build>keymap : $(HOST_LIBBE) ;
SEARCH on [ FGristFiles $(regexSources) ] SEARCH on [ FGristFiles $(regexSources) ]
= [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ; = [ FDirName $(HAIKU_TOP) src system libroot posix glibc regex ] ;
SEARCH on [ FGristFiles $(storageSources) ]
= [ FDirName $(HAIKU_TOP) src kits storage ] ;
-8
View File
@@ -1,13 +1,5 @@
SubDir HAIKU_TOP src tools package ; SubDir HAIKU_TOP src tools package ;
# TODO: Hack to make things build on Haiku. The right solution is to build
# libbe_build and friends on Haiku as well and use the exact same build
# environment as on other systems.
if $(HOST_PLATFORM) = haiku_host {
UseHeaders [ FDirName $(HAIKU_TOP) headers build ] : true ;
UseHeaders [ FDirName $(HAIKU_TOP) headers build os ] : true ;
}
UsePrivateBuildHeaders shared kernel ; UsePrivateBuildHeaders shared kernel ;
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin package ] ; SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src bin package ] ;
-10
View File
@@ -15,19 +15,9 @@ SubDirC++Flags -include $(r5Compatibility) ;
BuildPlatformStaticLibrary <build>librdef.a : BuildPlatformStaticLibrary <build>librdef.a :
compile.cpp decompile.cpp lexer.l parser.y rdef.cpp ; compile.cpp decompile.cpp lexer.l parser.y rdef.cpp ;
# On BeOS incompatible platforms we implicitly link against libroot_build.so,
# which does already include the strl*() routines.
local strlSources ;
if $(HOST_PLATFORM_BEOS_COMPATIBLE) {
strlSources = strlcpy.c strlcat.c ;
}
BuildPlatformMain <build>rc : BuildPlatformMain <build>rc :
rc.cpp rc.cpp
# these two are needed for R5 only
$(strlSources)
: <build>librdef.a $(HOST_LIBSTDC++) $(HOST_LIBBE) $(HOST_LIBSUPC++) : <build>librdef.a $(HOST_LIBSTDC++) $(HOST_LIBBE) $(HOST_LIBSUPC++)
; ;