Ignore:
Timestamp:
28/05/2008 13:03:59 (4 years ago)
Author:
chris
Message:

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.

Location:
box/trunk/infrastructure
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/infrastructure/BoxPlatform.pm.in

    r2094 r2168  
    3333 
    3434        # blank extra flags by default 
    35         $platform_compile_line_extra = '@CPPFLAGS@ @CXXFLAGS@ @CXXFLAGS_STRICT@'; 
    36         $platform_compile_line_extra =~ s/ -O2//; 
    37         $platform_link_line_extra = '@LDFLAGS@'; 
     35        $platform_compile_line_extra = ''; 
     36        $platform_link_line_extra = ''; 
    3837        $platform_lib_files = '@LIBS@'; 
    3938        $platform_exe_ext = '@EXEEXT@'; 
  • box/trunk/infrastructure/makebuildenv.pl.in

    r2163 r2168  
    516516        my $debug_link_extra = ($target_is_library)?'':'../../debug/lib/debug/debug.a'; 
    517517 
     518        my $default_cxxflags = '@CXXFLAGS@'; 
     519        my $default_cxxflags =~ s/ -O2//g; 
     520 
    518521        my $release_flags = "-O2"; 
    519522        if ($target_windows) 
     
    533536PERL = @PERL@ 
    534537WINDRES = windres 
     538 
     539CXXFLAGS = @CPPFLAGS@ $default_cxxflags @CXXFLAGS_STRICT@ \\ 
     540        $include_paths $extra_platform_defines \\ 
     541        -DBOX_VERSION="\\"$product_version\\"" 
     542LDFLAGS = @LDFLAGS@ @LDADD_RDYNAMIC@ 
     543 
    535544.ifdef RELEASE 
    536 CXXFLAGS = -DNDEBUG $release_flags @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" 
     545CXXFLAGS += -DNDEBUG $release_flags 
    537546OUTBASE = ../../release 
    538547OUTDIR = ../../release/$mod 
     
    540549VARIENT = RELEASE 
    541550.else 
    542 CXXFLAGS = -g @CXXFLAGS_STRICT@ $include_paths $extra_platform_defines -DBOX_VERSION="\\"$product_version\\"" 
     551CXXFLAGS += -g 
    543552OUTBASE = ../../debug 
    544553OUTDIR = ../../debug/$mod 
     
    798807         
    799808                # link line... 
    800                 print MAKE "\t\$(_LINK) $link_line_extra -o $end_target $o_file_list $lib_files$lo $platform_lib_files\n"; 
     809                print MAKE "\t\$(_LINK) \$(LDFLAGS) $link_line_extra " . 
     810                        "-o $end_target $o_file_list " . 
     811                        "$lib_files$lo $platform_lib_files\n"; 
    801812        } 
    802813        # tests need to copy the test file over 
Note: See TracChangeset for help on using the changeset viewer.