Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--intern/SoundSystem/Makefile28
-rw-r--r--intern/SoundSystem/SND_DependKludge.h3
-rw-r--r--source/Makefile79
4 files changed, 69 insertions, 47 deletions
diff --git a/Makefile b/Makefile
index 1bbb436678a..5934b05487f 100644
--- a/Makefile
+++ b/Makefile
@@ -38,9 +38,9 @@
sinclude user-def.mk
-# To try the experimental new python stuff, uncomment the
-# following line, or put it uncommented in user-def.mk:
-# export EXPYTHON=true
+# To build without openAL, uncomment the following line, or set it as
+# an environment variable, or put it uncommented in user-def.mk:
+# export NAN_NO_OPENAL=true
export NANBLENDERHOME=$(shell pwd)
MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
diff --git a/intern/SoundSystem/Makefile b/intern/SoundSystem/Makefile
index e8e95174c95..25f45e37060 100644
--- a/intern/SoundSystem/Makefile
+++ b/intern/SoundSystem/Makefile
@@ -39,20 +39,24 @@ DIR = $(OCGDIR)/$(SOURCEDIR)
DIRS = intern
DIRS += dummy
-ifeq ($(OS),windows)
- DIRS += fmod
- DIRS += openal
-endif
-#ifeq ($(OS),darwin)
-# DIRS += fmod
-#endif
-ifeq ($(OS),freebsd)
+ifneq ($(NAN_NO_OPENAL),true)
+ ifeq ($(OS),windows)
+ DIRS += fmod
+ DIRS += openal
+ endif
+ #ifeq ($(OS),darwin)
+ # DIRS += fmod
+ #endif
+ ifeq ($(OS),freebsd)
DIRS += openal
-endif
-ifeq ($(OS),$(findstring $(OS), "linux"))
- ifeq ($(CPU),i386)
- DIRS += openal
endif
+ ifeq ($(OS),$(findstring $(OS), "linux"))
+ ifeq ($(CPU),i386)
+ DIRS += openal
+ endif
+ endif
+else
+ CPPFLAGS += -DNO_SOUND
endif
include nan_subdirs.mk
diff --git a/intern/SoundSystem/SND_DependKludge.h b/intern/SoundSystem/SND_DependKludge.h
index df30f46b582..b11697cd76f 100644
--- a/intern/SoundSystem/SND_DependKludge.h
+++ b/intern/SoundSystem/SND_DependKludge.h
@@ -34,6 +34,8 @@
* ***** END GPL/BL DUAL LICENSE BLOCK *****
*/
+#ifndef NO_SOUND
+
# if defined (_WIN32) && !defined(FREE_WINDOWS)
#define USE_OPENAL
#elif defined (__linux__)
@@ -55,3 +57,4 @@
# endif
#endif
+#endif
diff --git a/source/Makefile b/source/Makefile
index be4cf36ece6..c256a0291ce 100644
--- a/source/Makefile
+++ b/source/Makefile
@@ -343,44 +343,59 @@ ifeq ($(OS),solaris)
endif
# OpenAL libs are already compiled as shared code! Check FMod if we switch to that. (nzc)
-ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
- ifeq ($(CPU),i386)
- ifeq ($(OS),freebsd)
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
- NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
+
+
+# Some vars to keep the rest of this section mostly readable
+# in an 80 char term
+SOUNDSYSTEM = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
+DUMMYSOUND = $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
+OPENALSOUND = $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
+
+# Some kooky logic going on here ...
+ifeq ($(NAN_NO_OPENAL), true)
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
+else
+ ifeq ($(OS),$(findstring $(OS), "freebsd linux windows"))
+ ifeq ($(CPU),i386)
+ ifeq ($(OS),freebsd)
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(OPENALSOUND)
+ NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
+ else
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(OPENALSOUND)
+ NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
+ endif
else
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
- NAN_SND_LIBS += $(NAN_OPENAL)/lib/libopenal.a
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
+ ifeq ($(OS),windows)
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(OPENALSOUND)
+ NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
+ else
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
+ endif
endif
else
- ifeq ($(OS),windows)
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/OpenALSoundSystem/$(DEBUG_DIR)libOpenALSoundSystem.a
- NAN_SND_LIBS += $(NAN_OPENAL)/lib/openal_static.lib
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
+ ifeq ($(OS),darwin)
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
else
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
+ NAN_SND_LIBS = $(SOUNDSYSTEM)
+ NAN_SND_LIBS += $(DUMMYSOUND)
+ NAN_SND_LIBS += $(SOUNDSYSTEM)
endif
endif
-else
- ifeq ($(OS),darwin)
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- else
- NAN_SND_LIBS = $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/DummySoundSystem/$(DEBUG_DIR)libDummySoundSystem.a
- NAN_SND_LIBS += $(OCGDIR)/intern/SoundSystem/$(DEBUG_DIR)libSoundSystem.a
- endif
endif
ifeq ($(OS),windows)