Resolved merges of FindOggVorbis.cmake and CMakeLists.txt cmake
authorNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Tue, 11 May 2010 22:09:34 -0500
branchcmake
changeset 109 d0ed8b1f4f7a
parent 107 9d1f00d9dbbe
child 112 51b12649d519
Resolved merges of FindOggVorbis.cmake and CMakeLists.txt
CMakeLists.txt
Lugaru.sln
Lugaru.vcproj
cmake/FindVorbis.cmake
cmake/Modules/FindOggVorbis.cmake
makefile.old
makefile.orig
makemac.sh
--- a/CMakeLists.txt	Tue May 11 19:12:05 2010 -0500
+++ b/CMakeLists.txt	Tue May 11 22:09:34 2010 -0500
@@ -2,8 +2,30 @@
 
 cmake_minimum_required(VERSION 2.6)
 
-set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+if(NOT CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
+      "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel"
+      FORCE)
+endif(NOT CMAKE_BUILD_TYPE)
 
+if(NOT LUGARU_INSTALL_PREFIX)
+  if(WIN32)
+     set(LUGARU_INSTALL_PREFIX C:\Lugaru CACHE PATH
+     "LUGARU_INSTALL_PREFIX: Install path prefix, prepended onto install directories."
+      FORCE)
+  else(WIN32)
+     set(LUGARU_INSTALL_PREFIX /usr/local/lugaru CACHE PATH
+     "CMAKE_INSTALL_PREFIX: Install path prefix, prepended onto install directories."
+      FORCE)
+  endif(WIN32)
+endif(NOT LUGARU_INSTALL_PREFIX)
+
+set(CMAKE_INSTALL_PREFIX "${LUGARU_INSTALL_PREFIX}" CACHE INTERNAL "Prefix
+prepended to install directories" FORCE)
+
+
+
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
 find_package(OpenAL REQUIRED)
 find_package(BZip2 REQUIRED)
 find_package(PNG REQUIRED)
@@ -12,7 +34,7 @@
 find_package(OpenGL REQUIRED)
 find_package(GLU REQUIRED)
 find_package(SDL REQUIRED)
-find_package(Vorbis REQUIRED)
+find_package(OggVorbis REQUIRED)
 
 include_directories(
 	${OPENAL_INCLUDES}
@@ -23,10 +45,20 @@
 	${OPENGL_INCLUDE_DIR}
 	${GLU_INCLUDE_DIR}
 	${SDL_INCLUDE_DIR}
-	${VORBIS_INCLUDE_DIR}
+	${VORBISFILE_INCLUDE_DIR}
 	${OGG_INCLUDE_DIR}
 	${CMAKE_SOURCE_DIR}/Source)
 
-set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBRARY} ${OGG_LIBRARY})
+set(LUGARU_LIBS ${OPENAL_LIBRARY} ${PNG_LIBRARY} ${JPEG_LIBRARY} ${BZIP2_LIBRARIES} ${ZLIB_LIBRARIES} ${SDL_LIBRARY} ${GLU_LIBRARY} ${OPENGL_LIBRARY} ${VORBISFILE_LIBS} ${OGG_LIBS})
 
 add_subdirectory(Source)
+
+# Install target
+if(WIN32)
+	install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru.exe DESTINATION ${CMAKE_INSTALL_PREFIX})
+else(WIN32)
+	install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/Source/lugaru DESTINATION ${CMAKE_INSTALL_PREFIX})
+endif(WIN32)
+
+install(DIRECTORY ${CMAKE_SOURCE_DIR}/Data DESTINATION ${CMAKE_INSTALL_PREFIX})
+
--- a/Lugaru.sln	Tue May 11 19:12:05 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lugaru", "Lugaru.vcproj", "{71D87E45-76A7-497F-9176-DA2600007A65}"
-	ProjectSection(ProjectDependencies) = postProject
-	EndProjectSection
-EndProject
-Global
-	GlobalSection(SolutionConfiguration) = preSolution
-		Debug = Debug
-		Release = Release
-	EndGlobalSection
-	GlobalSection(ProjectConfiguration) = postSolution
-		{71D87E45-76A7-497F-9176-DA2600007A65}.Debug.ActiveCfg = Debug|Win32
-		{71D87E45-76A7-497F-9176-DA2600007A65}.Debug.Build.0 = Debug|Win32
-		{71D87E45-76A7-497F-9176-DA2600007A65}.Release.ActiveCfg = Release|Win32
-		{71D87E45-76A7-497F-9176-DA2600007A65}.Release.Build.0 = Release|Win32
-	EndGlobalSection
-	GlobalSection(ExtensibilityGlobals) = postSolution
-	EndGlobalSection
-	GlobalSection(ExtensibilityAddIns) = postSolution
-	EndGlobalSection
-EndGlobal
--- a/Lugaru.vcproj	Tue May 11 19:12:05 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,360 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="7.10"
-	Name="Lugaru"
-	ProjectGUID="{71D87E45-76A7-497F-9176-DA2600007A65}"
-	RootNamespace="Lugaru"
-	Keyword="Win32Proj">
-	<Platforms>
-		<Platform
-			Name="Win32"/>
-	</Platforms>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			OutputDirectory="Debug"
-			IntermediateDirectory="Debug"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				Optimization="0"
-				AdditionalIncludeDirectories="./Source;./Source/devil/include"
-				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
-				MinimalRebuild="TRUE"
-				BasicRuntimeChecks="3"
-				RuntimeLibrary="5"
-				BufferSecurityCheck="TRUE"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="FALSE"
-				DebugInformationFormat="4"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/Lugaru.exe"
-				LinkIncremental="2"
-				GenerateDebugInformation="TRUE"
-				ProgramDatabaseFile="$(OutDir)/Lugaru.pdb"
-				SubSystem="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			OutputDirectory="Release"
-			IntermediateDirectory="Release"
-			ConfigurationType="1"
-			CharacterSet="2">
-			<Tool
-				Name="VCCLCompilerTool"
-				AdditionalIncludeDirectories="./Source;./Source/devil/include"
-				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
-				BasicRuntimeChecks="0"
-				RuntimeLibrary="4"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				Detect64BitPortabilityProblems="FALSE"
-				DebugInformationFormat="3"/>
-			<Tool
-				Name="VCCustomBuildTool"/>
-			<Tool
-				Name="VCLinkerTool"
-				OutputFile="$(OutDir)/Lugaru.exe"
-				LinkIncremental="1"
-				GenerateDebugInformation="TRUE"
-				SubSystem="2"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				TargetMachine="1"/>
-			<Tool
-				Name="VCMIDLTool"/>
-			<Tool
-				Name="VCPostBuildEventTool"/>
-			<Tool
-				Name="VCPreBuildEventTool"/>
-			<Tool
-				Name="VCPreLinkEventTool"/>
-			<Tool
-				Name="VCResourceCompilerTool"/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"/>
-			<Tool
-				Name="VCWebDeploymentTool"/>
-			<Tool
-				Name="VCManagedWrapperGeneratorTool"/>
-			<Tool
-				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
-			<File
-				RelativePath=".\Source\Frustum.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\GameDraw.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\GameInitDispose.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\GameTick.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Globals.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Lights.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Models.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Objects.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\OpenGL_Windows.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\pack.c">
-			</File>
-			<File
-				RelativePath=".\Source\pack_private.c">
-			</File>
-			<File
-				RelativePath=".\Source\Person.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\private.c">
-			</File>
-			<File
-				RelativePath=".\Source\Quaternions.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Random.c">
-			</File>
-			<File
-				RelativePath=".\Source\Skeleton.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Skybox.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Sprites.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Terrain.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\Text.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\TGALoader.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\unpack.c">
-			</File>
-			<File
-				RelativePath=".\Source\unpack_private.c">
-			</File>
-			<File
-				RelativePath=".\Source\Weapons.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\WinDefs.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\WinInput.cpp">
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
-			<File
-				RelativePath=".\Source\binio.h">
-			</File>
-			<File
-				RelativePath=".\Source\Constants.h">
-			</File>
-			<File
-				RelativePath=".\Source\Frustum.h">
-			</File>
-			<File
-				RelativePath=".\Source\Game.h">
-			</File>
-			<File
-				RelativePath=".\Source\gl.h">
-			</File>
-			<File
-				RelativePath=".\Source\Lights.h">
-			</File>
-			<File
-				RelativePath=".\Source\LinkedList.h">
-			</File>
-			<File
-				RelativePath=".\Source\md5.h">
-			</File>
-			<File
-				RelativePath=".\Source\Models.h">
-			</File>
-			<File
-				RelativePath=".\Source\Objects.h">
-			</File>
-			<File
-				RelativePath=".\Source\pack_private.h">
-			</File>
-			<File
-				RelativePath=".\Source\Person.h">
-			</File>
-			<File
-				RelativePath=".\Source\PhysicsMath.h">
-			</File>
-			<File
-				RelativePath=".\Source\Pointer.h">
-			</File>
-			<File
-				RelativePath=".\Source\private.h">
-			</File>
-			<File
-				RelativePath=".\Source\Quaternions.h">
-			</File>
-			<File
-				RelativePath=".\Source\Random.h">
-			</File>
-			<File
-				RelativePath=".\Source\Skeleton.h">
-			</File>
-			<File
-				RelativePath=".\Source\Skybox.h">
-			</File>
-			<File
-				RelativePath=".\Source\Sprites.h">
-			</File>
-			<File
-				RelativePath=".\Source\Terrain.h">
-			</File>
-			<File
-				RelativePath=".\Source\Text.h">
-			</File>
-			<File
-				RelativePath=".\Source\TGALoader.h">
-			</File>
-			<File
-				RelativePath=".\Source\unpack_private.h">
-			</File>
-			<File
-				RelativePath=".\Source\Weapons.h">
-			</File>
-			<File
-				RelativePath=".\Source\wincompat.h">
-			</File>
-			<File
-				RelativePath=".\Source\WinDefs.h">
-			</File>
-			<File
-				RelativePath=".\Source\WinInput.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
-			<File
-				RelativePath=".\Source\res\lugaru.ico">
-			</File>
-			<File
-				RelativePath=".\Source\res\Lugaru.rc">
-			</File>
-			<File
-				RelativePath=".\Source\res\resource.h">
-			</File>
-		</Filter>
-		<Filter
-			Name="fmod"
-			Filter="">
-			<File
-				RelativePath=".\Source\fmod.h">
-			</File>
-			<File
-				RelativePath=".\Source\fmod_errors.h">
-			</File>
-			<File
-				RelativePath=".\Source\fmod_header.h">
-			</File>
-			<File
-				RelativePath=".\Source\fmoddyn.h">
-			</File>
-			<File
-				RelativePath=".\Source\fmodvc.lib">
-			</File>
-		</Filter>
-		<Filter
-			Name="devil"
-			Filter="">
-			<Filter
-				Name="lib"
-				Filter="">
-				<File
-					RelativePath=".\Source\devil\lib\DevIL.lib">
-				</File>
-				<File
-					RelativePath=".\Source\devil\lib\ILU.lib">
-				</File>
-				<File
-					RelativePath=".\Source\devil\lib\ILUT.lib">
-				</File>
-			</Filter>
-		</Filter>
-		<Filter
-			Name="logger"
-			Filter="">
-			<File
-				RelativePath=".\Source\logger\logger.cpp">
-			</File>
-			<File
-				RelativePath=".\Source\logger\logger.h">
-			</File>
-		</Filter>
-		<File
-			RelativePath=".\Data\config.txt">
-		</File>
-		<File
-			RelativePath=".\Source\Driver.cc">
-		</File>
-		<File
-			RelativePath=".\Source\Md5.cc">
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
--- a/cmake/FindVorbis.cmake	Tue May 11 19:12:05 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-# - Find vorbis
-# Find the native vorbis includes and libraries
-#
-#  VORBIS_INCLUDE_DIR - where to find vorbis.h, etc.
-#  VORBIS_LIBRARIES   - List of libraries when using vorbis(file).
-#  VORBIS_FOUND       - True if vorbis found.
-
-if(NOT GP2XWIZ)
-    if(VORBIS_INCLUDE_DIR)
-        # Already in cache, be silent
-        set(VORBIS_FIND_QUIETLY TRUE)
-    endif(VORBIS_INCLUDE_DIR)
-    find_path(OGG_INCLUDE_DIR ogg/ogg.h)
-    find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
-    # MSVC built ogg/vorbis may be named ogg_static and vorbis_static
-    find_library(OGG_LIBRARY NAMES ogg ogg_static)
-    find_library(VORBIS_LIBRARY NAMES vorbis vorbis_static)
-    find_library(VORBISFILE_LIBRARY NAMES vorbisfile vorbisfile_static)
-    # Handle the QUIETLY and REQUIRED arguments and set VORBIS_FOUND
-    # to TRUE if all listed variables are TRUE.
-    include(FindPackageHandleStandardArgs)
-    find_package_handle_standard_args(VORBIS DEFAULT_MSG
-        OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR
-        OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
-else(NOT GP2XWIZ)
-    find_path(VORBIS_INCLUDE_DIR tremor/ivorbisfile.h)
-    find_library(VORBIS_LIBRARY NAMES vorbis_dec)
-    find_package_handle_standard_args(VORBIS DEFAULT_MSG
-        VORBIS_INCLUDE_DIR VORBIS_LIBRARY)
-endif(NOT GP2XWIZ)
-    
-if(VORBIS_FOUND)
-  if(NOT GP2XWIZ)
-     set(VORBIS_LIBRARIES ${VORBISFILE_LIBRARY} ${VORBIS_LIBRARY}
-           ${OGG_LIBRARY})
-  else(NOT GP2XWIZ)
-     set(VORBIS_LIBRARIES ${VORBIS_LIBRARY})
-  endif(NOT GP2XWIZ)
-else(VORBIS_FOUND)
-  set(VORBIS_LIBRARIES)
-endif(VORBIS_FOUND)
-
-mark_as_advanced(OGG_INCLUDE_DIR VORBIS_INCLUDE_DIR)
-mark_as_advanced(OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY)
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cmake/Modules/FindOggVorbis.cmake	Tue May 11 22:09:34 2010 -0500
@@ -0,0 +1,91 @@
+# - Try to find the OggVorbis libraries
+# Once done this will define
+#
+#  OGGVORBIS_FOUND - system has OggVorbis
+#  OGGVORBIS_VERSION - set either to 1 or 2
+#  OGGVORBIS_INCLUDE_DIR - the OggVorbis include directory
+#  OGGVORBIS_LIBRARIES - The libraries needed to use OggVorbis
+#  OGG_LIBRARY         - The Ogg library
+#  VORBIS_LIBRARY      - The Vorbis library
+#  VORBISFILE_LIBRARY  - The VorbisFile library
+#  VORBISENC_LIBRARY   - The VorbisEnc library
+
+# Copyright (c) 2006, Richard Laerkaeng, <richard@goteborg.utfors.se>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+include (CheckLibraryExists)
+
+find_path(VORBIS_INCLUDE_DIR vorbis/vorbisfile.h)
+find_path(OGG_INCLUDE_DIR ogg/ogg.h)
+
+find_library(OGG_LIBRARY NAMES ogg)
+find_library(VORBIS_LIBRARY NAMES vorbis)
+find_library(VORBISFILE_LIBRARY NAMES vorbisfile)
+find_library(VORBISENC_LIBRARY NAMES vorbisenc)
+
+mark_as_advanced(VORBIS_INCLUDE_DIR OGG_INCLUDE_DIR
+                 OGG_LIBRARY VORBIS_LIBRARY VORBISFILE_LIBRARY VORBISENC_LIBRARY)
+
+
+if (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+   set(OGGVORBIS_FOUND TRUE)
+
+   set(OGGVORBIS_LIBRARIES ${OGG_LIBRARY} ${VORBIS_LIBRARY} ${VORBISFILE_LIBRARY} ${VORBISENC_LIBRARY})
+
+   set(_CMAKE_REQUIRED_LIBRARIES_TMP ${CMAKE_REQUIRED_LIBRARIES})
+   set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OGGVORBIS_LIBRARIES})
+   check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
+   set(CMAKE_REQUIRED_LIBRARIES ${_CMAKE_REQUIRED_LIBRARIES_TMP})
+
+   if (HAVE_LIBVORBISENC2)
+      set (OGGVORBIS_VERSION 2)
+   else (HAVE_LIBVORBISENC2)
+      set (OGGVORBIS_VERSION 1)
+   endif (HAVE_LIBVORBISENC2)
+
+else (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+   set (OGGVORBIS_VERSION)
+   set(OGGVORBIS_FOUND FALSE)
+endif (VORBIS_INCLUDE_DIR AND VORBIS_LIBRARY AND VORBISFILE_LIBRARY AND VORBISENC_LIBRARY)
+
+
+if (OGGVORBIS_FOUND)
+   if (NOT OggVorbis_FIND_QUIETLY)
+      message(STATUS "Found OggVorbis: ${OGGVORBIS_LIBRARIES}")
+   endif (NOT OggVorbis_FIND_QUIETLY)
+else (OGGVORBIS_FOUND)
+   if (OggVorbis_FIND_REQUIRED)
+      message(FATAL_ERROR "Could NOT find OggVorbis libraries")
+   endif (OggVorbis_FIND_REQUIRED)
+   if (NOT OggVorbis_FIND_QUITELY)
+      message(STATUS "Could NOT find OggVorbis libraries")
+   endif (NOT OggVorbis_FIND_QUITELY)
+endif (OGGVORBIS_FOUND)
+
+check_include_files(vorbis/vorbisfile.h HAVE_VORBISFILE_H)
+check_library_exists(ogg ogg_page_version "" HAVE_LIBOGG)
+check_library_exists(vorbis vorbis_info_init "" HAVE_LIBVORBIS)
+check_library_exists(vorbisfile ov_open "" HAVE_LIBVORBISFILE)
+check_library_exists(vorbisenc vorbis_info_clear "" HAVE_LIBVORBISENC)
+check_library_exists(vorbis vorbis_bitrate_addblock "" HAVE_LIBVORBISENC2)
+
+if (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
+    message(STATUS "Ogg/Vorbis found")
+    set (VORBIS_LIBS "-lvorbis")
+    set (OGG_LIBS "-logg")
+    set (VORBISFILE_LIBS "-lvorbisfile")
+    set (VORBISENC_LIBS "-lvorbisenc")
+    set (OGGVORBIS_FOUND TRUE)
+    if (HAVE_LIBVORBISENC2)
+        set (HAVE_VORBIS 2)
+    else (HAVE_LIBVORBISENC2)
+        set (HAVE_VORBIS 1)
+    endif (HAVE_LIBVORBISENC2)
+else (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
+    message(STATUS "Ogg/Vorbis not found")
+endif (HAVE_LIBOGG AND HAVE_VORBISFILE_H AND HAVE_LIBVORBIS AND HAVE_LIBVORBISFILE AND HAVE_LIBVORBISENC)
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/makefile.old	Tue May 11 22:09:34 2010 -0500
@@ -0,0 +1,393 @@
+
+macosx := false
+use_devil := false
+use_fmod := false
+
+ifeq ($(strip $(shell uname -s)),Darwin)
+	macosx := true
+endif
+
+#OPT += -O0
+OPT += -O3 -fno-strict-aliasing -falign-loops=16 -fno-math-errno
+#OPT += -Os -fno-strict-aliasing
+
+BINDIR := bin
+RUNDIR := Data
+SRCDIR := Source
+SDLDIR := SDL12
+LIBPNGDIR := libpng-1.2.8
+JPEGLIBDIR := jpeg-6b
+ZLIBDIR := zlib-1.2.3
+OPENALDIR := OpenAL
+GLUDIR := GLU
+LIBOGGDIR := libogg-1.0
+LIBVORBISDIR := libvorbis-1.0.1
+
+ifeq ($(strip $(macosx)),true)
+	CXX := g++-4.0
+	CC := gcc-4.0
+	LD := g++-4.0
+
+  	ifeq ($(strip $(use_devil)),true)
+        $(error DEVIL isn't supported in the Mac OS X builds right now.)
+    endif
+
+  	ifeq ($(strip $(use_fmod)),true)
+        $(error FMOD isn't supported in the Mac OS X builds right now.)
+    endif
+
+	ifeq ($(strip $(XCODE_DIR)),)
+        XCODE_DIR := /Developer
+    endif
+
+	ifeq ($(strip $(macosx_arch)),)
+	  	macosx_arch := $(shell uname -m)
+	endif
+
+	ifeq ($(strip $(macosx_arch)),ppc)
+        macosx_arch_okay := true
+        macosx_version_min := 10.4
+        macosx_version_min_required := 1040
+		macosx_sdk_dir := MacOSX10.4u.sdk
+		macosx_gcc_dir := powerpc-apple-darwin10/4.0.1
+		macosx_gcc_libdir := $(macosx_gcc_dir)
+		macosx_cxx_dir := powerpc-apple-darwin8
+    endif
+
+	ifeq ($(strip $(macosx_arch)),i386)
+        macosx_arch_okay := true
+        macosx_version_min := 10.4
+        macosx_version_min_required := 1040
+		macosx_sdk_dir := MacOSX10.4u.sdk
+		macosx_gcc_dir := i686-apple-darwin10/4.0.1
+		macosx_gcc_libdir := $(macosx_gcc_dir)
+		macosx_cxx_dir := i686-apple-darwin8
+    endif
+
+	ifeq ($(strip $(macosx_arch)),x86_64)
+        macosx_arch_okay := true
+        macosx_version_min := 10.6
+        macosx_version_min_required := 1060
+		macosx_sdk_dir := MacOSX10.6.sdk
+		macosx_gcc_dir := i686-apple-darwin10/4.0.1
+		macosx_gcc_libdir := $(macosx_gcc_dir)/x86_64
+		macosx_cxx_dir := x86_64-apple-darwin8
+    endif
+
+	ifneq ($(strip $(macosx_arch_okay)),true)
+        $(error Unknown Mac OS X architecture. Please update the makefile.)
+    endif
+
+   	EXEEXT := $(macosx_arch)
+
+    CFLAGS += -arch $(macosx_arch)
+    CFLAGS += -mmacosx-version-min=$(macosx_version_min)
+    CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(macosx_version_min_required)
+    CFLAGS += -nostdinc
+    CFLAGS += -F$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/System/Library/Frameworks
+    CFLAGS += -I$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/lib/gcc/$(macosx_gcc_dir)/include
+    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include
+    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0
+    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/$(macosx_cxx_dir)
+    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/$(macosx_cxx_dir)/bits
+    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/backward
+  	CFLAGS += -mdynamic-no-pic
+
+    LDFLAGS += -arch $(macosx_arch)
+    LDFLAGS += -mmacosx-version-min=$(macosx_version_min)
+    LDFLAGS += -F$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/System/Library/Frameworks
+    LDFLAGS += -L$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/lib/gcc/$(macosx_gcc_libdir)
+    LDFLAGS += -Wl,-syslibroot,$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)
+  	LDFLAGS += -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework Carbon -framework OpenAL
+  	LDFLAGS += ./libSDL-1.2.0.dylib ./libSDLmain-osx.a
+else
+	CXX := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
+	CC := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/gcc
+	LD := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
+
+  	CFLAGS += -DPLATFORM_LINUX=1
+  	LDFLAGS += ./libSDL-1.2.so.0 -Wl,-rpath,\$$ORIGIN
+
+  	ifeq ($(strip $(use_devil)),true)
+    	LDFLAGS += ./libIL.so.1 ./libILU.so.1 ./libILUT.so.1
+  	endif
+
+  	ifeq ($(strip $(use_fmod)),true)
+    	POSTLDFLAGS += -lpthread ./libfmod-linux-x86.a
+  	else
+    	LDFLAGS += ./libopenal.so.1
+  	endif
+endif
+
+DEFINES += \
+	-DPLATFORM_UNIX=1 \
+	-DUSE_SDL=1 \
+	-DTRUE=1 \
+	-DFALSE=0 \
+	-Dstricmp=strcasecmp \
+	-DBinIO_STDINT_HEADER="<stdint.h>" \
+
+INCLUDES += \
+			-I$(SRCDIR) \
+			-I$(SDLDIR)/include \
+			-I./OpenGL/ \
+			-I./OpenGL/GL \
+
+ifeq ($(strip $(use_devil)),true)
+    DEFINES += -DUSE_DEVIL=1
+    INCLUDES += -I$(SRCDIR)/devil/include
+else
+    DEFINES += -DZ_PREFIX=1
+    INCLUDES += -I$(ZLIBDIR) -I$(LIBPNGDIR) -I$(JPEGLIBDIR)
+endif
+
+ifeq ($(strip $(use_fmod)),false)
+    DEFINES += -DUSE_OPENAL=1
+    INCLUDES += -I$(OPENALDIR)/include -I$(LIBOGGDIR)/include -I$(LIBVORBISDIR)/include
+endif
+
+CFLAGS += -g -c $(OPT) $(INCLUDES) $(DEFINES) -fsigned-char -pipe -w
+
+
+ifeq ($(strip $(EXEEXT)),)
+   	EXEEXT := bin
+endif
+EXE := $(RUNDIR)/lugaru-$(EXEEXT)
+
+CXXFLAGS := $(CFLAGS)
+
+SRCS := \
+	Frustum.cpp \
+	GameDraw.cpp \
+	GameInitDispose.cpp \
+	GameTick.cpp \
+	Globals.cpp \
+	Lights.cpp \
+	Models.cpp \
+	Objects.cpp \
+	pack.c \
+	pack_private.c \
+	Person.cpp \
+	private.c \
+	Quaternions.cpp \
+	Random.c \
+	Skeleton.cpp \
+	Skybox.cpp \
+	Sprites.cpp \
+	Terrain.cpp \
+	Text.cpp \
+	TGALoader.cpp \
+	unpack.c \
+	unpack_private.c \
+	Weapons.cpp \
+	MacCompatibility.cpp \
+	logger/logger.cpp \
+	WinInput.cpp \
+	OpenGL_Windows.cpp \
+	openal_wrapper.cpp \
+
+SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))
+
+
+UNUSED_SRCS := \
+	DRIVER.CC \
+	MD5.CC \
+
+
+PNGSRCS := \
+    png.c \
+    pngerror.c \
+    pnggccrd.c \
+    pngget.c \
+    pngmem.c \
+    pngpread.c \
+    pngread.c \
+    pngrio.c \
+    pngrtran.c \
+    pngrutil.c \
+    pngset.c \
+    pngtrans.c \
+    pngvcrd.c \
+    pngwio.c \
+    pngwrite.c \
+    pngwtran.c \
+    pngwutil.c \
+
+PNGSRCS := $(foreach f,$(PNGSRCS),$(LIBPNGDIR)/$(f))
+
+JPEGSRCS := \
+	jdapistd.c \
+    jdmaster.c \
+    jdapimin.c \
+    jcapimin.c \
+    jdmerge.c \
+    jdatasrc.c \
+    jdatadst.c \
+    jdcoefct.c \
+    jdcolor.c \
+    jddctmgr.c \
+    jdhuff.c \
+    jdinput.c \
+    jdmainct.c \
+    jdmarker.c \
+    jdphuff.c \
+    jdpostct.c \
+    jdsample.c \
+    jdtrans.c \
+    jerror.c \
+    jidctflt.c \
+    jidctfst.c \
+    jidctint.c \
+    jidctred.c \
+    jmemmgr.c \
+    jutils.c \
+    jmemnobs.c \
+    jquant1.c \
+    jquant2.c \
+    jcomapi.c \
+    jcmarker.c \
+    jcapistd.c \
+    jcparam.c \
+    jcinit.c \
+    jcdctmgr.c \
+    jccoefct.c \
+    jcmainct.c \
+    jfdctflt.c \
+    jfdctint.c \
+    jfdctfst.c \
+    jchuff.c \
+    jcphuff.c \
+    jcsample.c \
+    jcmaster.c \
+    jccolor.c \
+    jcprepct.c \
+
+JPEGSRCS := $(foreach f,$(JPEGSRCS),$(JPEGLIBDIR)/$(f))
+
+
+ZLIBSRCS = \
+	adler32.c \
+	compress.c \
+	crc32.c \
+	deflate.c \
+	gzio.c \
+	infback.c \
+	inffast.c \
+	inflate.c \
+	inftrees.c \
+	trees.c \
+	uncompr.c \
+	zutil.c \
+
+ZLIBSRCS := $(foreach f,$(ZLIBSRCS),$(ZLIBDIR)/$(f))
+
+
+GLUSRCS := \
+	dict.c \
+	geom.c \
+	memalloc.c \
+	mesh.c \
+	mipmap.c \
+	normal.c \
+	priorityq.c \
+	render.c \
+	sweep.c \
+	tess.c \
+	tessmono.c \
+	util.c \
+
+GLUSRCS := $(foreach f,$(GLUSRCS),$(GLUDIR)/$(f))
+
+
+OGGSRCS := \
+	bitwise.o \
+	framing.o
+
+OGGSRCS := $(foreach f,$(OGGSRCS),$(LIBOGGDIR)/src/$(f))
+
+VORBISSRCS := \
+	analysis.o \
+    bitrate.o \
+    block.o \
+    codebook.o \
+    envelope.o \
+    floor0.o \
+    floor1.o \
+    info.o \
+    lpc.o \
+    lsp.o \
+    mapping0.o \
+    mdct.o \
+    psy.o \
+    registry.o \
+    res0.o \
+    sharedbook.o \
+    smallft.o \
+    synthesis.o \
+    vorbisfile.o \
+    window.o
+
+VORBISSRCS := $(foreach f,$(VORBISSRCS),$(LIBVORBISDIR)/lib/$(f))
+
+ifeq ($(strip $(macosx)),false)
+	SRCS += $(GLUSRCS)
+endif
+
+ifeq ($(strip $(use_devil)),false)
+    SRCS += $(PNGSRCS) $(JPEGSRCS) $(ZLIBSRCS)
+endif
+
+ifeq ($(strip $(use_fmod)),false)
+    SRCS += $(OGGSRCS) $(VORBISSRCS)
+endif
+
+OBJS := $(SRCS:.CC=.o)
+OBJS := $(OBJS:.cc=.o)
+OBJS := $(OBJS:.cpp=.o)
+OBJS := $(OBJS:.c=.o)
+OBJS := $(OBJS:.m=.o)
+OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
+
+
+.PHONY: clean all
+
+all : $(EXE)
+
+$(BINDIR)/%.o : %.cpp
+	@mkdir -p $(dir $@)
+	$(CXX) -o $@ $(CXXFLAGS) $<
+
+$(BINDIR)/%.o : %.CC
+	@mkdir -p $(dir $@)
+	$(CXX) -x c++ -o $@ $(CXXFLAGS) $<
+
+$(BINDIR)/%.o : %.cc
+	@mkdir -p $(dir $@)
+	$(CXX) -o $@ $(CXXFLAGS) $<
+
+$(BINDIR)/%.o : %.m
+	@mkdir -p $(dir $@)
+	$(CC) -o $@ $(CFLAGS) $<
+
+$(BINDIR)/%.o : %.c
+	@mkdir -p $(dir $@)
+	$(CC) -o $@ $(CFLAGS) $<
+
+$(EXE) : $(OBJS) $(APPOBJS)
+	@mkdir -p $(dir $@)
+	$(LD) -o $@ $(LDFLAGS) $(OBJS) $(APPOBJS) $(POSTLDFLAGS)
+
+clean:
+	rm -f $(BINDIR)/*.o
+	rm -f $(BINDIR)/$(SRCDIR)/*.o
+	rm -f $(BINDIR)/$(SRCDIR)/logger/*.o
+	rm -f $(BINDIR)/$(GLUDIR)/*.o
+	rm -f $(BINDIR)/$(LIBPNGDIR)/*.o
+	rm -f $(BINDIR)/$(JPEGLIBDIR)/*.o
+	rm -f $(BINDIR)/$(ZLIBDIR)/*.o
+	rm -f $(BINDIR)/$(LIBOGGDIR)/src/*.o
+	rm -f $(BINDIR)/$(LIBVORBISDIR)/lib/*.o
+	rm -f $(EXE)
+
+# end of makefile ...
+
--- a/makefile.orig	Tue May 11 19:12:05 2010 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-
-macosx := false
-use_devil := false
-use_fmod := false
-
-ifeq ($(strip $(shell uname -s)),Darwin)
-	macosx := true
-endif
-
-#OPT += -O0
-OPT += -O3 -fno-strict-aliasing -falign-loops=16 -fno-math-errno
-#OPT += -Os -fno-strict-aliasing
-
-BINDIR := bin
-RUNDIR := Data
-SRCDIR := Source
-SDLDIR := SDL12
-LIBPNGDIR := libpng-1.2.8
-JPEGLIBDIR := jpeg-6b
-ZLIBDIR := zlib-1.2.3
-OPENALDIR := OpenAL
-GLUDIR := GLU
-LIBOGGDIR := libogg-1.0
-LIBVORBISDIR := libvorbis-1.0.1
-
-ifeq ($(strip $(macosx)),true)
-	CXX := g++-4.0
-	CC := gcc-4.0
-	LD := g++-4.0
-
-  	ifeq ($(strip $(use_devil)),true)
-        $(error DEVIL isn't supported in the Mac OS X builds right now.)
-    endif
-
-  	ifeq ($(strip $(use_fmod)),true)
-        $(error FMOD isn't supported in the Mac OS X builds right now.)
-    endif
-
-	ifeq ($(strip $(XCODE_DIR)),)
-        XCODE_DIR := /Developer
-    endif
-
-	ifeq ($(strip $(macosx_arch)),)
-	  	macosx_arch := $(shell uname -m)
-	endif
-
-	ifeq ($(strip $(macosx_arch)),ppc)
-        macosx_arch_okay := true
-        macosx_version_min := 10.4
-        macosx_version_min_required := 1040
-		macosx_sdk_dir := MacOSX10.4u.sdk
-		macosx_gcc_dir := powerpc-apple-darwin10/4.0.1
-		macosx_gcc_libdir := $(macosx_gcc_dir)
-		macosx_cxx_dir := powerpc-apple-darwin8
-    endif
-
-	ifeq ($(strip $(macosx_arch)),i386)
-        macosx_arch_okay := true
-        macosx_version_min := 10.4
-        macosx_version_min_required := 1040
-		macosx_sdk_dir := MacOSX10.4u.sdk
-		macosx_gcc_dir := i686-apple-darwin10/4.0.1
-		macosx_gcc_libdir := $(macosx_gcc_dir)
-		macosx_cxx_dir := i686-apple-darwin8
-    endif
-
-	ifeq ($(strip $(macosx_arch)),x86_64)
-        macosx_arch_okay := true
-        macosx_version_min := 10.6
-        macosx_version_min_required := 1060
-		macosx_sdk_dir := MacOSX10.6.sdk
-		macosx_gcc_dir := i686-apple-darwin10/4.0.1
-		macosx_gcc_libdir := $(macosx_gcc_dir)/x86_64
-		macosx_cxx_dir := x86_64-apple-darwin8
-    endif
-
-	ifneq ($(strip $(macosx_arch_okay)),true)
-        $(error Unknown Mac OS X architecture. Please update the makefile.)
-    endif
-
-   	EXEEXT := $(macosx_arch)
-
-    CFLAGS += -arch $(macosx_arch)
-    CFLAGS += -mmacosx-version-min=$(macosx_version_min)
-    CFLAGS += -DMAC_OS_X_VERSION_MIN_REQUIRED=$(macosx_version_min_required)
-    CFLAGS += -nostdinc
-    CFLAGS += -F$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/System/Library/Frameworks
-    CFLAGS += -I$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/lib/gcc/$(macosx_gcc_dir)/include
-    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include
-    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0
-    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/$(macosx_cxx_dir)
-    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/$(macosx_cxx_dir)/bits
-    CFLAGS += -isystem $(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/include/c++/4.0.0/backward
-  	CFLAGS += -mdynamic-no-pic
-
-    LDFLAGS += -arch $(macosx_arch)
-    LDFLAGS += -mmacosx-version-min=$(macosx_version_min)
-    LDFLAGS += -F$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/System/Library/Frameworks
-    LDFLAGS += -L$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)/usr/lib/gcc/$(macosx_gcc_libdir)
-    LDFLAGS += -Wl,-syslibroot,$(XCODE_DIR)/SDKs/$(macosx_sdk_dir)
-  	LDFLAGS += -framework Cocoa -framework OpenGL -framework IOKit -framework CoreFoundation -framework Carbon -framework OpenAL
-  	LDFLAGS += ./libSDL-1.2.0.dylib ./libSDLmain-osx.a
-else
-	CXX := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
-	CC := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/gcc
-	LD := /opt/crosstool/gcc-4.1.2-glibc-2.3.6/i686-unknown-linux-gnu/i686-unknown-linux-gnu/bin/g++
-
-  	CFLAGS += -DPLATFORM_LINUX=1
-  	LDFLAGS += ./libSDL-1.2.so.0 -Wl,-rpath,\$$ORIGIN
-
-  	ifeq ($(strip $(use_devil)),true)
-    	LDFLAGS += ./libIL.so.1 ./libILU.so.1 ./libILUT.so.1
-  	endif
-
-  	ifeq ($(strip $(use_fmod)),true)
-    	POSTLDFLAGS += -lpthread ./libfmod-linux-x86.a
-  	else
-    	LDFLAGS += ./libopenal.so.1
-  	endif
-endif
-
-DEFINES += \
-	-DPLATFORM_UNIX=1 \
-	-DUSE_SDL=1 \
-	-DTRUE=1 \
-	-DFALSE=0 \
-	-Dstricmp=strcasecmp \
-	-DBinIO_STDINT_HEADER="<stdint.h>" \
-
-INCLUDES += \
-			-I$(SRCDIR) \
-			-I$(SDLDIR)/include \
-			-I./OpenGL/ \
-			-I./OpenGL/GL \
-
-ifeq ($(strip $(use_devil)),true)
-    DEFINES += -DUSE_DEVIL=1
-    INCLUDES += -I$(SRCDIR)/devil/include
-else
-    DEFINES += -DZ_PREFIX=1
-    INCLUDES += -I$(ZLIBDIR) -I$(LIBPNGDIR) -I$(JPEGLIBDIR)
-endif
-
-ifeq ($(strip $(use_fmod)),false)
-    DEFINES += -DUSE_OPENAL=1
-    INCLUDES += -I$(OPENALDIR)/include -I$(LIBOGGDIR)/include -I$(LIBVORBISDIR)/include
-endif
-
-CFLAGS += -g -c $(OPT) $(INCLUDES) $(DEFINES) -fsigned-char -pipe -w
-
-
-ifeq ($(strip $(EXEEXT)),)
-   	EXEEXT := bin
-endif
-EXE := $(RUNDIR)/lugaru-$(EXEEXT)
-
-CXXFLAGS := $(CFLAGS)
-
-SRCS := \
-	Frustum.cpp \
-	GameDraw.cpp \
-	GameInitDispose.cpp \
-	GameTick.cpp \
-	Globals.cpp \
-	Lights.cpp \
-	Models.cpp \
-	Objects.cpp \
-	pack.c \
-	pack_private.c \
-	Person.cpp \
-	private.c \
-	Quaternions.cpp \
-	Random.c \
-	Skeleton.cpp \
-	Skybox.cpp \
-	Sprites.cpp \
-	Terrain.cpp \
-	Text.cpp \
-	TGALoader.cpp \
-	unpack.c \
-	unpack_private.c \
-	Weapons.cpp \
-	MacCompatibility.cpp \
-	logger/logger.cpp \
-	WinInput.cpp \
-	OpenGL_Windows.cpp \
-	openal_wrapper.cpp \
-
-SRCS := $(foreach f,$(SRCS),$(SRCDIR)/$(f))
-
-
-UNUSED_SRCS := \
-	DRIVER.CC \
-	MD5.CC \
-
-
-PNGSRCS := \
-    png.c \
-    pngerror.c \
-    pnggccrd.c \
-    pngget.c \
-    pngmem.c \
-    pngpread.c \
-    pngread.c \
-    pngrio.c \
-    pngrtran.c \
-    pngrutil.c \
-    pngset.c \
-    pngtrans.c \
-    pngvcrd.c \
-    pngwio.c \
-    pngwrite.c \
-    pngwtran.c \
-    pngwutil.c \
-
-PNGSRCS := $(foreach f,$(PNGSRCS),$(LIBPNGDIR)/$(f))
-
-JPEGSRCS := \
-	jdapistd.c \
-    jdmaster.c \
-    jdapimin.c \
-    jcapimin.c \
-    jdmerge.c \
-    jdatasrc.c \
-    jdatadst.c \
-    jdcoefct.c \
-    jdcolor.c \
-    jddctmgr.c \
-    jdhuff.c \
-    jdinput.c \
-    jdmainct.c \
-    jdmarker.c \
-    jdphuff.c \
-    jdpostct.c \
-    jdsample.c \
-    jdtrans.c \
-    jerror.c \
-    jidctflt.c \
-    jidctfst.c \
-    jidctint.c \
-    jidctred.c \
-    jmemmgr.c \
-    jutils.c \
-    jmemnobs.c \
-    jquant1.c \
-    jquant2.c \
-    jcomapi.c \
-    jcmarker.c \
-    jcapistd.c \
-    jcparam.c \
-    jcinit.c \
-    jcdctmgr.c \
-    jccoefct.c \
-    jcmainct.c \
-    jfdctflt.c \
-    jfdctint.c \
-    jfdctfst.c \
-    jchuff.c \
-    jcphuff.c \
-    jcsample.c \
-    jcmaster.c \
-    jccolor.c \
-    jcprepct.c \
-
-JPEGSRCS := $(foreach f,$(JPEGSRCS),$(JPEGLIBDIR)/$(f))
-
-
-ZLIBSRCS = \
-	adler32.c \
-	compress.c \
-	crc32.c \
-	deflate.c \
-	gzio.c \
-	infback.c \
-	inffast.c \
-	inflate.c \
-	inftrees.c \
-	trees.c \
-	uncompr.c \
-	zutil.c \
-
-ZLIBSRCS := $(foreach f,$(ZLIBSRCS),$(ZLIBDIR)/$(f))
-
-
-GLUSRCS := \
-	dict.c \
-	geom.c \
-	memalloc.c \
-	mesh.c \
-	mipmap.c \
-	normal.c \
-	priorityq.c \
-	render.c \
-	sweep.c \
-	tess.c \
-	tessmono.c \
-	util.c \
-
-GLUSRCS := $(foreach f,$(GLUSRCS),$(GLUDIR)/$(f))
-
-
-OGGSRCS := \
-	bitwise.o \
-	framing.o
-
-OGGSRCS := $(foreach f,$(OGGSRCS),$(LIBOGGDIR)/src/$(f))
-
-VORBISSRCS := \
-	analysis.o \
-    bitrate.o \
-    block.o \
-    codebook.o \
-    envelope.o \
-    floor0.o \
-    floor1.o \
-    info.o \
-    lpc.o \
-    lsp.o \
-    mapping0.o \
-    mdct.o \
-    psy.o \
-    registry.o \
-    res0.o \
-    sharedbook.o \
-    smallft.o \
-    synthesis.o \
-    vorbisfile.o \
-    window.o
-
-VORBISSRCS := $(foreach f,$(VORBISSRCS),$(LIBVORBISDIR)/lib/$(f))
-
-ifeq ($(strip $(macosx)),false)
-	SRCS += $(GLUSRCS)
-endif
-
-ifeq ($(strip $(use_devil)),false)
-    SRCS += $(PNGSRCS) $(JPEGSRCS) $(ZLIBSRCS)
-endif
-
-ifeq ($(strip $(use_fmod)),false)
-    SRCS += $(OGGSRCS) $(VORBISSRCS)
-endif
-
-OBJS := $(SRCS:.CC=.o)
-OBJS := $(OBJS:.cc=.o)
-OBJS := $(OBJS:.cpp=.o)
-OBJS := $(OBJS:.c=.o)
-OBJS := $(OBJS:.m=.o)
-OBJS := $(foreach f,$(OBJS),$(BINDIR)/$(f))
-
-
-.PHONY: clean all
-
-all : $(EXE)
-
-$(BINDIR)/%.o : %.cpp
-	@mkdir -p $(dir $@)
-	$(CXX) -o $@ $(CXXFLAGS) $<
-
-$(BINDIR)/%.o : %.CC
-	@mkdir -p $(dir $@)
-	$(CXX) -x c++ -o $@ $(CXXFLAGS) $<
-
-$(BINDIR)/%.o : %.cc
-	@mkdir -p $(dir $@)
-	$(CXX) -o $@ $(CXXFLAGS) $<
-
-$(BINDIR)/%.o : %.m
-	@mkdir -p $(dir $@)
-	$(CC) -o $@ $(CFLAGS) $<
-
-$(BINDIR)/%.o : %.c
-	@mkdir -p $(dir $@)
-	$(CC) -o $@ $(CFLAGS) $<
-
-$(EXE) : $(OBJS) $(APPOBJS)
-	@mkdir -p $(dir $@)
-	$(LD) -o $@ $(LDFLAGS) $(OBJS) $(APPOBJS) $(POSTLDFLAGS)
-
-clean:
-	rm -f $(BINDIR)/*.o
-	rm -f $(BINDIR)/$(SRCDIR)/*.o
-	rm -f $(BINDIR)/$(SRCDIR)/logger/*.o
-	rm -f $(BINDIR)/$(GLUDIR)/*.o
-	rm -f $(BINDIR)/$(LIBPNGDIR)/*.o
-	rm -f $(BINDIR)/$(JPEGLIBDIR)/*.o
-	rm -f $(BINDIR)/$(ZLIBDIR)/*.o
-	rm -f $(BINDIR)/$(LIBOGGDIR)/src/*.o
-	rm -f $(BINDIR)/$(LIBVORBISDIR)/lib/*.o
-	rm -f $(EXE)
-
-# end of makefile ...
-
--- a/makemac.sh	Tue May 11 19:12:05 2010 -0500
+++ b/makemac.sh	Tue May 11 22:09:34 2010 -0500
@@ -6,8 +6,8 @@
 NCPU=`sysctl -n hw.ncpu`
 
 for arch in ppc i386 x86_64 ; do
-    make macosx=true macosx_arch=$arch clean
-    make macosx=true macosx_arch=$arch -j$NCPU
+    make -f makefile.old macosx=true macosx_arch=$arch clean
+    make -f makefile.old macosx=true macosx_arch=$arch -j$NCPU
     # We always strip here. For debugging, you should do "make" directly.
     strip run/lugaru-$arch
     BINS="$BINS run/lugaru-$arch"