diff --git a/configure.ac b/configure.ac index e310fc8f..56ecc222 100644 --- a/configure.ac +++ b/configure.ac @@ -369,18 +369,20 @@ AC_SUBST(UTIL_LIBS) dnl How to use the Lol Engine outside this tree LOL_CFLAGS="$LOL_CFLAGS $SDL_CFLAGS $GL_CFLAGS $EGL_CFLAGS $LIBPNG_CFLAGS" LOL_LIBS="$LOL_LIBS $SDL_LIBS $GL_LIBS $EGL_LIBS $LIBPNG_LIBS $D3D_LIBS" +LOL_DEPENDENCIES="${LOL_DEPENDENCIES} \$(top_builddir)/src/liblolcore.a" +LOL_DEPENDENCIES="${LOL_DEPENDENCIES} \$(top_builddir)/src/bullet/liblolbullet.a" dnl How to use the Lol Engine inside this tree AM_CPPFLAGS="${AM_CPPFLAGS} -I\$(top_srcdir)/src" AM_CPPFLAGS="${AM_CPPFLAGS} -DLOL_SOURCE_SUBDIR=\\\"\$(subdir)\\\"" -AM_CPPFLAGS="${AM_CPPFLAGS} $LOL_CFLAGS" -AM_LDFLAGS="${AM_LDFLAGS} \$(top_builddir)/src/liblolcore.a" -AM_LDFLAGS="${AM_LDFLAGS} \$(top_builddir)/src/bullet/liblolbullet.a" -AM_LDFLAGS="${AM_LDFLAGS} $LOL_LIBS" +AM_CPPFLAGS="${AM_CPPFLAGS} ${LOL_CFLAGS}" +AM_LDFLAGS="${AM_LDFLAGS} ${LOL_DEPENDENCIES}" +AM_LDFLAGS="${AM_LDFLAGS} ${LOL_LIBS}" dnl Extra flags AC_SUBST(LOL_CFLAGS) AC_SUBST(LOL_LIBS) +AC_SUBST(LOL_DEPENDENCIES) AC_SUBST(AM_CFLAGS) AC_SUBST(AM_CPPFLAGS) diff --git a/test/Makefile.am b/test/Makefile.am index 2dafe1b6..558ec93e 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -23,11 +23,13 @@ testsuite_SOURCES = testsuite.cpp \ unit/array.cpp unit/rotation.cpp unit/string.cpp unit/map.cpp \ unit/color.cpp unit/atomic.cpp testsuite_CPPFLAGS = $(AM_CPPFLAGS) +testsuite_DEPENDENCIES = @LOL_DEPENDENCIES@ benchsuite_SOURCES = benchsuite.cpp \ benchmark/vector.cpp benchmark/half.cpp benchmark/trig.cpp \ benchmark/real.cpp benchsuite_CPPFLAGS = $(AM_CPPFLAGS) +benchsuite_DEPENDENCIES = @LOL_DEPENDENCIES@ btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h PhysicObject.h \ Physics/Src/EasyPhysics.cpp Physics/Include/EasyPhysics.h \ @@ -40,7 +42,9 @@ btphystest_SOURCES = BtPhysTest.cpp BtPhysTest.h PhysicObject.h \ Physics/Include/BulletCharacterController.h btphystest_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/src/bullet \ -DHAVE_PHYS_USE_BULLET +btphystest_DEPENDENCIES = @LOL_DEPENDENCIES@ meshviewer_SOURCES = MeshViewer.cpp meshviewer_CPPFLAGS = $(AM_CPPFLAGS) +meshviewer_DEPENDENCIES = @LOL_DEPENDENCIES@ diff --git a/test/math/Makefile.am b/test/math/Makefile.am index c5815a3c..d9c72a5e 100644 --- a/test/math/Makefile.am +++ b/test/math/Makefile.am @@ -7,10 +7,13 @@ noinst_PROGRAMS = pi poly remez pi_SOURCES = pi.cpp pi_CPPFLAGS = $(AM_CPPFLAGS) +pi_DEPENDENCIES = @LOL_DEPENDENCIES@ poly_SOURCES = poly.cpp poly_CPPFLAGS = $(AM_CPPFLAGS) +poly_DEPENDENCIES = @LOL_DEPENDENCIES@ remez_SOURCES = remez.cpp remez_CPPFLAGS = $(AM_CPPFLAGS) +remez_DEPENDENCIES = @LOL_DEPENDENCIES@ diff --git a/test/sandbox/Makefile.am b/test/sandbox/Makefile.am index 65690666..abb1cc54 100644 --- a/test/sandbox/Makefile.am +++ b/test/sandbox/Makefile.am @@ -5,4 +5,5 @@ noinst_PROGRAMS = sample sample_SOURCES = sample.cpp sample_CPPFLAGS = $(AM_CPPFLAGS) +sample_DEPENDENCIES = @LOL_DEPENDENCIES@ diff --git a/test/xolotl/Makefile.am b/test/xolotl/Makefile.am index 236c2747..42526bac 100644 --- a/test/xolotl/Makefile.am +++ b/test/xolotl/Makefile.am @@ -5,4 +5,5 @@ noinst_PROGRAMS = xolotl xolotl_SOURCES = xolotl.cpp xolotl.h xolotl_CPPFLAGS = $(AM_CPPFLAGS) +xolotl_DEPENDENCIES = @LOL_DEPENDENCIES@ diff --git a/tutorial/Makefile.am b/tutorial/Makefile.am index aab5f719..f207038d 100644 --- a/tutorial/Makefile.am +++ b/tutorial/Makefile.am @@ -6,22 +6,29 @@ noinst_PROGRAMS = 01_triangle 02_cube 03_noise 04_texture 05_easymesh \ 01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx 01_triangle_CPPFLAGS = $(AM_CPPFLAGS) +01_triangle_DEPENDENCIES = @LOL_DEPENDENCIES@ 02_cube_SOURCES = 02_cube.cpp 02_cube.lolfx 02_cube_CPPFLAGS = $(AM_CPPFLAGS) +02_cube_DEPENDENCIES = @LOL_DEPENDENCIES@ 03_noise_SOURCES = 03_noise.cpp 03_noise.lolfx 03_noise_CPPFLAGS = $(AM_CPPFLAGS) +03_noise_DEPENDENCIES = @LOL_DEPENDENCIES@ 04_texture_SOURCES = 04_texture.cpp 04_texture.lolfx 04_texture_CPPFLAGS = $(AM_CPPFLAGS) +04_texture_DEPENDENCIES = @LOL_DEPENDENCIES@ 05_easymesh_SOURCES = 05_easymesh.cpp 05_easymesh_CPPFLAGS = $(AM_CPPFLAGS) +05_easymesh_DEPENDENCIES = @LOL_DEPENDENCIES@ 08_fbo_SOURCES = 08_fbo.cpp 08_fbo.lolfx 08_fbo_CPPFLAGS = $(AM_CPPFLAGS) +08_fbo_DEPENDENCIES = @LOL_DEPENDENCIES@ 11_fractal_SOURCES = 11_fractal.cpp 11_fractal.lolfx 11_fractal_CPPFLAGS = $(AM_CPPFLAGS) +11_fractal_DEPENDENCIES = @LOL_DEPENDENCIES@