summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-11-30 23:14:40 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-11-30 23:14:40 +0000
commit01ca97865fa9d6ed1a967e970927265f1c348289 (patch)
tree5e7e1f70b38b156994c3802ba3e77fbf288fe937 /infrastructure
parent99f8ce096bc5569adbfea1911dbcda24c28d8d8b (diff)
Merged martin/solaris at r9 to trunk
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/BoxPlatform.pm15
-rwxr-xr-xinfrastructure/makebuildenv.pl8
-rwxr-xr-xinfrastructure/makeparcels.pl4
3 files changed, 18 insertions, 9 deletions
diff --git a/infrastructure/BoxPlatform.pm b/infrastructure/BoxPlatform.pm
index 4c8280a3..0549b39a 100644
--- a/infrastructure/BoxPlatform.pm
+++ b/infrastructure/BoxPlatform.pm
@@ -1,7 +1,7 @@
package BoxPlatform;
use Exporter;
@ISA = qw/Exporter/;
-@EXPORT = qw/$build_os $make_command $bsd_make $platform_define $gcc_v3 $gcc_v4 $product_version $product_name $install_into_dir $sub_make_options $platform_compile_line_extra $platform_link_line_extra/;
+@EXPORT = qw/$build_os $build_cpu $make_command $bsd_make $platform_define $platform_cpu $gcc_v3 $gcc_v4 $product_version $product_name $install_into_dir $sub_make_options $platform_compile_line_extra $platform_link_line_extra/;
BEGIN
{
@@ -9,13 +9,17 @@ BEGIN
# which OS are we building under?
$build_os = `uname`;
chomp $build_os;
+ $build_cpu = `uname -p`;
+ chomp $build_cpu;
# Cygwin Builds usually something like CYGWIN_NT-5.0, CYGWIN_NT-5.1
# Box Backup tried on Win2000,XP only :)
+
$build_os = 'CYGWIN' if $build_os =~ m/CYGWIN/;
- $make_command = ($build_os ne 'Darwin')?'make':'bsdmake';
- $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN');
+ $make_command = ($build_os eq 'Darwin') ? 'bsdmake' : ($build_os eq 'SunOS') ? 'gmake' : 'make';
+ $bsd_make = ($build_os ne 'Linux' && $build_os ne 'CYGWIN' && $build_os ne "SunOS");
$platform_define = 'PLATFORM_'.uc($build_os);
+ $platform_cpu = 'PLATFORM_'.uc($build_cpu);
# blank extra flags by default
$platform_compile_line_extra = '';
@@ -63,6 +67,11 @@ BEGIN
$platform_link_line_extra = '-L/sw/lib ';
}
}
+
+ if($build_os eq 'SunOS')
+ {
+ $platform_link_line_extra = '-lrt ';
+ }
}
sub make_flag
diff --git a/infrastructure/makebuildenv.pl b/infrastructure/makebuildenv.pl
index 99455cc2..ecac6939 100755
--- a/infrastructure/makebuildenv.pl
+++ b/infrastructure/makebuildenv.pl
@@ -758,13 +758,13 @@ CXX = g++
AR = ar
RANLIB = ranlib
.ifdef RELEASE
-CXXFLAGS = -DNDEBUG -O2 -Wall $include_paths -D$platform_define$extra_platform_defines -DBOX_VERSION="\\"$product_version\\""
+CXXFLAGS = -DNDEBUG -O2 -Wall $include_paths -D$platform_define -D$platform_cpu$extra_platform_defines -DBOX_VERSION="\\"$product_version\\""
OUTBASE = ../../release
OUTDIR = ../../release/$mod
DEPENDMAKEFLAGS = -D RELEASE
VARIENT = RELEASE
.else
-CXXFLAGS = -g -Wall $include_paths -D$platform_define$extra_platform_defines -DBOX_VERSION="\\"$product_version\\""
+CXXFLAGS = -g -Wall $include_paths -D$platform_define -D$platform_cpu$extra_platform_defines -DBOX_VERSION="\\"$product_version\\""
OUTBASE = ../../debug
OUTDIR = ../../debug/$mod
DEPENDMAKEFLAGS =
@@ -886,7 +886,7 @@ __E
# run make for things we require
for my $dep (@all_deps_for_module)
{
- $deps_makeinfo .= "\t\t(cd ../../$dep; $make_command$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
+ $deps_makeinfo .= "\t\t(cd ../../$dep; \$(MAKE)$sub_make_options \$(DEPENDMAKEFLAGS) -D NODEPS)\n";
}
$deps_makeinfo .= ".\tendif\n.endif\n\n";
}
@@ -960,7 +960,7 @@ __E
print MAKE "clean:\n\t-rm -rf \$(OUTDIR)/*\n.\tifndef SUBCLEAN\n";
for my $dep (@all_deps_for_module)
{
- print MAKE "\t(cd ../../$dep; $make_command \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n";
+ print MAKE "\t(cd ../../$dep; \$(MAKE) \$(DEPENDMAKEFLAGS) -D SUBCLEAN clean)\n";
}
print MAKE ".\tendif\n";
diff --git a/infrastructure/makeparcels.pl b/infrastructure/makeparcels.pl
index 6cd3e8f2..29694326 100755
--- a/infrastructure/makeparcels.pl
+++ b/infrastructure/makeparcels.pl
@@ -99,7 +99,7 @@ for my $parcel (@parcels)
if($type eq 'bin')
{
my $exeext = ($build_os eq 'CYGWIN')?'.exe':'';
- print MAKE "\t(cd bin/$name; $make_command $release_flag)\n";
+ print MAKE "\t(cd bin/$name; \$(MAKE) $release_flag)\n";
print MAKE "\tcp release/bin/$name/$name$exeext $dir\n";
}
elsif ($type eq 'script')
@@ -144,7 +144,7 @@ __E
for(@parcels)
{
- print INSTALLMSG " make install-".$_."\n";
+ print INSTALLMSG " $make_command install-".$_."\n";
}
print INSTALLMSG "\n";