From 9ce3a1e6aa40713db5dd11aba3595fb0ad75cc60 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 18 May 2008 11:41:21 +0000 Subject: win32 build updates --- src/Makefile.am | 11 +++++------ src/audio/audio.cc | 3 --- src/audio/audio.h | 7 +++++++ src/sys/sys.cc | 6 +++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 6ad49f8..37e1b2e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,7 +4,7 @@ SUFFIXES = .rc .rc.o: windres $< -o $@ -SUBDIRS = sys math auxiliary filesystem core model server audio render client \ +SUBDIRS = sys math auxiliary filesystem model core server audio render client \ game noinst_HEADERS = config.h bin_PROGRAMS = osiriond osirion @@ -18,9 +18,9 @@ osiriond_DEPENDENCIES = $(ICON_SERVER) $(top_builddir)/src/core/libcore.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 \ - $(top_builddir)/src/game/libgame.la $(top_builddir)/src/math/libmath.la \ + $(top_builddir)/src/game/libgame.la \ $(top_builddir)/src/model/libmodel.la $(top_builddir)/src/server/libserver.la \ - $(top_builddir)/src/sys/libsys.la $(HOST_LIBS) $(ICON_SERVER) + $(top_builddir)/src/math/libmath.la $(top_builddir)/src/sys/libsys.la $(HOST_LIBS) $(ICON_SERVER) # client osirion_SOURCES = osirion.cc @@ -37,7 +37,6 @@ osirion_LDADD = $(top_builddir)/src/game/libgame.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/sys/libsys.la $(top_builddir)/src/filesystem/libfilesystem.la $(top_builddir)/src/sys/libsys.la \ - $(top_builddir)/src/auxiliary/libauxiliary.la $(GL_LIBS) $(HOST_LIBS) $(ICON_CLIENT) -osirion_LDFLAGS = $(LIBSDL_LIBS) $(GL_LIBS) $(AL_LIBS) + $(top_builddir)/src/auxiliary/libauxiliary.la $(AL_LIBS) $(GL_LIBS) $(HOST_LIBS) $(ICON_CLIENT) +osirion_LDFLAGS = $(LIBSDL_LIBS) diff --git a/src/audio/audio.cc b/src/audio/audio.cc index 063a079..3bd3c62 100644 --- a/src/audio/audio.cc +++ b/src/audio/audio.cc @@ -4,9 +4,6 @@ the terms of the GNU General Public License version 2 */ -#include "AL/al.h" -#include "AL/alc.h" - #include "audio/audio.h" #include "audio/buffers.h" #include "audio/pcm.h" diff --git a/src/audio/audio.h b/src/audio/audio.h index 92b8786..bf97a4a 100644 --- a/src/audio/audio.h +++ b/src/audio/audio.h @@ -7,6 +7,13 @@ #ifndef __INCLUDED_AUDIO_AUDIO_H__ #define __INCLUDED_AUDIO_AUDIO_H__ +#ifdef _WIN32 +#include +#endif + +#include "AL/al.h" +#include "AL/alc.h" + /// functions to handle audio namespace audio { diff --git a/src/sys/sys.cc b/src/sys/sys.cc index 4cb820d..36a40a0 100644 --- a/src/sys/sys.cc +++ b/src/sys/sys.cc @@ -29,10 +29,10 @@ namespace sys { void mkdir(std::string const &path) { #ifdef _WIN32 - string p(path); - for (size_t i = 0; i < p.lenght(); i++) + std::string p(path); + for (size_t i = 0; i < p.size(); i++) if (p[i] == '/') p[i] = '\\'; - ::mkdir(p.cstr()); + mkdir(p.c_str()); #else ::mkdir(path.c_str(), 0777); -- cgit v1.2.3