diff options
author | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 12:03:59 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2008-05-28 12:03:59 +0000 |
commit | 5295edbaec1058e3c293723ccfe6c639fdc413ff (patch) | |
tree | 137629132d256131cd13cc3a9b7915c6ad120604 /infrastructure/makebuildenv.pl.in | |
parent | fbf475917f44d32e44a615eb735a62e282b4586b (diff) |
Remove redundant copies of flags from make command line.
Place CXXFLAGS and LDFLAGS in Makefiles so that they can be overridden
by users who know what they are doing.
Add LDADD_RDYNAMIC to LDFLAGS to enable -rdynamic for symbolic stack
traces.
Diffstat (limited to 'infrastructure/makebuildenv.pl.in')
-rwxr-xr-x | infrastructure/makebuildenv.pl.in | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/infrastructure/makebuildenv.pl.in b/infrastructure/makebuildenv.pl.in index d8f22058..cbfbb9b9 100755 --- a/infrastructure/makebuildenv.pl.in +++ b/infrastructure/makebuildenv.pl.in @@ -515,6 +515,9 @@ __E open MAKE,">$mod/Makefile".$mk_name_extra or die "Can't open Makefile for $mod\n"; my $debug_link_extra = ($target_is_library)?'':'../../debug/lib/debug/debug.a'; + my $default_cxxflags = '@CXXFLAGS@'; + my $default_cxxflags =~ s/ -O2//g; + my $release_flags = "-O2"; if ($target_windows) { @@ -532,14 +535,20 @@ AR = @AR@ RANLIB = @RANLIB@ PERL = @PERL@ WINDRES = windres + +CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\ + $include_paths $extra_platform_defines \\ + -DBOX_VERSION="\\"$product_version\\"" +LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@ + .ifdef RELEASE -CXXFLAGS = -DNDEBUG $release_flags @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" +CXXFLAGS += -DNDEBUG $release_flags OUTBASE = ../../release OUTDIR = ../../release/$mod DEPENDMAKEFLAGS = -D RELEASE VARIENT = RELEASE .else -CXXFLAGS = -g @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" +CXXFLAGS += -g OUTBASE = ../../debug OUTDIR = ../../debug/$mod DEPENDMAKEFLAGS = @@ -797,7 +806,9 @@ __E } # link line... - print MAKE "\t\$(_LINK) $link_line_extra -o $end_target $o_file_list $lib_files$lo $platform_lib_files\n"; + print MAKE "\t\$(_LINK) \$(LDFLAGS) $link_line_extra " . + "-o $end_target $o_file_list " . + "$lib_files$lo $platform_lib_files\n"; } # tests need to copy the test file over if($type eq 'test') |