- fixes compilation errors on Darwin (Mac OS X).

git-svn-id: http://svn.berlios.de/svnroot/repos/sems/trunk@837 8eb893ce-cfd4-0310-b710-fb5ebe64c474
sayer/1.4-spce2.6
Raphael Coeffic 18 years ago
parent 9dd029d80a
commit 268532f59d

@ -82,6 +82,8 @@ CPPFLAGS += -DDEBUG_PLAYOUTBUF
endif
TARGET =
LIB_LDFLAGS = -shared
ifeq ($(OS), linux)
LDFLAGS += -ldl -rdynamic -lpthread
else
@ -93,6 +95,19 @@ ifeq ($(OS), openbsd)
else
ifeq ($(OS), netbsd)
LDFLAGS += -rdynamic -pthread
else
ifeq ($(OS), darwin)
LDFLAGS += -rdynamic -pthread
LIB_LDFLAGS = -flat_namespace -undefined suppress -bundle
CXXFLAGS += -fno-common
CFLAGS += -fno-common
# add the DarwinPorts directory
CPPFLAGS += -I /opt/local/include
LDFLAGS += -L/opt/local/lib
# those modules do not compile by now
exclude_modules += binrpcctrl ilbc
else
LDFLAGS+= -fPIC -ldl -lsocket -lnsl -lpthread
TARGET=solaris
@ -100,8 +115,9 @@ endif
endif
endif
endif
endif
LIB_LDFLAGS = $(LDFLAGS) -shared
LIB_LDFLAGS += $(LDFLAGS)
# install path is $(basedir) $(prefix)
# example:

@ -3,7 +3,7 @@ COREPATH ?= ../core
include $(COREPATH)/../Makefile.defs
exclude_modules ?= mp3 examples
exclude_modules = mp3 examples py_sems
modules ?= $(filter-out $(exclude_modules) \
$(wildcard Makefile*) CVS, \
$(wildcard *) ) examples/tutorial/cc_acc

@ -1,7 +1,7 @@
COREPATH ?=../..
include $(COREPATH)/../Makefile.defs
LDFLAGS += -shared $(module_ldflags)
LDFLAGS += $(module_ldflags)
CPPFLAGS += -I $(COREPATH) -I $(COREPATH)/amci
CFLAGS += -Wall $(module_cflags)
@ -47,7 +47,7 @@ $(lib_full_name): $(lib_name)
cp $(lib_name) $(lib_full_name)
$(lib_name): $(objs) Makefile
$(LD) -o $(lib_name) $(objs) $(LDFLAGS)
$(LD) -o $(lib_name) $(objs) $(LIB_LDFLAGS)
ifeq ($(lib_full_name),$(MAKECMDGOALS))
include $(depends)

@ -25,11 +25,10 @@
# error "can't determine socket option (IP_RECVDSTADDR or IP_PKTINFO)"
#endif
union control_data {
struct cmsghdr cmsg;
u_char data[DSTADDR_DATASIZE];
};
// union control_data {
// struct cmsghdr cmsg;
// u_char data[DSTADDR_DATASIZE];
// };
udp_trsp::udp_trsp(trans_layer* tl)
@ -65,7 +64,7 @@ void udp_trsp::run()
int buf_len;
msghdr msg;
control_data cmsg;
//control_data cmsg;
cmsghdr* cmsgptr;
sockaddr_storage from_addr;
iovec iov[1];
@ -78,8 +77,8 @@ void udp_trsp::run()
msg.msg_namelen = sizeof(sockaddr_storage);
msg.msg_iov = iov;
msg.msg_iovlen = 1;
msg.msg_control = &cmsg;
msg.msg_controllen = sizeof(cmsg);
msg.msg_control = new u_char[DSTADDR_DATASIZE];
msg.msg_controllen = DSTADDR_DATASIZE;
if(sd<=0){
ERROR("Transport instance not bound\n");

@ -1,18 +1,19 @@
plug_in_name = speex
SPEEX_INC=/usr/include/
SPEEX_LIB=-lspeex
SPEEX_INC=
#/usr/include/
SPEEX_LIB = -lspeex
# or:
# SPEEXDIR?=speex_src
# SPEEX_INC?=$(SPEEXDIR)
# SPEEX_LIB?=$(SPEEXDIR)/libspeex/.libs/libspeex.a
# SPEEXDIR ?= speex_src
# SPEEX_INC ?= -I $(SPEEXDIR)
# SPEEX_LIB ?= $(SPEEXDIR)/libspeex/.libs/libspeex.a
#
# CONFIGURE_FLAG=--with-pic
module_ldflags = $(SPEEX_LIB)
module_cflags = -I $(SPEEX_INC) -ansi # -DNOFPU
module_cflags = -ansi # -DNOFPU
ifdef NOFPU
module_cflags += -DNOFPU

@ -32,7 +32,7 @@
#include <string.h>
#include <sys/types.h>
#if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN))
#if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) || (defined(BYTE_ORDER) && (BYTE_ORDER == BIG_ENDIAN))
#define bswap_16(A) ((((u_int16_t)(A) & 0xff00) >> 8) | \
(((u_int16_t)(A) & 0x00ff) << 8))
#define bswap_32(A) ((((u_int32_t)(A) & 0xff000000) >> 24) | \
@ -43,7 +43,7 @@
#define le_to_cpu16(x) bswap_16(x)
#define cpu_to_le32(x) bswap_32(x)
#define le_to_cpu32(x) bswap_32(x)
#elif (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN)
#elif (defined(__BYTE_ORDER) && (__BYTE_ORDER == __LITTLE_ENDIAN)) || defined(_LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN) || (defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN))
#define cpu_to_le16(x) (x)
#define cpu_to_le32(x) (x)
#define le_to_cpu16(x) (x)

Loading…
Cancel
Save