Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-11-16 19:26:53 +0000
committerStijn Buys <ingar@osirion.org>2010-11-16 19:26:53 +0000
commit2daac503a3a2f149f883db7c30199ebbb1f00c7f (patch)
tree6f53bf73d376b6458b173b8d25fd8b420a47911f
parent2056ffa670f6d86ad7c9736ebf2886df3753dbbe (diff)
cleaned up autoconf/automake project files, this should solve build order and dependency issues
-rw-r--r--configure.in88
-rw-r--r--src/Makefile.am90
-rw-r--r--src/audio/Makefile.am6
-rw-r--r--src/client/Makefile.am25
-rw-r--r--src/core/Makefile.am76
-rw-r--r--src/dedicated/Makefile.am21
-rw-r--r--src/filesystem/Makefile.am24
-rw-r--r--src/game/Makefile.am29
-rw-r--r--src/game/base/Makefile.am44
-rw-r--r--src/game/example/Makefile.am23
-rw-r--r--src/game/intro/Makefile.am24
-rw-r--r--src/math/Makefile.am24
-rw-r--r--src/model/Makefile.am38
-rw-r--r--src/render/Makefile.am49
-rw-r--r--src/ui/Makefile.am66
15 files changed, 441 insertions, 186 deletions
diff --git a/configure.in b/configure.in
index 3280245..ede99bf 100644
--- a/configure.in
+++ b/configure.in
@@ -78,7 +78,7 @@ dnl
AC_MSG_CHECKING([host type])
case "$host" in
*-apple-darwin*)
- HOST_LIBS="-lz"
+ HOST_LIBS=""
HOST_GL_LIBS="-framework OpenGL"
HOST_AL_LIBS="-framework OpenAL"
HOST_SDL_LIBS="-framework SDL -framework Cocoa"
@@ -89,10 +89,12 @@ case "$host" in
OS=OSX
AC_MSG_RESULT(OS X)
AC_DEFINE_UNQUOTED(_OSX, 1, [Define this if you are building for native OS X])
+
dnl
dnl Do not rely on AC_PROG_OBJC presence (e.g. autoconf 2.59)
dnl http://www.mail-archive.com/xine-cvslog@lists.sourceforge.net/msg01693.html
dnl
+
m4_ifdef(
[AC_PROG_OBJC],
[AC_PROG_OBJC],
@@ -101,9 +103,9 @@ dnl
AC_SUBST(OBJCFLAGS)]
)
;;
-
+
*-*-mingw*)
- HOST_LIBS="-lws2_32 -lz"
+ HOST_LIBS="-lws2_32"
HOST_GL_LIBS="-lopengl32 -lglu32"
HOST_AL_LIBS="-lopenal32"
ICON_CLIENT="osirion-res.o"
@@ -113,14 +115,15 @@ dnl
OS=WIN32
AC_MSG_RESULT(win32)
;;
+
*)
- HOST_LIBS="-lz"
+ HOST_LIBS=""
HOST_GL_LIBS="-lGL -lGLU"
- HOST_AL_LIBS="-lopenal"
- ICON_CLIENT=""
- ICON_SERVER=""
- SDLMAIN=""
- INSTALLTYPE="standard"
+ HOST_AL_LIBS="-lopenal"
+ ICON_CLIENT=""
+ ICON_SERVER=""
+ SDLMAIN=""
+ INSTALLTYPE="standard"
AC_MSG_RESULT(generic unix)
OS=UNIX
;;
@@ -163,11 +166,11 @@ dnl
AC_MSG_CHECKING(whether to include debug messages)
AC_ARG_ENABLE(debug_messages,
AC_HELP_STRING(
- [--disable-debug-messages], [build without extra debug information]
+ [--disable-debug-messages], [build without extra debug messages]
),
AC_MSG_RESULT(no),
AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED(HAVE_DEBUG_MESSAGES, 1, [Defines if debug information is enabled])
+ AC_DEFINE_UNQUOTED(HAVE_DEBUG_MESSAGES, 1, [Define this to enable debug messages])
)
dnl ----------------------------------------------------------------
@@ -195,7 +198,7 @@ if test "x${with_curses}" != "xno"; then
AC_CHECK_LIB(ncurses, initscr,
HAVE_CURSES="ncurses"
AC_DEFINE(HAVE_CURSES, ncurses, [Define this if you have the curses library])
- CURSES_LIBS="$CURSES_LIBS -lncurses",
+ CURSES_LIBS="-lncurses",
HAVE_CURSES="maybe"
)
fi
@@ -204,7 +207,7 @@ if test "x${with_curses}" != "xno"; then
AC_CHECK_LIB(pdcurses, initscr,
HAVE_CURSES="pdcurses"
AC_DEFINE(HAVE_CURSES, pdcurses, [Define this if you have the curses library])
- CURSES_LIBS="$CURSES_LIBS -lpdcurses",
+ CURSES_LIBS="-lpdcurses",
HAVE_CURSES="maybe"
)
fi
@@ -213,7 +216,7 @@ if test "x${with_curses}" != "xno"; then
AC_CHECK_LIB(curses, initscr,
HAVE_CURSES="curses"
AC_DEFINE(HAVE_CURSES, curses, [Define this if you have the curses library])
- CURSES_LIBS="$CURSES_LIBS -lcurses",
+ CURSES_LIBS="-lcurses",
HAVE_CURSES="maybe"
)
fi
@@ -240,8 +243,8 @@ AC_ARG_WITH(bullet,
)
)
-save_CPPFLAGS="$CPPFLAGS"
-save_LDFLAGS="$LDFLAGS"
+LD_FLAGS_save="$LD_FLAGS"
+CPPFLAGS_save="$CPPFLAGS"
AC_MSG_CHECKING(for bullet directory)
@@ -254,8 +257,8 @@ AC_MSG_RESULT([$BULLET_DIR])
BULLET_CPPFLAGS="-I${BULLET_DIR}/include/bullet"
BULLET_LIBS="$BULLET_DIR/lib/libBulletDynamics.a $BULLET_DIR/lib/libBulletCollision.a $BULLET_DIR/lib/libLinearMath.a"
-CPPFLAGS="$save_CPPFLAGS $BULLET_CPPFLAGS"
-LDFLAGS="$save_LDFLAGS $BULLET_LIBS"
+CPPFLAGS="$CPPFLAGS_save $BULLET_CPPFLAGS"
+LD_FLAGS="$LD_FLAGS_save $BULLET_LIBS"
AC_CHECK_HEADER(btBulletDynamicsCommon.h,
AC_DEFINE(HAVE_BULLET, yes, [Define this if you have the bullet physics library])
@@ -263,8 +266,8 @@ AC_CHECK_HEADER(btBulletDynamicsCommon.h,
AC_MSG_ERROR([bullet physics library not found (http://bulletphysics.org)])
)
-CPPFLAGS="$save_CPPFLAGS"
-LDFLAGS="$save_LDFLAGS"
+CPPFLAGS="$CPPFLAGS_save"
+LD_FLAGS="$LD_FLAGS_save"
AC_SUBST(BULLET_CPPFLAGS)
AC_SUBST(BULLET_LIBS)
@@ -273,6 +276,9 @@ dnl ----------------------------------------------------------------
dnl zlib
dnl
+LIBS_save="$LIBS"
+LD_FLAGS_save="$LD_FLAGS"
+
AC_CHECK_HEADER(zlib.h,
[],
AC_MSG_ERROR([zlib.h not found])
@@ -283,6 +289,13 @@ AC_CHECK_LIB(z, compress,
AC_MSG_ERROR([zlib not found])
)
+LD_FLAGS="$LD_FLAGS_save"
+LIBS="$LIBS_save"
+
+LIBZ_LIBS="-lz"
+AC_SUBST(LIBZ_LIBS)
+
+
dnl ----------------------------------------------------------------
dnl build client and server or dedicated server only
dnl
@@ -301,7 +314,7 @@ if test "x${with_client}" = xno; then
else
AC_MSG_RESULT(yes)
- LDFLAGS_save="$LDFLAGS"
+ LD_FLAGS_save="$LDFLAGS"
dnl ---------------------------------------------------------------
dnl OpenGL
@@ -327,7 +340,7 @@ else
)
fi
- LD_FLAGS="$LDFLAGS_save"
+ LD_FLAGS="$LD_FLAGS_save"
GL_LIBS="$HOST_GL_LIBS"
AC_SUBST(GL_LIBS)
AC_SUBST(GL_CFLAGS)
@@ -347,7 +360,7 @@ else
)
fi
- LD_FLAGS="$LDFLAGS_save"
+ LD_FLAGS="$LD_FLAGS_save"
AL_LIBS="$HOST_AL_LIBS"
AC_SUBST(AL_LIBS)
AC_SUBST(AL_CFLAGS)
@@ -356,6 +369,9 @@ else
dnl libpng
dnl
+ LD_FLAGS_save="$LD_FLAGS"
+ LD_FLAGS="$LD_FLAGS $LIBZ_LIBS"
+
AC_CHECK_HEADER(png.h,
[],
[AC_MSG_ERROR([png.h not found])]
@@ -365,6 +381,7 @@ else
[AC_MSG_ERROR([libpng not found])]
)
+ LD_FLAGS="$LD_FLAGS_save"
LIBPNG_LIBS="-lpng"
AC_SUBST(LIBPNG_LIBS)
@@ -474,10 +491,25 @@ dnl Write makefiles and config.h
AM_CONDITIONAL(BUILD_CLIENT, test "x$BUILD_CLIENT" = xyes)
AM_CONDITIONAL(BUILD_DEDICATED, test "x$BUILD_CLIENT" = xno)
-AC_OUTPUT(Makefile src/Makefile src/audio/Makefile src/auxiliary/Makefile \
- src/client/Makefile src/core/Makefile src/dedicated/Makefile src/filesystem/Makefile \
- src/game/Makefile src/game/base/Makefile src/game/example/Makefile src/game/intro/Makefile \
- src/math/Makefile src/model/Makefile src/render/Makefile src/sys/Makefile src/ui/Makefile)
+AC_OUTPUT( \
+ src/auxiliary/Makefile \
+ src/math/Makefile \
+ src/sys/Makefile \
+ src/filesystem/Makefile \
+ src/model/Makefile \
+ src/core/Makefile \
+ src/dedicated/Makefile \
+ src/audio/Makefile \
+ src/render/Makefile \
+ src/ui/Makefile\
+ src/client/Makefile \
+ src/game/base/Makefile \
+ src/game/example/Makefile \
+ src/game/intro/Makefile \
+ src/game/Makefile \
+ src/Makefile \
+ Makefile
+)
dnl ---------------------------------------------------------------
dnl Configuration summary
@@ -489,7 +521,7 @@ Configuration summary:
platform ........... $host
flags .............. $CPPFLAGS $CXXFLAGS
-libraries .......... $HOST_LIBS $LIBJPG_LIBS $LIBPNG_LIBS $CURSES_LIBS
+libraries .......... $HOST_LIBS $LIBJPG_LIBS $LIBPNG_LIBS $LIBZ_LIBS $CURSES_LIBS
bullet ............. $BULLET_LIBS
curses ............. $HAVE_CURSES
build client ....... $BUILD_CLIENT])
diff --git a/src/Makefile.am b/src/Makefile.am
index c3dc7c8..5064fba 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,8 +4,19 @@ SUFFIXES = .rc
.rc.o:
windres $< -o $@
-SUBDIRS = auxiliary math sys filesystem model core dedicated render ui audio \
- client game
+SUBDIRS = \
+ auxiliary \
+ math \
+ sys \
+ filesystem \
+ model \
+ core \
+ dedicated \
+ audio \
+ render \
+ ui \
+ client \
+ game
noinst_HEADERS = config.h
@@ -18,33 +29,62 @@ endif
# dedicated dedicated
osiriond_SOURCES = osiriond.cc
EXTRA_osiriond_SOURCES = osiriond-res.rc
-osiriond_DEPENDENCIES = $(ICON_SERVER) $(top_builddir)/src/core/libcore.la \
- $(top_builddir)/src/filesystem/libfilesystem.la $(top_builddir)/src/game/libgame.la $(top_builddir)/src/math/libmath.la \
- $(top_builddir)/src/model/libmodel.la $(top_builddir)/src/dedicated/libdedicated.la \
- $(top_builddir)/src/sys/libsys.la $(top_builddir)/src/auxiliary/libauxiliary.la
-osiriond_LDADD = $(top_builddir)/src/auxiliary/libauxiliary.la \
- $(top_builddir)/src/core/libcore.la $(top_builddir)/src/filesystem/libfilesystem.la \
+
+osiriond_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/dedicated/libdedicated.la \
+ $(top_builddir)/src/game/libgame.la \
+ $(ICON_SERVER)
+
+osiriond_LDADD = \
$(top_builddir)/src/game/libgame.la \
- $(top_builddir)/src/model/libmodel.la $(top_builddir)/src/dedicated/libdedicated.la \
- $(top_builddir)/src/math/libmath.la $(top_builddir)/src/sys/libsys.la \
- $(BULLET_LIBS) \
- $(HOST_LIBS) $(BULLET_LIBS) $(CURSES_LIBS) $(ICON_SERVER)
+ $(top_builddir)/src/dedicated/libdedicated.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(ICON_SERVER) \
+ $(BULLET_LIBS) $(CURSES_LIBS) $(LIBZ_LIBS) $(HOST_LIBS)
# client
osirion_SOURCES = osirion.cc
EXTRA_osirion_SOURCES = osirion-res.rc SDLMain.m
-osirion_DEPENDENCIES = $(ICON_CLIENT) $(SDLMAIN) $(top_builddir)/src/core/libcore.la \
- $(top_builddir)/src/audio/libaudio.la $(top_builddir)/src/render/librender.la \
- $(top_builddir)/src/ui/libui.la $(top_builddir)/src/client/libclient.la \
- $(top_builddir)/src/game/libgame.la
+
+osirion_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/audio/libaudio.la \
+ $(top_builddir)/src/render/librender.la \
+ $(top_builddir)/src/ui/libui.la \
+ $(top_builddir)/src/client/libclient.la \
+ $(top_builddir)/src/game/libgame.la \
+ $(SDLMAIN) $(ICON_CLIENT)
+
osirion_CFLAGS = $(LIBSDL_CFLAGS) $(GL_CFLAGS) $(GLUT_CFLAGS)
-osirion_LDADD = $(top_builddir)/src/game/libgame.la $(top_builddir)/src/ui/libui.la \
- $(top_builddir)/src/client/libclient.la $(top_builddir)/src/audio/libaudio.la \
- $(top_builddir)/src/render/librender.la $(top_builddir)/src/core/libcore.la \
- $(top_builddir)/src/filesystem/libfilesystem.la $(top_builddir)/src/model/libmodel.la \
- $(top_builddir)/src/math/libmath.la $(top_builddir)/src/auxiliary/libauxiliary.la \
- $(top_builddir)/src/filesystem/libfilesystem.la $(top_builddir)/src/sys/libsys.la \
+
+osirion_LDADD = \
+ $(top_builddir)/src/game/libgame.la \
+ $(top_builddir)/src/client/libclient.la \
+ $(top_builddir)/src/ui/libui.la \
+ $(top_builddir)/src/render/librender.la \
+ $(top_builddir)/src/audio/libaudio.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/math/libmath.la \
$(top_builddir)/src/auxiliary/libauxiliary.la \
- $(BULLET_LIBS) \
- $(AL_LIBS) $(GL_LIBS) $(HOST_LIBS) $(LIBPNG_LIBS) $(LIBJPG_LIBS) $(SDLMAIN) $(ICON_CLIENT)
-osirion_LDFLAGS = $(LIBSDL_LIBS)
+ $(SDLMAIN) $(ICON_CLIENT) \
+ $(BULLET_LIBS) $(LIBSDL_LIBS) $(AL_LIBS) $(GL_LIBS) \
+ $(LIBJPG_LIBS) $(LIBPNG_LIBS) $(LIBZ_LIBS) $(HOST_LIBS)
diff --git a/src/audio/Makefile.am b/src/audio/Makefile.am
index 62c482d..3d9805d 100644
--- a/src/audio/Makefile.am
+++ b/src/audio/Makefile.am
@@ -7,6 +7,10 @@ else
noinst_LTLIBRARIES = libaudio.la
endif
-libaudio_la_LDFLAGS = -avoid-version -no-undefined
noinst_HEADERS = audio.h buffers.h pcm.h sources.h wav.h
libaudio_la_SOURCES = audio.cc buffers.cc pcm.cc sources.cc wav.cc
+
+libaudio_la_DEPENDENCIES = \
+ $(top_builddir)/src/sys/libsys.la
+
+libaudio_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/client/Makefile.am b/src/client/Makefile.am
index 8edef84..d9ca552 100644
--- a/src/client/Makefile.am
+++ b/src/client/Makefile.am
@@ -7,6 +7,12 @@ else
noinst_LTLIBRARIES = libclient.la
endif
+
+noinst_HEADERS = action.h chat.h client.h clientext.h hud.h entitymenu.h \
+ input.h inventorylistview.h inventory.h joystick.h key.h keyboard.h map.h notifications.h soundext.h \
+ targets.h video.h infowidget.h playerview.h worldview.h trademenu.h buymenu.h \
+ targeticonbutton.h
+
libclient_la_SOURCES = action.cc buymenu.cc chat.cc client.cc clientext.cc \
entitymenu.cc hud.cc infowidget.cc input.cc inventorylistview.cc inventory.cc joystick.cc key.cc \
keyboard.cc map.cc notifications.cc playerview.cc soundext.cc targeticonbutton.cc \
@@ -14,12 +20,17 @@ libclient_la_SOURCES = action.cc buymenu.cc chat.cc client.cc clientext.cc \
libclient_la_CFLAGS = $(LIBSDL_CFLAGS) $(GL_CFLAGS)
-libclient_la_LDFLAGS = -avoid-version -no-undefined $(GL_LIBS) $(LIBSDL_LIBS)
+libclient_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/audio/libaudio.la \
+ $(top_builddir)/src/render/librender.la \
+ $(top_builddir)/src/ui/libui.la
-noinst_HEADERS = action.h chat.h client.h clientext.h hud.h entitymenu.h \
- input.h inventorylistview.h inventory.h joystick.h key.h keyboard.h map.h notifications.h soundext.h \
- targets.h video.h infowidget.h playerview.h worldview.h trademenu.h buymenu.h \
- targeticonbutton.h
+libclient_la_LIBADD =
-libclient_la_LIBADD = $(top_builddir)/src/core/libcore.la $(top_builddir)/src/audio/libaudio.la \
- $(top_builddir)/src/render/librender.la $(top_builddir)/src/ui/libui.la
+libclient_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 7155f86..ce76303 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -3,42 +3,6 @@ INCLUDES = -I$(top_srcdir)/src
noinst_LTLIBRARIES = libcore.la
-libcore_la_LDFLAGS = -avoid-version -no-undefined
-
-libcore_la_LIBADD = $(top_builddir)/src/model/libmodel.la \
- $(top_builddir)/src/filesystem/libfilesystem.la $(top_builddir)/src/math/libmath.la $(top_builddir)/src/sys/libsys.la \
- $(top_builddir)/src/auxiliary/libauxiliary.la
-
-
-libcore_la_SOURCES = \
- application.cc \
- commandbuffer.cc \
- core.cc \
- cvar.cc \
- descriptions.cc \
- entity.cc \
- extension.cc \
- func.cc \
- gameconnection.cc \
- gameinterface.cc \
- gameserver.cc \
- info.cc \
- inventory.cc \
- item.cc \
- label.cc \
- loader.cc \
- module.cc \
- netclient.cc \
- netconnection.cc \
- netplayer.cc \
- netserver.cc \
- parser.cc \
- physics.cc \
- player.cc \
- stats.cc \
- timer.cc \
- zone.cc
-
noinst_HEADERS = \
application.h \
commandbuffer.h \
@@ -70,3 +34,43 @@ noinst_HEADERS = \
stats.h \
timer.h \
zone.h
+
+libcore_la_SOURCES = \
+ application.cc \
+ commandbuffer.cc \
+ core.cc \
+ cvar.cc \
+ descriptions.cc \
+ entity.cc \
+ extension.cc \
+ func.cc \
+ gameconnection.cc \
+ gameinterface.cc \
+ gameserver.cc \
+ info.cc \
+ inventory.cc \
+ item.cc \
+ label.cc \
+ loader.cc \
+ module.cc \
+ netclient.cc \
+ netconnection.cc \
+ netplayer.cc \
+ netserver.cc \
+ parser.cc \
+ physics.cc \
+ player.cc \
+ stats.cc \
+ timer.cc \
+ zone.cc
+
+libcore_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la
+
+libcore_la_LIBADD =
+
+libcore_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/dedicated/Makefile.am b/src/dedicated/Makefile.am
index 879829e..437ce71 100644
--- a/src/dedicated/Makefile.am
+++ b/src/dedicated/Makefile.am
@@ -1,7 +1,18 @@
METASOURCES = AUTO
-libdedicated_la_SOURCES = console.cc dedicated.cc
-noinst_HEADERS = console.h dedicated.h
-noinst_LTLIBRARIES = libdedicated.la
INCLUDES = -I$(top_srcdir)/src
-libdedicated_la_LDFLAGS = -avoid-version -no-undefined
-libdedicated_la_LIBADD = $(top_builddir)/src/core/libcore.la
+
+noinst_LTLIBRARIES = libdedicated.la
+noinst_HEADERS = console.h dedicated.h
+libdedicated_la_SOURCES = console.cc dedicated.cc
+
+libdedicated_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la
+
+libdedicated_la_LIBADD =
+
+libdedicated_la_LDFLAGS = -avoid-version -no-undefined \ No newline at end of file
diff --git a/src/filesystem/Makefile.am b/src/filesystem/Makefile.am
index 46bb401..05c1a3f 100644
--- a/src/filesystem/Makefile.am
+++ b/src/filesystem/Makefile.am
@@ -1,10 +1,24 @@
METASOURCES = AUTO
+INCLUDES = -I$(top_srcdir)/src
+
+noinst_LTLIBRARIES = libfilesystem.la
+noinst_HEADERS = \
+ diskfile.h \
+ file.h \
+ filestream.h \
+ filesystem.h \
+ inifile.h
-libfilesystem_la_SOURCES = diskfile.cc file.cc filestream.cc filesystem.cc \
+libfilesystem_la_SOURCES = \
+ diskfile.cc \
+ file.cc \
+ filestream.cc \
+ filesystem.cc \
inifile.cc
+
libfilesystem_la_LDFLAGS = -avoid-version -no-undefined
-libfilesystem_la_LIBADD = $(top_builddir)/src/sys/libsys.la
-noinst_LTLIBRARIES = libfilesystem.la
-noinst_HEADERS = diskfile.h file.h filestream.h filesystem.h inifile.h
-INCLUDES = -I$(top_srcdir)/src
+libfilesystem_la_DEPENDENCIES = \
+ $(top_builddir)/src/sys/libsys.la
+
+libfilesystem_la_LIBADD =
diff --git a/src/game/Makefile.am b/src/game/Makefile.am
index 47ca032..2aaf56f 100644
--- a/src/game/Makefile.am
+++ b/src/game/Makefile.am
@@ -1,11 +1,26 @@
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
METASOURCES = AUTO
-
-libgame_la_LDFLAGS = -avoid-version
-libgame_la_SOURCES = game.cc
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
+SUBDIRS = base example intro
noinst_LTLIBRARIES = libgame.la
noinst_HEADERS = game.h
-SUBDIRS = base example intro
-libgame_la_LIBADD = $(top_builddir)/src/game/base/libbase.la \
- $(top_builddir)/src/game/intro/libintro.la $(top_builddir)/src/game/example/libexample.la
+
+libgame_la_SOURCES = game.cc
+
+libgame_la_LDFLAGS = -avoid-version -no-undefined
+
+libgame_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/game/base/libbase.la \
+ $(top_builddir)/src/game/example/libexample.la \
+ $(top_builddir)/src/game/intro/libintro.la
+
+libgame_la_LIBADD = \
+ $(top_builddir)/src/game/base/libbase.la \
+ $(top_builddir)/src/game/example/libexample.la \
+ $(top_builddir)/src/game/intro/libintro.la
diff --git a/src/game/base/Makefile.am b/src/game/base/Makefile.am
index bb0d967..a64f73f 100644
--- a/src/game/base/Makefile.am
+++ b/src/game/base/Makefile.am
@@ -1,21 +1,8 @@
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
METASOURCES = AUTO
-libbase_la_LDFLAGS = -avoid-version
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
+
noinst_LTLIBRARIES = libbase.la
-libbase_la_SOURCES = \
- cargo.cc \
- cargopod.cc \
- faction.cc \
- game.cc \
- jumppoint.cc \
- navpoint.cc \
- planet.cc \
- racetrack.cc \
- ship.cc \
- shipmodel.cc \
- star.cc \
- station.cc \
- template.cc
+
noinst_HEADERS = \
cargo.h \
cargopod.h \
@@ -30,3 +17,28 @@ noinst_HEADERS = \
star.h \
station.h \
template.h
+
+libbase_la_SOURCES = \
+ cargo.cc \
+ cargopod.cc \
+ faction.cc \
+ game.cc \
+ jumppoint.cc \
+ navpoint.cc \
+ planet.cc \
+ racetrack.cc \
+ ship.cc \
+ shipmodel.cc \
+ star.cc \
+ station.cc \
+ template.cc
+
+libbase_la_LDFLAGS = -avoid-version -no-undefined
+
+libbase_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la
diff --git a/src/game/example/Makefile.am b/src/game/example/Makefile.am
index bb285eb..99dec0a 100644
--- a/src/game/example/Makefile.am
+++ b/src/game/example/Makefile.am
@@ -1,6 +1,21 @@
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
METASOURCES = AUTO
-libexample_la_LDFLAGS = -avoid-version
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
+
noinst_LTLIBRARIES = libexample.la
-noinst_HEADERS = example.h spectator.h
-libexample_la_SOURCES = example.cc spectator.cc
+noinst_HEADERS = \
+ example.h \
+ spectator.h
+
+libexample_la_SOURCES = \
+ example.cc \
+ spectator.cc
+
+libexample_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la
+
+libexample_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/game/intro/Makefile.am b/src/game/intro/Makefile.am
index eeb6f9d..a9d09b9 100644
--- a/src/game/intro/Makefile.am
+++ b/src/game/intro/Makefile.am
@@ -1,6 +1,22 @@
-INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
METASOURCES = AUTO
-libintro_la_LDFLAGS = -avoid-version
+INCLUDES = -I$(top_srcdir)/src -I$(top_srcdir)/src/game
+
noinst_LTLIBRARIES = libintro.la
-libintro_la_SOURCES = convoy.cc intro.cc
-noinst_HEADERS = convoy.h intro.h
+
+noinst_HEADERS = \
+ convoy.h \
+ intro.h
+
+libintro_la_SOURCES = \
+ convoy.cc \
+ intro.cc
+
+libintro_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la
+
+libintro_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/math/Makefile.am b/src/math/Makefile.am
index d032cb4..0588bba 100644
--- a/src/math/Makefile.am
+++ b/src/math/Makefile.am
@@ -1,15 +1,5 @@
METASOURCES = AUTO
-
-libmath_la_SOURCES = \
- axis.cc \
- boundingbox3f.cc \
- color.cc \
- functions.cc \
- matrix4f.cc \
- vector2f.cc \
- vector3f.cc
-
-libmath_la_LDFLAGS = -avoid-version -no-undefined -lm
+INCLUDES = -I$(top_srcdir)/src
noinst_LTLIBRARIES = libmath.la
noinst_HEADERS = \
@@ -22,4 +12,14 @@ noinst_HEADERS = \
vector2f.h \
vector3f.h
-INCLUDES = -I$(top_srcdir)/src
+libmath_la_SOURCES = \
+ axis.cc \
+ boundingbox3f.cc \
+ color.cc \
+ functions.cc \
+ matrix4f.cc \
+ vector2f.cc \
+ vector3f.cc
+
+libmath_la_LDFLAGS = -avoid-version -no-undefined -lm
+
diff --git a/src/model/Makefile.am b/src/model/Makefile.am
index 6a44471..3d9d7c0 100644
--- a/src/model/Makefile.am
+++ b/src/model/Makefile.am
@@ -1,12 +1,38 @@
METASOURCES = AUTO
+INCLUDES = -I$(top_srcdir)/src
-libmodel_la_SOURCES = asefile.cc fragment.cc mapfile.cc material.cc \
- model.cc face.cc primitives.cc quad.cc tags.cc triangle.cc vertexarray.cc
-libmodel_la_LDFLAGS = -avoid-version -no-undefined -lm
noinst_LTLIBRARIES = libmodel.la
-noinst_HEADERS = asefile.h fragment.h mapfile.h material.h model.h face.h \
- primitives.h quad.h tags.h triangle.h vertexarray.h
+noinst_HEADERS = \
+ asefile.h \
+ face.h \
+ fragment.h \
+ mapfile.h \
+ material.h \
+ model.h \
+ primitives.h \
+ quad.h \
+ tags.h \
+ triangle.h \
+ vertexarray.h
-INCLUDES = -I$(top_srcdir)/src
+libmodel_la_SOURCES = \
+ asefile.cc \
+ face.cc \
+ fragment.cc \
+ mapfile.cc \
+ material.cc \
+ model.cc \
+ primitives.cc \
+ quad.cc \
+ tags.cc \
+ triangle.cc \
+ vertexarray.cc
+
+libmodel_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la
+libmodel_la_LDFLAGS = -avoid-version -no-undefined
diff --git a/src/render/Makefile.am b/src/render/Makefile.am
index 4389805..2e97501 100644
--- a/src/render/Makefile.am
+++ b/src/render/Makefile.am
@@ -7,9 +7,25 @@ else
noinst_LTLIBRARIES = librender.la
endif
-librender_la_LDFLAGS = -avoid-version -no-undefined @GL_LIBS@
+noinst_HEADERS = \
+ camera.h \
+ debugdrawer.h \
+ draw.h \
+ dust.h \
+ gl.h \
+ image.h \
+ jpgfile.h \
+ particles.h \
+ pngfile.h \
+ render.h \
+ renderext.h \
+ screenshot.h \
+ sky.h \
+ state.h \
+ text.h \
+ textures.h \
+ tgafile.h
-librender_la_LIBADD = $(top_builddir)/src/math/libmath.la
librender_la_SOURCES = \
camera.cc \
@@ -30,21 +46,14 @@ librender_la_SOURCES = \
textures.cc \
tgafile.cc
-noinst_HEADERS = \
- camera.h \
- debugdrawer.h \
- draw.h \
- dust.h \
- gl.h \
- image.h \
- jpgfile.h \
- particles.h \
- pngfile.h \
- render.h \
- renderext.h \
- screenshot.h \
- sky.h \
- state.h \
- text.h \
- textures.h \
- tgafile.h
+librender_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la
+
+librender_la_LDFLAGS = -avoid-version -no-undefined
+
+librender_la_LIBADD =
diff --git a/src/ui/Makefile.am b/src/ui/Makefile.am
index a98e964..36a1ac1 100644
--- a/src/ui/Makefile.am
+++ b/src/ui/Makefile.am
@@ -1,5 +1,6 @@
-INCLUDES = -I$(top_srcdir)/src
METASOURCES = AUTO
+INCLUDES = -I$(top_srcdir)/src
+
if BUILD_DEDICATED
noinst_LTLIBRARIES =
@@ -7,15 +8,60 @@ else
noinst_LTLIBRARIES = libui.la
endif
-noinst_HEADERS = bitmap.h button.h console.h container.h definitions.h font.h \
- iconbutton.h inputbox.h label.h listitem.h listview.h \
- menu.h modelview.h paint.h palette.h plaintext.h scrollpane.h \
- slider.h toolbar.h ui.h widget.h window.h
+noinst_HEADERS = \
+ bitmap.h \
+ button.h \
+ console.h \
+ container.h \
+ definitions.h \
+ font.h \
+ iconbutton.h \
+ inputbox.h \
+ label.h \
+ listitem.h \
+ listview.h \
+ menu.h \
+ modelview.h \
+ paint.h \
+ palette.h \
+ plaintext.h \
+ scrollpane.h \
+ slider.h \
+ toolbar.h \
+ ui.h \
+ widget.h \
+ window.h
-libui_la_SOURCES = bitmap.cc button.cc console.cc container.cc font.cc \
- iconbutton.cc inputbox.cc label.cc listitem.cc listview.cc \
- menu.cc modelview.cc paint.cc palette.cc plaintext.cc scrollpane.cc \
- slider.cc toolbar.cc ui.cc widget.cc window.cc
+libui_la_SOURCES = \
+ bitmap.cc \
+ button.cc \
+ console.cc \
+ container.cc \
+ font.cc \
+ iconbutton.cc \
+ inputbox.cc \
+ label.cc \
+ listitem.cc \
+ listview.cc \
+ menu.cc \
+ modelview.cc \
+ paint.cc \
+ palette.cc \
+ plaintext.cc \
+ scrollpane.cc \
+ slider.cc \
+ toolbar.cc \
+ ui.cc \
+ widget.cc \
+ window.cc
-libui_la_LDFLAGS = -avoid-version -no-undefined
+libui_la_DEPENDENCIES = \
+ $(top_builddir)/src/auxiliary/libauxiliary.la \
+ $(top_builddir)/src/math/libmath.la \
+ $(top_builddir)/src/sys/libsys.la \
+ $(top_builddir)/src/filesystem/libfilesystem.la \
+ $(top_builddir)/src/model/libmodel.la \
+ $(top_builddir)/src/core/libcore.la \
+ $(top_builddir)/src/render/librender.la
+libui_la_LDFLAGS = -avoid-version -no-undefined