Ignore:
Timestamp:
Feb 14, 2011, 2:26:28 AM (9 years ago)
Author:
sam
Message:

Disable -O2 when in debug mode, and disable -g when in release mode.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r642 r644  
    5252if test "${enable_debug}" = "yes"; then
    5353  AC_DEFINE(_DEBUG, 1, Define to 1 to activate debug)
     54  OPT="-O0"
     55else
     56  OPT="-O2"
     57fi
     58
     59if test "${enable_release}" = "yes"; then
     60  AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release)
     61  REL=""
     62else
     63  REL="-g"
    5464fi
    5565
    5666# Optimizations
    57 CXXFLAGS="${CXXFLAGS} -g -O2 -fno-strength-reduce -fomit-frame-pointer"
     67CXXFLAGS="${CXXFLAGS} ${REL} ${OPT} -fno-strength-reduce -fomit-frame-pointer"
    5868# Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    5969CXXFLAGS="${CXXFLAGS} -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
     
    128138LOL_LIBS="$LOL_LIBS $SDL_LIBS"
    129139
    130 if test "${enable_release}" = "yes"; then
    131   AC_DEFINE(FINAL_RELEASE, 1, Define to 1 to activate final release)
    132 fi
    133 
    134140AC_SUBST(MATH_LIBS)
    135141AC_SUBST(LOL_CFLAGS)
Note: See TracChangeset for help on using the changeset viewer.