Commit f49f2c72 authored by sletz's avatar sletz
Browse files

Update waf for compilation on OSX.

git-svn-id: http://subversion.jackaudio.org/jack/jack2/trunk/jackmp@2533 0c269be4-1314-0410-8aa9-9f06e86f4224
parent 059eb21d
......@@ -21,9 +21,10 @@ Romain Moret
Jackdmp changes log
---------------------------
2008-06-137Stephane Letz <letz@grame.fr>
2008-06-17 Stephane Letz <letz@grame.fr>
* Driver class hierarchy simplification.
* Update waf for compilation on OSX.
2008-06-13 Stephane Letz <letz@grame.fr>
......
......@@ -29,7 +29,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#include "JackTools.h"
#include "shm.h"
#include <getopt.h>
//#include <stdio.h>
#include <errno.h>
static char* server_name = NULL;
......
......@@ -28,9 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <arpa/inet.h>
#include <errno.h>
#include <unistd.h>
//#include <signal.h>
//#include <stdlib.h>
//#include <string.h>
namespace Jack
{
......
......@@ -37,14 +37,16 @@ extern "C"
extern EXPORT double __jack_time_ratio;
static inline jack_time_t GetMicroSeconds(void) {
static inline jack_time_t GetMicroSeconds(void)
{
return (jack_time_t) (mach_absolute_time () * __jack_time_ratio);
}
/* This should only be called ONCE per process. */
extern void InitTime();
static inline void JackSleep(int usec) {
static inline void JackSleep(int usec)
{
usleep(usec);
}
......@@ -58,7 +60,8 @@ extern "C"
extern void InitTime();
static void JackSleep(int usec) {
static void JackSleep(int usec)
{
Sleep(usec / 1000);
}
......@@ -68,7 +71,8 @@ extern "C"
#include <unistd.h>
static inline void JackSleep(long usec) {
static inline void JackSleep(long usec)
{
usleep(usec);
}
......@@ -77,13 +81,15 @@ extern "C"
extern jack_time_t __jack_cpu_mhz;
extern jack_time_t GetMhz();
extern void InitTime();
static inline jack_time_t GetMicroSeconds(void) {
static inline jack_time_t GetMicroSeconds(void)
{
return get_cycles() / __jack_cpu_mhz;
}
#else
#include <time.h>
extern void InitTime();
static inline jack_time_t GetMicroSeconds(void) {
static inline jack_time_t GetMicroSeconds(void)
{
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (jack_time_t)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
......
......@@ -133,7 +133,8 @@ def build(bld):
serverlib.vnum = bld.env()['JACK_API_VERSION']
serverlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib")
serverlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
serverlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
clientlib = bld.create_obj('cpp', 'shlib')
clientlib.features.append('cc')
......@@ -166,7 +167,8 @@ def build(bld):
clientlib.vnum = bld.env()['JACK_API_VERSION']
clientlib.env.append_value("CPPFLAGS", "-fvisibility=hidden")
if bld.env()['IS_MACOSX']:
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib")
clientlib.env.append_value("CPPFLAGS", "-mmacosx-version-min=10.4 -arch i386 -arch ppc")
clientlib.env.append_value("LINKFLAGS", "-framework CoreAudio -framework vecLib -single_module")
netmanagerlib = bld.create_obj('cpp', 'shlib')
netmanagerlib.env['shlib_PATTERN'] = '%s.so'
......
......@@ -58,7 +58,8 @@ def build(bld):
prog = bld.create_obj('cc', 'program')
prog.includes = ['../common/jack', '../common']
prog.source = example_program_source
prog.uselib = 'RT'
if bld.env()['IS_LINUX']:
prog.uselib = 'RT'
prog.uselib_local = 'clientlib'
prog.target = example_program
......@@ -66,7 +67,10 @@ def build(bld):
prog = bld.create_obj('cc', 'program')
prog.includes = ['../common/jack', '../common']
prog.source = 'transport.c'
prog.uselib = 'RT READLINE NCURSES'
if bld.env()['IS_LINUX']:
prog.uselib = 'RT READLINE NCURSES'
if bld.env()['IS_MACOSX']:
prog.uselib = 'READLINE NCURSES'
prog.uselib_local = 'clientlib'
prog.target = 'jack_transport'
......@@ -74,7 +78,10 @@ def build(bld):
prog = bld.create_obj('cc', 'program')
prog.includes = ['../common/jack', '../common']
prog.source = 'capture_client.c'
prog.uselib = 'RT SNDFILE'
if bld.env()['IS_LINUX']:
prog.uselib = 'RT SNDFILE'
if bld.env()['IS_MACOSX']:
prog.uselib = 'SNDFILE'
prog.uselib_local = 'clientlib'
prog.target = 'jack_rec'
......@@ -84,6 +91,7 @@ def build(bld):
lib.includes = ['../common/jack', '../common']
lib.target = example_lib
lib.source = example_lib_source
lib.uselib_local = 'clientlib'
lib.inst_var = bld.env()['ADDON_DIR']
lib.inst_dir = '/'
......
......@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "JackRPCClient.h"
#include "JackError.h"
#include "JackConstants.h"
#include <stdio.h>
namespace Jack
{
......
......@@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "JackRPCEngineUser.c"
#include "JackConstants.h"
#include "JackError.h"
#include <stdio.h>
namespace Jack
{
......
#! /usr/bin/env python
# encoding: utf-8
def create_jack_driver_obj(bld, target, sources, uselib = None):
driver = bld.create_obj('cpp', 'shlib')
driver.features.append('cc')
driver.env['shlib_PATTERN'] = 'jack_%s.so'
driver.defines = 'HAVE_CONFIG_H'
driver.includes = ['.', '../common', '../common/jack']
driver.target = target
driver.source = sources
driver.inst_var = bld.env()['ADDON_DIR']
driver.inst_dir = '/'
driver.uselib_local = 'serverlib'
if uselib:
driver.uselib = uselib
return driver
def build(bld):
jackd = bld.create_obj('cpp', 'program')
jackd.includes = ['.', '../common/jack', '../common']
jackd.defines = 'HAVE_CONFIG_H'
jackd.source = ['../common/Jackdmp.cpp']
jackd.uselib = 'PTHREAD DL'
jackd.uselib_local = 'serverlib'
jackd.target = 'jackd'
create_jack_driver_obj(bld, 'dummy', '../common/JackDummyDriver.cpp')
#create_jack_driver_obj(bld, 'coreaudio', 'JackCoreAudioDriver.cpp', )
create_jack_driver_obj(bld, 'net', '../common/JackNetDriver.cpp')
......@@ -13,9 +13,10 @@ def build(bld):
for test_program, test_program_sources in test_programs.items():
prog = bld.create_obj('cpp', 'program')
prog.features.append('cc')
prog.includes = ['../common/jack', '../common']
prog.includes = ['../macosx', '../common/jack', '../common']
prog.source = test_program_sources
prog.uselib = 'RT'
if bld.env()['IS_LINUX']:
prog.uselib = 'RT'
prog.uselib_local = 'clientlib'
prog.target = test_program
if test_program != 'jack_test':
......
......@@ -128,6 +128,10 @@ def build(bld):
bld.add_subdirs('linux/dbus')
bld.add_subdirs('example-clients')
bld.add_subdirs('tests')
if bld.env()['IS_MACOSX']:
bld.add_subdirs('macosx')
bld.add_subdirs('example-clients')
bld.add_subdirs('tests')
if bld.env()['BUILD_DOXYGEN_DOCS'] == True:
share_dir = Params.g_build.env()['PREFIX'] + '/share/jack-audio-connection-kit'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment