diff --git a/build.config b/build.config index a748c1c7..c28f03c0 100644 --- a/build.config +++ b/build.config @@ -3,6 +3,7 @@ + yes yes yes yes diff --git a/build/autotools/m4/lol-conf.m4 b/build/autotools/m4/lol-conf.m4 index 98e0f183..41585133 100644 --- a/build/autotools/m4/lol-conf.m4 +++ b/build/autotools/m4/lol-conf.m4 @@ -81,6 +81,15 @@ if test "$ac_cv_have_getopt_long" != "no"; then fi +dnl Use Bullet Physics? +ac_cv_my_have_bullet="no" +if test "${enable_bullet}" != "no"; then + ac_cv_my_have_bullet="yes" + AC_DEFINE(LOL_USE_BULLET, 1, Define to 1 to use Bullet Physics) +fi +AM_CONDITIONAL(LOL_USE_BULLET, test "${ac_cv_my_have_bullet}" = "yes") + + dnl Use NativeClient? ac_cv_my_have_nacl="no" AC_LANG_PUSH(C++) diff --git a/configure.ac b/configure.ac index 8f3de581..73ea3e50 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,8 @@ AC_ARG_ENABLE(imlib2, [ --enable-imlib2 build using Imlib2 (default autodetected)]) AC_ARG_ENABLE(png, [ --enable-png build using libpng (default autodetected)]) +AC_ARG_ENABLE(bullet, + [ --enable-bullet build using Bullet Physics (default yes)]) AC_ARG_ENABLE(test, [ --enable-test build test suite (default yes)]) diff --git a/doc/samples/Makefile.am b/doc/samples/Makefile.am index 12ad0928..ea776f4a 100644 --- a/doc/samples/Makefile.am +++ b/doc/samples/Makefile.am @@ -9,7 +9,10 @@ bench: benchsuite$(EXEEXT) if BUILD_SAMPLES noinst_PROGRAMS = bluenoise benchsuite simplex if LOL_USE_GL -noinst_PROGRAMS += btphystest nacl_phystest +noinst_PROGRAMS += nacl_phystest +if LOL_USE_BULLET +noinst_PROGRAMS += btphystest +endif endif endif diff --git a/doc/samples/benchsuite.vcxproj b/doc/samples/benchsuite.vcxproj index ac7bdded..a2770781 100644 --- a/doc/samples/benchsuite.vcxproj +++ b/doc/samples/benchsuite.vcxproj @@ -41,7 +41,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/samples/btphystest.vcxproj b/doc/samples/btphystest.vcxproj index 53ac0edc..7600001f 100644 --- a/doc/samples/btphystest.vcxproj +++ b/doc/samples/btphystest.vcxproj @@ -51,7 +51,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/samples/meshviewer/meshviewer.vcxproj b/doc/samples/meshviewer/meshviewer.vcxproj index 20cec67a..d5b6833e 100644 --- a/doc/samples/meshviewer/meshviewer.vcxproj +++ b/doc/samples/meshviewer/meshviewer.vcxproj @@ -38,7 +38,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/samples/nacl_phystest.vcxproj b/doc/samples/nacl_phystest.vcxproj index 0173f16b..23559465 100644 --- a/doc/samples/nacl_phystest.vcxproj +++ b/doc/samples/nacl_phystest.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/01_triangle.vcxproj b/doc/tutorial/01_triangle.vcxproj index 833c8628..e21c4a60 100644 --- a/doc/tutorial/01_triangle.vcxproj +++ b/doc/tutorial/01_triangle.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/02_cube.vcxproj b/doc/tutorial/02_cube.vcxproj index cd2fdcd8..1349a43b 100644 --- a/doc/tutorial/02_cube.vcxproj +++ b/doc/tutorial/02_cube.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/03_noise.vcxproj b/doc/tutorial/03_noise.vcxproj index 46f4e6e6..67ea0aed 100644 --- a/doc/tutorial/03_noise.vcxproj +++ b/doc/tutorial/03_noise.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/04_texture.vcxproj b/doc/tutorial/04_texture.vcxproj index b0b2f5a2..6c11ada3 100644 --- a/doc/tutorial/04_texture.vcxproj +++ b/doc/tutorial/04_texture.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/05_easymesh.vcxproj b/doc/tutorial/05_easymesh.vcxproj index 96899ab3..3455e576 100644 --- a/doc/tutorial/05_easymesh.vcxproj +++ b/doc/tutorial/05_easymesh.vcxproj @@ -37,7 +37,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/06_sprite.vcxproj b/doc/tutorial/06_sprite.vcxproj index 7af7d357..e338e546 100644 --- a/doc/tutorial/06_sprite.vcxproj +++ b/doc/tutorial/06_sprite.vcxproj @@ -37,7 +37,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/07_input.vcxproj b/doc/tutorial/07_input.vcxproj index 930f8ec1..11e675fb 100644 --- a/doc/tutorial/07_input.vcxproj +++ b/doc/tutorial/07_input.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/08_fbo.vcxproj b/doc/tutorial/08_fbo.vcxproj index 992031ec..952d7cb6 100644 --- a/doc/tutorial/08_fbo.vcxproj +++ b/doc/tutorial/08_fbo.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/11_fractal.vcxproj b/doc/tutorial/11_fractal.vcxproj index 53ebed78..ef87f494 100644 --- a/doc/tutorial/11_fractal.vcxproj +++ b/doc/tutorial/11_fractal.vcxproj @@ -40,7 +40,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/12_voronoi.vcxproj b/doc/tutorial/12_voronoi.vcxproj index 15a890d3..bbf96541 100644 --- a/doc/tutorial/12_voronoi.vcxproj +++ b/doc/tutorial/12_voronoi.vcxproj @@ -44,7 +44,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/13_shader_builder.vcxproj b/doc/tutorial/13_shader_builder.vcxproj index 39b839de..05de87e4 100644 --- a/doc/tutorial/13_shader_builder.vcxproj +++ b/doc/tutorial/13_shader_builder.vcxproj @@ -34,7 +34,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/14_lol_lua.vcxproj b/doc/tutorial/14_lol_lua.vcxproj index 0d01e704..fa0ffd4d 100644 --- a/doc/tutorial/14_lol_lua.vcxproj +++ b/doc/tutorial/14_lol_lua.vcxproj @@ -34,7 +34,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/doc/tutorial/15_lolimgui.vcxproj b/doc/tutorial/15_lolimgui.vcxproj index df1909b0..80c29484 100644 --- a/doc/tutorial/15_lolimgui.vcxproj +++ b/doc/tutorial/15_lolimgui.vcxproj @@ -34,7 +34,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/3rdparty/Makefile.am b/src/3rdparty/Makefile.am index 6b8f4c13..70454cb4 100644 --- a/src/3rdparty/Makefile.am +++ b/src/3rdparty/Makefile.am @@ -1,7 +1,10 @@ include $(top_srcdir)/build/autotools/common.am -noinst_LIBRARIES = liblol-bullet.a liblol-lua.a +noinst_LIBRARIES = liblol-lua.a +if LOL_USE_BULLET +noinst_LIBRARIES += liblol-bullet.a +endif # Only remove flags that were actually set, because we don't know # what the compiler actually accepts. diff --git a/src/Makefile.am b/src/Makefile.am index 2cf519b2..6961be0e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -26,8 +26,10 @@ liblol_core_a_SOURCES = \ $(sdl_sources) \ $(d3d9_sources) \ $(android_sources) -#liblol_core_a_CPPFLAGS = -include-pch $(srcdir)/lol/engine-internal.h.pch $(AM_CPPFLAGS) -I$(srcdir)/3rdparty/bullet3/src -I$(srcdir)/3rdparty/lua/src -liblol_core_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/3rdparty/bullet3/src -I$(srcdir)/3rdparty/lua/src +liblol_core_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/3rdparty/lua/src +if LOL_USE_BULLET +liblol_core_a_CPPFLAGS += -I$(srcdir)/3rdparty/bullet3/src +endif liblol_core_headers = \ lol/engine-internal.h lol/engine.h lol/public.h lol/extras.h lol/legacy.h \ diff --git a/src/lol-core.vcxproj b/src/lol-core.vcxproj index 630f5fb1..a336644e 100644 --- a/src/lol-core.vcxproj +++ b/src/lol-core.vcxproj @@ -396,7 +396,7 @@ - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/t/test-base.vcxproj b/src/t/test-base.vcxproj index 7f8b9a18..0286aa90 100644 --- a/src/t/test-base.vcxproj +++ b/src/t/test-base.vcxproj @@ -42,7 +42,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/t/test-entity.vcxproj b/src/t/test-entity.vcxproj index ef6be401..9832b641 100644 --- a/src/t/test-entity.vcxproj +++ b/src/t/test-entity.vcxproj @@ -38,7 +38,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/t/test-image.vcxproj b/src/t/test-image.vcxproj index b2c39074..281fca71 100644 --- a/src/t/test-image.vcxproj +++ b/src/t/test-image.vcxproj @@ -39,7 +39,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/t/test-math.vcxproj b/src/t/test-math.vcxproj index c3af3170..a1ec3464 100644 --- a/src/t/test-math.vcxproj +++ b/src/t/test-math.vcxproj @@ -55,7 +55,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661} diff --git a/src/t/test-sys.vcxproj b/src/t/test-sys.vcxproj index 80fcd3c9..9c24172a 100644 --- a/src/t/test-sys.vcxproj +++ b/src/t/test-sys.vcxproj @@ -38,7 +38,7 @@ {9e62f2fe-3408-4eae-8238-fd84238ceeda} - + {83d3b207-c601-4025-8f41-01dedc354661}