Commit 4ea08266 authored by thomas's avatar thomas
Browse files

changes for older automake versions


git-svn-id: https://svn.grrrr.org/ext/trunk@856 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 82bae86c
......@@ -25,4 +25,9 @@ INSTDIR=/usr/local/lib/pd/flext
# additional compiler flags
# (check if they fit for your system!)
UFLAGS=-DFLEXT_USE_SIMD -malign-power -maltivec -faltivec
UFLAGS=-DFLEXT_USE_SIMD -maltivec -faltivec
......@@ -7,7 +7,7 @@ dnl flext API version (current:release:age)
API_VERSION=0:0:0
AC_INIT([flext],[0.4.7],[gr@grrrr.org],[flext])
AM_INIT_AUTOMAKE(1.8)
AM_INIT_AUTOMAKE(1.6)
dnl configure options
......
......@@ -31,6 +31,11 @@ CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
# flags for shared linking
LSHFLAGS= -dylib -dynamic -flat_namespace -undefined suppress
ifdef $(INSTDIR)
LSHFLAGS_R=-dylib_install_name $(INSTDIR)/libflext.dylib
LSHFLAGS_D=-dylib_install_name $(INSTDIR)/libflext_d.dylib
endif
# frameworks
#FRAMEWORKS=Carbon veclib
......@@ -59,7 +64,7 @@ HDRS+=$(HDRS_STK)
endif
MAKEFILE=makefile.pd-darwin
MAKEFILE=#makefile.pd-darwin
TARGET=$(TARGDIR)/lib$(NAME).a
TARGET_D=$(TARGDIR)/lib$(NAME)_d.a
......@@ -108,10 +113,10 @@ $(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
libtool -static -o $@ $^
$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
ld $(LSHFLAGS) $(LSHFLAGS_R) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
ld $(LSHFLAGS) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
ld $(LSHFLAGS) $(LSHFLAGS_D) -o $@ $^ -ldylib1.o -lgcc -lstdc++ $(patsubst %,-framework %,$(FRAMEWORKS))
.PHONY: clean install
......
......@@ -32,7 +32,7 @@ SRCS_FLEXT = \
flqueue.cpp \
flbind.cpp
pkginclude_HEADERS = \
HDRS_FLEXT = \
flprefix.h \
flstdc.h \
flbase.h \
......@@ -56,30 +56,26 @@ pkginclude_HEADERS = \
#handling for stk / sndobj
SRCS_STK = flstk.cpp
HDRS_STK = flstk.h
if SNDOBJ
SRCS_SNDOBJ = flsndobj.cpp
HDRS_SNDOBJ = flsndobj.h
if SNDOBJ
SRCS_FLEXT += $(SRCS_SNDOBJ)
pkginclude_HEADERS += $(HDRS_SNDOBJ)
LIB_SNDOBJ = -lsndobj
LIB_SNDOBJ = -lsndobj
endif
if STK
SRCS_FLEXT += $(SRCS_STK)
pkginclude_HEADERS += $(HDRS_STK)
LIB_STK = -lstk
SRCS_STK = flstk.cpp
HDRS_STK = flstk.h
LIB_STK = -lstk
endif
libflext_a_SOURCES = $(SRCS_FLEXT)
libflext_d_a_SOURCES = $(SRCS_FLEXT)
libflext_t_a_SOURCES = $(SRCS_FLEXT)
libflext_td_a_SOURCES = $(SRCS_FLEXT)
libflext_la_SOURCES = $(SRCS_FLEXT)
libflext_d_la_SOURCES = $(SRCS_FLEXT)
pkginclude_HEADERS = $(HDRS_FLEXT) $(HDRS_SNDOBJ) $(HDRS_STK)
libflext_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_d_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_t_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_td_a_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_la_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_d_la_SOURCES = $(SRCS_FLEXT) $(SRCS_SNDOBJ) $(SRCS_STK)
libflext_a_CXXFLAGS = @OPT_FLAGS@ @INCLUDEDIR@
libflext_d_a_CXXFLAGS = @INCLUDEDIR@ -g -DFLEXT_DEBUG
......
......@@ -35,7 +35,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <xmmintrin.h> // SSE
#include <emmintrin.h> // SSE2
#include <mm3dnow.h> // 3DNow!
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__MWERKS__) && defined(__VEC__)
#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
#include <sys/sysctl.h>
#include <vDSP.h>
......@@ -47,7 +47,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <altivec.h>
#include <vectorOps.h>
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__GNUG__) && defined(__VEC__)
#include <sys/sysctl.h>
#include <vecLib/vecLib.h>
#endif
......@@ -272,7 +272,6 @@ static unsigned long setsimdcaps()
if(cpuinfo.os_support&_CPU_FEATURE_SSE) simdflags += flext::simd_sse;
if(cpuinfo.os_support&_CPU_FEATURE_SSE2) simdflags += flext::simd_sse2;
#elif FLEXT_CPU == FLEXT_CPU_PPC
#if FLEXT_OSAPI == FLEXT_OSAPI_MAC_MACH
int selectors[2] = { CTL_HW, HW_VECTORUNIT };
......@@ -297,7 +296,7 @@ static unsigned long setsimdcaps()
}
#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#if FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
/* functions for misaligned vector data - taken from the Altivec tutorial of Ian Ollmann, Ph.D. */
......@@ -509,7 +508,7 @@ zero:
#endif
}
#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#if defined(FLEXT_USE_SIMD) && FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
// because of some frame code Altivec stuff should be in seperate functions....
static const vector float zero = (vector float)(0);
......@@ -717,7 +716,7 @@ zero:
while(cnt--) *(dst++) = s;
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(dst))
SetAltivec(dst,cnt,s);
else
......@@ -842,7 +841,7 @@ zero:
vsmul(src,1,&op,dst,1,cnt);
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
MulAltivec(dst,src,op,cnt);
else
......@@ -1072,7 +1071,7 @@ zero:
vmul(src,1,op,1,dst,1,cnt);
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
MulAltivec(dst,src,op,cnt);
else
......@@ -1202,7 +1201,7 @@ loopu:
while(cnt--) *(dst++) = *(src++)+op;
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
AddAltivec(dst,src,op,cnt);
else
......@@ -1430,7 +1429,7 @@ void flext::AddSamples(t_sample *dst,const t_sample *src,const t_sample *op,int
vadd(src,1,op,1,dst,1,cnt);
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(op) && IsVectorAligned(dst))
AddAltivec(dst,src,op,cnt);
else
......@@ -1572,7 +1571,7 @@ loopu:
while(cnt--) *(dst++) = *(src++)*opmul+opadd;
}
else
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__ALTIVEC__)
#elif FLEXT_CPU == FLEXT_CPU_PPC && defined(__VEC__)
if(GetSIMDCapabilities()&simd_altivec && IsVectorAligned(src) && IsVectorAligned(dst))
ScaleAltivec(dst,src,opmul,opadd,cnt);
else
......
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