Added the variable NAN_NO_OPENAL to force building without
authorChris Want <cwant@ualberta.ca>
Sun, 27 Jul 2003 17:09:19 +0000 (17:09 +0000)
committerChris Want <cwant@ualberta.ca>
Sun, 27 Jul 2003 17:09:19 +0000 (17:09 +0000)
openal. Set NAN_NO_OPENAL to true for this behavior.
Also removed a comment about EXPYTHON, which is obsolete.

Makefile
intern/SoundSystem/Makefile
intern/SoundSystem/SND_DependKludge.h
source/Makefile

index 1bbb436678adc2f1d69528fab783766b19143c48..5934b05487f7052d087f1b18f923f70c3d460bd4 100644 (file)
--- 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
index e8e95174c95deb63caf97584a226f29666d60a9a..25f45e370602e19f9b7022896c65aef8d5c36cab 100644 (file)
@@ -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
index df30f46b58224c46c7cc9af5c08d718cef7e4948..b11697cd76f31c7d3509732ea8b423ebc7c7f53d 100644 (file)
@@ -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
index be4cf36ece604b8dd521653fb37ac4216e06ee96..c256a0291cefd60a75799ca1d8928d4b7e246736 100644 (file)
@@ -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)