Changeset 2388


Ignore:
Timestamp:
Feb 9, 2013, 11:05:15 PM (7 years ago)
Author:
sam
Message:

build: reorganise AM_CPPFLAGS handling so that we can disable the
shitload of warnings Bullet spits at us.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r2386 r2388  
    141141
    142142dnl No exceptions
    143 CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-rtti"
     143AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions -fno-rtti"
    144144dnl Optimizations
    145 CXXFLAGS="${CXXFLAGS} ${REL} ${OPT}"
     145AM_CXXFLAGS="${AM_CXXFLAGS} ${REL} ${OPT}"
    146146dnl Code qui fait des warnings == code de porc == deux baffes dans ta gueule
    147 CXXFLAGS="${CXXFLAGS} -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
     147AM_CPPFLAGS="${AM_CPPFLAGS} -Wall -Wextra -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Wsign-compare"
    148148
    149149AC_CHECK_LIB(m, sin, MATH_LIBS="${MATH_LIBS} -lm")
     
    182182  LOL_LIBS="${LOL_LIBS} -lio_stub -lusbd_stub -lpadfilter"
    183183  dnl  Disable this warning, it's too verbose with vector.h
    184   CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"
     184  AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-sign-compare"
    185185  AC_PATH_PROG(MAKE_FSELF, make_fself, no)
    186186  if test "${MAKE_FSELF}" = "no"; then
     
    197197AC_TRY_LINK([], [],
    198198 [AC_MSG_RESULT(yes)
    199   CXXFLAGS="${CXXFLAGS} -mwindows -mwin32"
     199  AM_CXXFLAGS="${AM_CXXFLAGS} -mwindows -mwin32"
    200200  LOL_LIBS="${LOL_LIBS} -uWinMain -u_WinMain@16"],
    201201 [AC_MSG_RESULT(no)])
     
    250250 [ac_cv_my_have_nacl="yes"
    251251  dnl  Disable this warning, it's too verbose with vector.h
    252   CXXFLAGS="${CXXFLAGS} -Wno-sign-compare"])
     252  AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-sign-compare"])
    253253AC_LANG_POP(C++)
    254254AM_CONDITIONAL(USE_NACL, test "${ac_cv_my_have_nacl}" != "no")
     
    351351AC_SUBST(UTIL_LIBS)
    352352
    353 dnl  How to use the Lol Engine inside this tree
    354 LOL_CFLAGS="$LOL_CFLAGS -I\$(top_srcdir)/src"
    355 LOL_CFLAGS="$LOL_CFLAGS -DLOL_SOURCE_SUBDIR=\\\"\$(subdir)\\\""
     353dnl  How to use the Lol Engine outside this tree
    356354LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS"
    357355LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS"
    358 LOL_STATIC_LIBS="\$(top_builddir)/src/liblolcore.a $LOL_STATIC_LIBS"
    359 LOL_STATIC_LIBS="\$(top_builddir)/src/bullet/liblolbullet.a $LOL_STATIC_LIBS"
     356
     357dnl  How to use the Lol Engine inside this tree
     358AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/src"
     359AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_SOURCE_SUBDIR=\\\"\$(subdir)\\\""
     360AM_CPPFLAGS="${AM_CPPFLAGS} $LOL_CFLAGS"
     361AM_LDFLAGS="${AM_LDFLAGS} \$(top_builddir)/src/liblolcore.a"
     362AM_LDFLAGS="${AM_LDFLAGS} \$(top_builddir)/src/bullet/liblolbullet.a"
     363AM_LDFLAGS="${AM_LDFLAGS} $LOL_LIBS"
    360364
    361365dnl  Extra flags
    362366AC_SUBST(LOL_CFLAGS)
    363367AC_SUBST(LOL_LIBS)
    364 AC_SUBST(LOL_STATIC_LIBS)
     368
     369AC_SUBST(AM_CFLAGS)
     370AC_SUBST(AM_CPPFLAGS)
     371AC_SUBST(AM_CXXFLAGS)
     372AC_SUBST(AM_LDFLAGS)
    365373
    366374AC_SUBST(USE_DOT)
  • trunk/src/Makefile.am

    r2386 r2388  
    2626    $(d3d9_sources) \
    2727    $(android_sources)
    28 liblolcore_a_CPPFLAGS = @LOL_CFLAGS@ -I$(srcdir)/bullet
     28liblolcore_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/bullet
    2929
    3030EXTRA_DIST = easymesh/easymesh-scanner.l easymesh/easymesh-parser.y \
  • trunk/src/bullet/Makefile.am

    r2386 r2388  
    55
    66liblolbullet_a_SOURCES = $(bullet_sources)
    7 liblolbullet_a_CPPFLAGS = @LOL_CFLAGS@ -I$(srcdir)
     7liblolbullet_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir) \
     8    -Wno-shadow -Wno-unused -Wno-cast-qual -Wno-strict-aliasing \
     9    -Wno-maybe-uninitialized -Wno-narrowing -Wno-parentheses \
     10    -Wno-reorder
    811
    912bullet_sources =
     
    4245    BulletMultiThreaded/SequentialThreadSupport.h
    4346
    44 libBulletMultiThreaded_la_CXXFLAGS = ${CXXFLAGS} -I./BulletMultiThreaded/vectormath/scalar/cpp
     47libBulletMultiThreaded_la_CXXFLAGS = -I./BulletMultiThreaded/vectormath/scalar/cpp
    4548bullet_sources += \
    4649    BulletMultiThreaded/SpuCollisionObjectWrapper.cpp \
  • trunk/test/Makefile.am

    r2386 r2388  
    33
    44SUBDIRS = math sandbox xolotl
    5 
    6 AM_CPPFLAGS = -I$(top_srcdir)/src
    75
    86bench: benchsuite$(EXEEXT)
     
    2523    unit/array.cpp unit/rotation.cpp unit/string.cpp unit/map.cpp \
    2624    unit/color.cpp unit/atomic.cpp
    27 testsuite_CPPFLAGS = @LOL_CFLAGS@
    28 testsuite_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    29 testsuite_DEPENDENCIES = @LOL_STATIC_LIBS@
     25testsuite_CPPFLAGS = $(AM_CPPFLAGS)
    3026
    3127benchsuite_SOURCES = benchsuite.cpp \
    3228    benchmark/vector.cpp benchmark/half.cpp benchmark/trig.cpp \
    3329    benchmark/real.cpp
    34 benchsuite_CPPFLAGS = @LOL_CFLAGS@
    35 benchsuite_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    36 benchsuite_DEPENDENCIES = @LOL_STATIC_LIBS@
     30benchsuite_CPPFLAGS = $(AM_CPPFLAGS)
    3731
    3832btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h PhysicObject.h \
     
    4539    Physics/Src/BulletCharacterController.cpp \
    4640    Physics/Include/BulletCharacterController.h
    47 btphystest_CPPFLAGS = @LOL_CFLAGS@ -I$(top_srcdir)/src/bullet \
     41btphystest_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bullet \
    4842    -DHAVE_PHYS_USE_BULLET
    49 btphystest_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    50 btphystest_DEPENDENCIES = @LOL_STATIC_LIBS@
    5143
    5244meshviewer_SOURCES = MeshViewer.cpp
    53 meshviewer_CPPFLAGS = @LOL_CFLAGS@
    54 meshviewer_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    55 meshviewer_DEPENDENCIES = @LOL_STATIC_LIBS@
     45meshviewer_CPPFLAGS = $(AM_CPPFLAGS)
    5646
  • trunk/test/math/Makefile.am

    r2386 r2388  
    11
    22include $(top_srcdir)/build/autotools/common.am
    3 
    4 AM_CPPFLAGS = -I$(top_srcdir)/src
    53
    64EXTRA_DIST = NEWS.txt lolremez.sln remez.vcxproj remez.vcxproj.filters
     
    97
    108pi_SOURCES = pi.cpp
    11 pi_CPPFLAGS = @LOL_CFLAGS@
    12 pi_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    13 pi_DEPENDENCIES = @LOL_STATIC_LIBS@
     9pi_CPPFLAGS = $(AM_CPPFLAGS)
    1410
    1511poly_SOURCES = poly.cpp
    16 poly_CPPFLAGS = @LOL_CFLAGS@
    17 poly_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    18 poly_DEPENDENCIES = @LOL_STATIC_LIBS@
     12poly_CPPFLAGS = $(AM_CPPFLAGS)
    1913
    2014remez_SOURCES = remez.cpp
    21 remez_CPPFLAGS = @LOL_CFLAGS@
    22 remez_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    23 remez_DEPENDENCIES = @LOL_STATIC_LIBS@
     15remez_CPPFLAGS = $(AM_CPPFLAGS)
    2416
  • trunk/test/sandbox/Makefile.am

    r2386 r2388  
    11
    22include $(top_srcdir)/build/autotools/common.am
    3 
    4 AM_CPPFLAGS = -I$(top_srcdir)/src
    53
    64noinst_PROGRAMS = sample
    75
    86sample_SOURCES = sample.cpp
    9 sample_CPPFLAGS = @LOL_CFLAGS@
    10 sample_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    11 sample_DEPENDENCIES = @LOL_STATIC_LIBS@
     7sample_CPPFLAGS = $(AM_CPPFLAGS)
    128
  • trunk/test/xolotl/Makefile.am

    r2386 r2388  
    11
    22include $(top_srcdir)/build/autotools/common.am
    3 
    4 AM_CPPFLAGS = -I$(top_srcdir)/src
    53
    64noinst_PROGRAMS = xolotl
    75
    86xolotl_SOURCES = xolotl.cpp xolotl.h
    9 xolotl_CPPFLAGS = @LOL_CFLAGS@
    10 xolotl_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    11 xolotl_DEPENDENCIES = @LOL_STATIC_LIBS@
     7xolotl_CPPFLAGS = $(AM_CPPFLAGS)
    128
  • trunk/tools/neercs/Makefile.am

    r2386 r2388  
    1818    video/simple.lolfx \
    1919    video/blurh.lolfx video/blurv.lolfx video/glow.lolfx \
    20     video/remanence.lolfx video/copper.lolfx video/color.lolfx video/noise.lolfx \
    21     video/postfx.lolfx video/mirror.lolfx video/radial.lolfx \
    22     video/text.lolfx
    23 neercs_CPPFLAGS = @LOL_CFLAGS@ @CACA_CFLAGS@ -Iold
    24 neercs_LDADD =
    25 neercs_LDFLAGS = @LOL_STATIC_LIBS@ \
    26                  @LOL_LIBS@ @CACA_LIBS@ @UTIL_LIBS@ @PAM_LIBS@
    27 neercs_DEPENDENCIES = @LOL_STATIC_LIBS@
     20    video/remanence.lolfx video/copper.lolfx video/color.lolfx \
     21    video/noise.lolfx video/postfx.lolfx video/mirror.lolfx \
     22    video/radial.lolfx video/text.lolfx
     23neercs_CPPFLAGS = $(AM_CPPFLAGS) @CACA_CFLAGS@ -Iold
     24neercs_LDFLAGS = $(AM_LDFLAGS) @CACA_LIBS@ @UTIL_LIBS@ @PAM_LIBS@
    2825
    2926old_sources = \
  • trunk/tutorial/Makefile.am

    r2386 r2388  
    11
    22include $(top_srcdir)/build/autotools/common.am
    3 
    4 AM_CPPFLAGS = -I$(top_srcdir)/src
    53
    64noinst_PROGRAMS = 01_triangle 02_cube 03_noise 04_texture 05_easymesh \
     
    86
    9701_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx
    10 01_triangle_CPPFLAGS = @LOL_CFLAGS@
    11 01_triangle_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    12 01_triangle_DEPENDENCIES = @LOL_STATIC_LIBS@
     801_triangle_CPPFLAGS = $(AM_CPPFLAGS)
    139
    141002_cube_SOURCES = 02_cube.cpp 02_cube.lolfx
    15 02_cube_CPPFLAGS = @LOL_CFLAGS@
    16 02_cube_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    17 02_cube_DEPENDENCIES = @LOL_STATIC_LIBS@
     1102_cube_CPPFLAGS = $(AM_CPPFLAGS)
    1812
    191303_noise_SOURCES = 03_noise.cpp 03_noise.lolfx
    20 03_noise_CPPFLAGS = @LOL_CFLAGS@
    21 03_noise_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    22 03_noise_DEPENDENCIES = @LOL_STATIC_LIBS@
     1403_noise_CPPFLAGS = $(AM_CPPFLAGS)
    2315
    241604_texture_SOURCES = 04_texture.cpp 04_texture.lolfx
    25 04_texture_CPPFLAGS = @LOL_CFLAGS@
    26 04_texture_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    27 04_texture_DEPENDENCIES = @LOL_STATIC_LIBS@
     1704_texture_CPPFLAGS = $(AM_CPPFLAGS)
    2818
    291905_easymesh_SOURCES = 05_easymesh.cpp
    30 05_easymesh_CPPFLAGS = @LOL_CFLAGS@
    31 05_easymesh_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    32 05_easymesh_DEPENDENCIES = @LOL_STATIC_LIBS@
     2005_easymesh_CPPFLAGS = $(AM_CPPFLAGS)
    3321
    342208_fbo_SOURCES = 08_fbo.cpp 08_fbo.lolfx
    35 08_fbo_CPPFLAGS = @LOL_CFLAGS@
    36 08_fbo_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    37 08_fbo_DEPENDENCIES = @LOL_STATIC_LIBS@
     2308_fbo_CPPFLAGS = $(AM_CPPFLAGS)
    3824
    392511_fractal_SOURCES = 11_fractal.cpp 11_fractal.lolfx
    40 11_fractal_CPPFLAGS = @LOL_CFLAGS@
    41 11_fractal_LDFLAGS = @LOL_STATIC_LIBS@ @LOL_LIBS@
    42 11_fractal_DEPENDENCIES = @LOL_STATIC_LIBS@
     2611_fractal_CPPFLAGS = $(AM_CPPFLAGS)
    4327
Note: See TracChangeset for help on using the changeset viewer.