diff --git a/bootstrap b/bootstrap index f3783a01..8ec24e1a 100755 --- a/bootstrap +++ b/bootstrap @@ -16,6 +16,16 @@ # Die if an error occurs set -e +# LolEngine specific: +sed -ne '/AC_CONFIG_FILES/,$p' configure.ac \ + | sed -ne 's/[ \[*]*\([a-z].*\).Makefile.*/\1/p' | while read p; do + if [ ! -f "$p/Makefile.am" ]; then + echo "bootstrap: $p/Makefile.am does not exist -- creating stub" + mkdir -p "$p" + echo "# Stub created by bootstrap" > "$p/Makefile.am" + fi +done + # Guess whether we are using configure.ac or configure.in if test -f configure.ac; then conffile="configure.ac" diff --git a/configure.ac b/configure.ac index 6ca3182e..c418729d 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,10 @@ dnl PKG_PROG_PKG_CONFIG which needs to be called first. AC_EGREP_CPP(yes, foo) PKG_PROG_PKG_CONFIG() +dnl Available platforms: some of these are not public +AM_CONDITIONAL(HAVE_PS3, test -f src/platform/ps3/ps3app.cpp) + +AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no") dnl conditional builds AC_ARG_ENABLE(debug, [ --enable-debug build debug versions of the game (default no)]) diff --git a/src/Makefile.am b/src/Makefile.am index 5ba2725b..b31901b3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -17,11 +17,8 @@ liblol_a_SOURCES = \ \ eglapp.cpp eglapp.h \ \ - platform/sdl/sdlapp.cpp platform/sdl/sdlapp.h \ - platform/sdl/sdlinput.cpp platform/sdl/sdlinput.h \ - \ - platform/ps3/ps3app.cpp platform/ps3/ps3app.h \ - platform/ps3/ps3input.cpp platform/ps3/ps3input.h \ + $(ps3_sources) \ + $(sdl_sources) \ \ shader/shader.cpp shader/shader.h \ \ @@ -39,3 +36,13 @@ liblol_a_SOURCES = \ debug/quad.cpp debug/quad.h liblol_a_CPPFLAGS = @LOL_CFLAGS@ +sdl_sources = \ + platform/sdl/sdlapp.cpp platform/sdl/sdlapp.h \ + platform/sdl/sdlinput.cpp platform/sdl/sdlinput.h + +if HAVE_PS3 +ps3_sources = \ + platform/ps3/ps3app.cpp platform/ps3/ps3app.h \ + platform/ps3/ps3input.cpp platform/ps3/ps3input.h +endif +