diff --git a/intern/audaspace/Makefile b/intern/audaspace/Makefile index 759bd16bb2f..c1a613af1ae 100644 --- a/intern/audaspace/Makefile +++ b/intern/audaspace/Makefile @@ -39,6 +39,7 @@ DIRS = intern DIRS += FX DIRS += SDL DIRS += SRC +DIRS += Python ifeq ($(WITH_FFMPEG),true) DIRS += ffmpeg @@ -66,7 +67,7 @@ install: $(ALL_OR_DEBUG) @[ -d $(NAN_AUDASPACE) ] || mkdir $(NAN_AUDASPACE) @[ -d $(NAN_AUDASPACE)/include ] || mkdir $(NAN_AUDASPACE)/include @[ -d $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) ] || mkdir $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) - @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_sdl.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) + @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaudaspace.a $(DIR)/$(DEBUG_DIR)libaud_sdl.a $(DIR)/$(DEBUG_DIR)libaud_python.a $(DIR)/$(DEBUG_DIR)libaud_fx.a $(DIR)/$(DEBUG_DIR)libaud_src.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) ifeq ($(WITH_FFMPEG),true) @../tools/cpifdiff.sh $(DIR)/$(DEBUG_DIR)libaud_ffmpeg.a $(NAN_AUDASPACE)/lib/$(DEBUG_DIR) diff --git a/intern/audaspace/Python/Makefile b/intern/audaspace/Python/Makefile new file mode 100644 index 00000000000..1d7ff3e5650 --- /dev/null +++ b/intern/audaspace/Python/Makefile @@ -0,0 +1,74 @@ +# +# $Id: Makefile 25604 2009-12-29 09:56:11Z sgefant $ +# +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. +# All rights reserved. +# +# The Original Code is: all of this file. +# +# Contributor(s): none yet. +# +# ***** END GPL LICENSE BLOCK ***** +# +# + +LIBNAME = aud_python +DIR = $(OCGDIR)/intern/audaspace + +include nan_compile.mk + +CCFLAGS += $(LEVEL_1_CPP_WARNINGS) + +CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) + +ifeq ($(WITH_SDL),true) + CPPFLAGS += -DWITH_SDL + CPPFLAGS += $(NAN_SDLCFLAGS) +endif + +ifeq ($(WITH_OPENAL),true) + CPPFLAGS += -DWITH_OPENAL + CPPFLAGS += -I../OpenAL +endif + +ifeq ($(WITH_JACK),true) + CPPFLAGS += -DWITH_JACK + CPPFLAGS += $(NAN_JACKCFLAGS) + CPPFLAGS += -I../jack +endif + +ifeq ($(WITH_FFMPEG),true) + CPPFLAGS += -DWITH_FFMPEG + CPPFLAGS += $(NAN_FFMPEGCFLAGS) +endif + +ifeq ($(WITH_SNDFILE),true) + CPPFLAGS += -DWITH_SNDFILE + CPPFLAGS += -I../sndfile + CPPFLAGS += -I$(NAN_SNDFILE)/include +endif + +CPPFLAGS += -I$(NAN_SAMPLERATE)/include/ +CPPFLAGS += -I../ffmpeg +CPPFLAGS += -I../FX +CPPFLAGS += -I../SDL +CPPFLAGS += -I../SRC +CPPFLAGS += -I../intern +CPPFLAGS += -I.. +CPPFLAGS += -I. diff --git a/intern/audaspace/intern/AUD_C-API.cpp b/intern/audaspace/intern/AUD_C-API.cpp index 291f0539905..3393ef75472 100644 --- a/intern/audaspace/intern/AUD_C-API.cpp +++ b/intern/audaspace/intern/AUD_C-API.cpp @@ -23,7 +23,7 @@ * ***** END LGPL LICENSE BLOCK ***** */ -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON #include "AUD_PyAPI.h" Device* g_device; @@ -141,7 +141,7 @@ int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize) AUD_device = dev; AUD_3ddevice = dynamic_cast(AUD_device); -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON if(g_pyinitialized) { g_device = (Device*)Device_empty(); @@ -178,7 +178,7 @@ int* AUD_enumDevices() void AUD_exit() { -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON if(g_device) { Py_XDECREF(g_device); @@ -192,7 +192,7 @@ void AUD_exit() AUD_3ddevice = NULL; } -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON static PyObject* AUD_getCDevice(PyObject* self) { if(g_device) diff --git a/intern/audaspace/intern/AUD_C-API.h b/intern/audaspace/intern/AUD_C-API.h index de2d8465d18..56e50bb4b47 100644 --- a/intern/audaspace/intern/AUD_C-API.h +++ b/intern/audaspace/intern/AUD_C-API.h @@ -26,7 +26,7 @@ #ifndef AUD_CAPI #define AUD_CAPI -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON #include "Python.h" #endif @@ -84,7 +84,7 @@ extern int* AUD_enumDevices(); */ extern void AUD_exit(); -#ifdef WITH_PYTHON +#ifndef DISABLE_PYTHON /** * Initalizes the Python module. */ diff --git a/intern/audaspace/intern/Makefile b/intern/audaspace/intern/Makefile index 8b159f4a639..b89a8bcd397 100644 --- a/intern/audaspace/intern/Makefile +++ b/intern/audaspace/intern/Makefile @@ -35,6 +35,8 @@ include nan_compile.mk CCFLAGS += $(LEVEL_1_CPP_WARNINGS) +CPPFLAGS += -I$(NAN_PYTHON)/include/python$(NAN_PYTHON_VERSION) + ifeq ($(WITH_SDL),true) CPPFLAGS += -DWITH_SDL CPPFLAGS += $(NAN_SDLCFLAGS) @@ -67,5 +69,6 @@ CPPFLAGS += -I../ffmpeg CPPFLAGS += -I../FX CPPFLAGS += -I../SDL CPPFLAGS += -I../SRC +CPPFLAGS += -I../Python CPPFLAGS += -I.. CPPFLAGS += -I.