Makefile fixes for Audaspace. This also replaces the not-used

WITH_PYTHON with DISABLE_PYTHON
This commit is contained in:
Ton Roosendaal 2010-08-16 17:04:46 +00:00
parent dc4946f03c
commit 7fc5f78b15
5 changed files with 85 additions and 7 deletions

@ -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)

@ -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.

@ -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_I3DDevice*>(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)

@ -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.
*/

@ -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.