aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/flext/config-pd-cygwin.txt6
-rw-r--r--externals/grill/flext/config-pd-mingw.txt4
-rw-r--r--externals/grill/flext/makefile.pd-cygwin44
-rw-r--r--externals/grill/flext/makefile.pd-linux8
-rw-r--r--externals/grill/flext/makefile.pd-mingw47
-rwxr-xr-xexternals/grill/flext/source/flprefix.h8
-rw-r--r--externals/grill/pool/pool.vcproj1
-rw-r--r--externals/grill/pool/source/pool.cpp17
-rw-r--r--externals/grill/pool/source/pool.h3
-rw-r--r--externals/grill/xsample/build-pd-mingw.bat3
-rw-r--r--externals/grill/xsample/config-pd-cygwin.txt7
-rw-r--r--externals/grill/xsample/config-pd-mingw.txt36
-rw-r--r--externals/grill/xsample/makefile.pd-cygwin30
-rw-r--r--externals/grill/xsample/makefile.pd-mingw86
14 files changed, 234 insertions, 66 deletions
diff --git a/externals/grill/flext/config-pd-cygwin.txt b/externals/grill/flext/config-pd-cygwin.txt
index 50a72db0..e596da76 100644
--- a/externals/grill/flext/config-pd-cygwin.txt
+++ b/externals/grill/flext/config-pd-cygwin.txt
@@ -1,5 +1,5 @@
# flext - C++ layer for Max/MSP and pd (pure data) externals
-# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
#
# your c++ compiler (define only if it's different than g++)
@@ -10,11 +10,11 @@ PDPATH=/cygdrive/c/programme/audio/pd
# where is the SndObj include directory?
# (leave blank or comment out to disable SndObj support)
-SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
+# SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
# where is the STK include directory?
# (leave blank or comment out to disable STK support)
-STK=/cygdrive/f/prog/audio/stk/include
+# STK=/cygdrive/f/prog/audio/stk/include
# where should flext libraries be built?
TARGDIR=./pd-cygwin
diff --git a/externals/grill/flext/config-pd-mingw.txt b/externals/grill/flext/config-pd-mingw.txt
index a71d5c46..132d4ccb 100644
--- a/externals/grill/flext/config-pd-mingw.txt
+++ b/externals/grill/flext/config-pd-mingw.txt
@@ -10,11 +10,11 @@ PDPATH=c:/programme/audio/pd
# where is the SndObj include directory?
# (leave blank or comment out to disable SndObj support)
-#SNDOBJ=/cygdrive/f/prog/audio/sndobj/include
+#SNDOBJ=f:/prog/audio/sndobj/include
# where is the STK include directory?
# (leave blank or comment out to disable STK support)
-#STK=/cygdrive/f/prog/audio/stk/include
+#STK=f:/prog/audio/stk/include
# where should flext libraries be built?
TARGDIR=./pd-mingw
diff --git a/externals/grill/flext/makefile.pd-cygwin b/externals/grill/flext/makefile.pd-cygwin
index 85b5d321..951e7990 100644
--- a/externals/grill/flext/makefile.pd-cygwin
+++ b/externals/grill/flext/makefile.pd-cygwin
@@ -6,25 +6,26 @@
# usage:
# to build run "make -f makefile.pd-cygwin"
#
-# ---------------------------------------------
-#
-# compiling for threaded usage is not supported
-#
+# -----------------------------------------------------------
+
CONFIG=config-pd-cygwin.txt
+MAKEFILE=makefile.pd-cygwin
include $(CONFIG)
# compiler+linker stuff
-INCLUDES=$(PDPATH)/src # /usr/include
+# /usr/include before the PD path is necessary to include the right pthread files!
+INCLUDES=/usr/include $(PDPATH)/src
FLAGS=-DFLEXT_SYS=2 $(UFLAGS)
CFLAGS=-O2
CFLAGS_D=-DFLEXT_DEBUG -g
CFLAGS_T=-DFLEXT_THREADS
-CFLAGS_S=-DFLEXT_SHARED
-LIBS=
+CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
+
+PDLIBS=$(PDPATH)/bin/pd.dll $(PDPATH)/bin/pthreadVC.dll
INSTDIR=$(PDPATH)/flext
@@ -50,7 +51,7 @@ SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-cygwin
+
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
@@ -58,7 +59,7 @@ TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
TARGET_S=$(TARGDIR)/$(NAME).dll
TARGET_SD=$(TARGDIR)/$(NAME)_d.dll
-TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) # $(TARGET_S) $(TARGET_SD)
+TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
all: $(TARGDIR) $(TARGETS)
@@ -69,47 +70,48 @@ $(TARGDIR):
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) $(CONFIG)
touch $@
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.ro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.tro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
+$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- $(CXX) -o $@ $^
+$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
+ $(CXX) -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
+ strip --strip-unneeded $@
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- $(CXX) -o $@ $^
+ $(CXX) -g -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
chmod 755 $@
diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux
index b355ccf3..de0f4e5d 100644
--- a/externals/grill/flext/makefile.pd-linux
+++ b/externals/grill/flext/makefile.pd-linux
@@ -106,19 +106,19 @@ $(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
- ar rc $@ $^
+ $(AR) rc $@ $^
chmod 644 $@
$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
diff --git a/externals/grill/flext/makefile.pd-mingw b/externals/grill/flext/makefile.pd-mingw
index 9a7db3a5..ac62dda1 100644
--- a/externals/grill/flext/makefile.pd-mingw
+++ b/externals/grill/flext/makefile.pd-mingw
@@ -7,24 +7,24 @@
# to build run "make -f makefile.pd-mingw"
#
# ---------------------------------------------
-#
-# compiling for threaded usage is not supported
-#
+
CONFIG=config-pd-mingw.txt
+MAKEFILE=makefile.pd-mingw
include $(CONFIG)
# compiler+linker stuff
-INCLUDES=$(PDPATH)/src # /usr/include
+INCLUDES=$(PDPATH)/src
FLAGS=-DFLEXT_SYS=2 $(UFLAGS)
CFLAGS=-O2
CFLAGS_D=-DFLEXT_DEBUG -g
CFLAGS_T=-DFLEXT_THREADS
-CFLAGS_S=-DFLEXT_SHARED
-LIBS=
+CFLAGS_S=-DFLEXT_SHARED -DFLEXT_EXPORTS
+
+PDLIBS=$(PDPATH)/bin/pd.dll $(PDPATH)/bin/pthreadVC.dll
INSTDIR=$(PDPATH)/flext
@@ -50,64 +50,67 @@ SRCS+=$(SRCS_STK)
HDRS+=$(HDRS_STK)
endif
-MAKEFILE=makefile.pd-mingw
+
TARGET=$(TARGDIR)/$(NAME)-pdwin.lib
TARGET_D=$(TARGDIR)/$(NAME)_d-pdwin.lib
TARGET_T=$(TARGDIR)/$(NAME)_t-pdwin.lib
TARGET_TD=$(TARGDIR)/$(NAME)_td-pdwin.lib
+TARGET_S=$(TARGDIR)/$(NAME).dll
+TARGET_SD=$(TARGDIR)/$(NAME)_d.dll
-TARGETS=$(TARGET) $(TARGET_D) # $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
+TARGETS=$(TARGET) $(TARGET_D) $(TARGET_T) $(TARGET_TD) $(TARGET_S) $(TARGET_SD)
all: $(TARGDIR) $(TARGETS)
+
$(TARGDIR):
-mkdir $(TARGDIR)
$(SRCS): $(HDRS) $(IHDRS) $(MAKEFILE) $(CONFIG)
- touch $@
-
+# echo touch $@ # minGW has no touch
-$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.ro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.do : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.to : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.tro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.tdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_T) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGDIR)/%.so : $(SRCDIR)/%.cpp
+$(TARGDIR)/%.sro : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
$(TARGDIR)/%.sdo : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS_D) $(CFLAGS_S) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(SRCDIR)) $< -o $@
-$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS))
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.ro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_D) : $(patsubst %.cpp,$(TARGDIR)/%.do,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.to,$(SRCS))
+$(TARGET_T) : $(patsubst %.cpp,$(TARGDIR)/%.tro,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
$(TARGET_TD) : $(patsubst %.cpp,$(TARGDIR)/%.tdo,$(SRCS))
$(AR) rc $@ $^
- chmod 755 $@
+ chmod 644 $@
-$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.so,$(SRCS))
- $(CXX) -o $@ $^
+$(TARGET_S) : $(patsubst %.cpp,$(TARGDIR)/%.sro,$(SRCS))
+ $(CXX) -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
+ strip --strip-unneeded $@
chmod 755 $@
$(TARGET_SD) : $(patsubst %.cpp,$(TARGDIR)/%.sdo,$(SRCS))
- $(CXX) -o $@ $^
+ $(CXX) -g -shared $(patsubst %,-L%,$(LIBPATH)) -o $@ $^ $(PDLIBS)
chmod 755 $@
diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h
index 71cdaee9..7b39af88 100755
--- a/externals/grill/flext/source/flprefix.h
+++ b/externals/grill/flext/source/flprefix.h
@@ -237,7 +237,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#if FLEXT_OS == FLEXT_OS_MAC
#define FLEXT_OSAPI FLEXT_OSAPI_MAC_MACH
#elif FLEXT_OS == FLEXT_OS_WIN
- #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX
+ #if defined(__MINGW32__)
+ #define FLEXT_OSAPI FLEXT_OSAPI_WIN_NATIVE
+ #else
+ #define FLEXT_OSAPI FLEXT_OSAPI_WIN_POSIX
+ #endif
#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX
#define FLEXT_OSAPI FLEXT_OSAPI_UNIX_POSIX
#else
@@ -249,7 +253,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// Apple MPW MrCpp
#if __MRC__ < 0x500
- #error Apple MPW MrCpp v.5.0.0 or better compiler required
+ #error Apple MPW MrCpp v.5.0.0 or later compiler required
#endif
#ifndef FLEXT_CPU
diff --git a/externals/grill/pool/pool.vcproj b/externals/grill/pool/pool.vcproj
index 59b8bd60..494c67c2 100644
--- a/externals/grill/pool/pool.vcproj
+++ b/externals/grill/pool/pool.vcproj
@@ -36,6 +36,7 @@
ProgramDataBaseFileName=".\pd-msvc/r/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
+ DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
diff --git a/externals/grill/pool/source/pool.cpp b/externals/grill/pool/source/pool.cpp
index 4d6d100e..dcb16237 100644
--- a/externals/grill/pool/source/pool.cpp
+++ b/externals/grill/pool/source/pool.cpp
@@ -878,6 +878,19 @@ BL pooldir::SvDirXML(ostream &os,I depth,const AtomList &dir,I ind)
return true;
}
+unsigned int pooldir::FoldBits(unsigned long h,int bits)
+{
+ if(!bits) return 0;
+ const int hmax = (1<<bits)-1;
+ unsigned int ret = 0;
+ for(unsigned int i = 0; i < sizeof(h)*8; i += bits)
+ ret ^= (h>>i)&hmax;
+ return ret;
+}
-
-
+int pooldir::Int2Bits(unsigned long n)
+{
+ int b;
+ for(b = 0; n; ++b) n >>= 1;
+ return b;
+}
diff --git a/externals/grill/pool/source/pool.h b/externals/grill/pool/source/pool.h
index 99e271b3..1874d334 100644
--- a/externals/grill/pool/source/pool.h
+++ b/externals/grill/pool/source/pool.h
@@ -103,6 +103,9 @@ protected:
pooldir *parent;
const I vbits,dbits,vsize,dsize;
+ static unsigned int FoldBits(unsigned long h,int bits);
+ static int Int2Bits(unsigned long n);
+
struct valentry { int cnt; poolval *v; };
struct direntry { int cnt; pooldir *d; };
diff --git a/externals/grill/xsample/build-pd-mingw.bat b/externals/grill/xsample/build-pd-mingw.bat
new file mode 100644
index 00000000..fa8919a5
--- /dev/null
+++ b/externals/grill/xsample/build-pd-mingw.bat
@@ -0,0 +1,3 @@
+mingw32-make -f makefile.pd-mingw
+mingw32-make -f makefile.pd-mingw install
+mingw32-make -f makefile.pd-mingw install-help
diff --git a/externals/grill/xsample/config-pd-cygwin.txt b/externals/grill/xsample/config-pd-cygwin.txt
index da08bf2e..001c9cdc 100644
--- a/externals/grill/xsample/config-pd-cygwin.txt
+++ b/externals/grill/xsample/config-pd-cygwin.txt
@@ -1,5 +1,5 @@
# xsample - extended sample objects for Max/MSP and pd (pure data)
-# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
#
# your c++ compiler (define only if it's different than g++)
@@ -29,5 +29,8 @@ HELPDIR=${PD}/doc/5.reference
# additional compiler flags
# (check whether they fit to your system!)
-UFLAGS=-mcpu=pentium3 -msse -mfpmath=sse # gcc 3.2
+UFLAGS=-mcpu=pentium4 -msse -mfpmath=sse # gcc 3.2
# UFLAGS=-mcpu=pentiumpro # gcc 2.95
+
+# define to build with shared flext library
+#FLEXT_SHARED=1
diff --git a/externals/grill/xsample/config-pd-mingw.txt b/externals/grill/xsample/config-pd-mingw.txt
new file mode 100644
index 00000000..4879d338
--- /dev/null
+++ b/externals/grill/xsample/config-pd-mingw.txt
@@ -0,0 +1,36 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
+#
+
+# your c++ compiler (define only if it's different than g++)
+# CXX=g++
+
+# where does the PD installation reside?
+PD=c:/programme/audio/pd
+
+# where are the PD header files?
+# leave it blank if it is a system directory (like /usr/local/include),
+# since gcc 3.2 complains about it
+PDINC=${PD}/src
+
+# where do the flext libraries reside?
+FLEXTPATH=${PD}/flext
+
+# where should xsample objects be built?
+TARGDIR=./pd-mingw
+
+# where should xsample be installed?
+# (leave blank to omit installation)
+INSTDIR=${PD}/extra
+
+# where should the xsample help be installed?
+# (leave blank to omit installation)
+HELPDIR=${PD}/doc/5.reference
+
+# additional compiler flags
+# (check whether they fit to your system!)
+UFLAGS=-mcpu=pentium4 -msse -mfpmath=sse # gcc 3.2
+# UFLAGS=-mcpu=pentiumpro # gcc 2.95
+
+# define to build with shared flext library
+# FLEXT_SHARED=1 \ No newline at end of file
diff --git a/externals/grill/xsample/makefile.pd-cygwin b/externals/grill/xsample/makefile.pd-cygwin
index 538a9f63..077d4ce4 100644
--- a/externals/grill/xsample/makefile.pd-cygwin
+++ b/externals/grill/xsample/makefile.pd-cygwin
@@ -1,5 +1,5 @@
# xsample - extended sample objects for Max/MSP and pd (pure data)
-# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
#
# Makefile for gcc @ cygwin
#
@@ -9,17 +9,32 @@
#
CONFIG=config-pd-cygwin.txt
+MAKEFILE=makefile.pd-cygwin
include ${CONFIG}
-FLEXTLIB=$(FLEXTPATH)/flext-pdwin.lib
-PDLIBS=$(PD)/bin/pd.dll $(PD)/bin/pthreadVC.dll
# compiler stuff
-INCLUDES=$(PDINC) # /usr/include
+# /usr/include holds the cygwin pthread headers and must be first!
+INCLUDES=/usr/include $(PDINC)
+
FLAGS=-DFLEXT_SYS=2
-CFLAGS=${UFLAGS} -O6 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions
-LIBS=m
+CFLAGS=-O2 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions ${UFLAGS}
+
+PDLIBS=$(PD)/bin/pd.dll $(PD)/bin/pthreadVC.dll
+
+
+ifdef FLEXT_SHARED
+
+CFLAGS+=-DFLEXT_SHARED
+FLEXTLIB=$(FLEXTPATH)/flext.dll
+
+else
+
+FLEXTLIB=$(FLEXTPATH)/flext-pdwin.lib
+
+endif
+
# ----------------------------------------------
# the rest can stay untouched
@@ -29,7 +44,6 @@ NAME=xsample
include make-files.txt
-MAKEFILE=makefile.pd-cygwin
TARGET=$(TARGDIR)/$(NAME).dll
# default target
@@ -45,7 +59,7 @@ $(TARGDIR)/%.o : $(SRCDIR)/%.cpp
$(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB)
- $(CXX) $(LDFLAGS) -shared $^ ${PDLIBS} $(patsubst %,-l%,$(LIBS)) -o $@
+ $(CXX) -shared $(LDFLAGS) $^ ${PDLIBS} $(patsubst %,-l%,$(LIBS)) -o $@
strip --strip-unneeded $@
chmod 755 $@
diff --git a/externals/grill/xsample/makefile.pd-mingw b/externals/grill/xsample/makefile.pd-mingw
new file mode 100644
index 00000000..21652652
--- /dev/null
+++ b/externals/grill/xsample/makefile.pd-mingw
@@ -0,0 +1,86 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2004 Thomas Grill (xovo@gmx.net)
+#
+# Makefile for gcc @ minGW
+#
+# usage:
+# to build run "make -f makefile.pd-mingw"
+# to install (as root), do "make -f makefile.pd-mingw install"
+#
+
+CONFIG=config-pd-mingw.txt
+MAKEFILE=makefile.pd-mingw
+
+include ${CONFIG}
+
+
+# compiler stuff
+INCLUDES=$(PDINC)
+
+FLAGS=-DFLEXT_SYS=2
+CFLAGS=-O2 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions ${UFLAGS}
+
+PDLIBS=$(PD)/bin/pd.dll $(PD)/bin/pthreadVC.dll
+
+
+ifdef FLEXT_SHARED
+
+CFLAGS+=-DFLEXT_SHARED
+FLEXTLIB=$(FLEXTPATH)/flext.dll
+
+else
+
+FLEXTLIB=$(FLEXTPATH)/flext-pdwin.lib
+
+endif
+
+
+# ----------------------------------------------
+# the rest can stay untouched
+# ----------------------------------------------
+
+NAME=xsample
+
+include make-files.txt
+
+TARGET=$(TARGDIR)/$(NAME).dll
+
+# default target
+all: $(TARGDIR) $(TARGET)
+
+$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG)
+# echo touch $(patsubst %,$(SRCDIR)/%,$(SRCS)) # minGW has no touch
+
+$(TARGDIR):
+ -mkdir $(TARGDIR)
+
+$(TARGDIR)/%.o : $(SRCDIR)/%.cpp
+ $(CXX) -c $(CFLAGS) $(FLAGS) $(patsubst %,-I%,$(INCLUDES) $(FLEXTPATH)) $< -o $@
+
+$(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(FLEXTLIB)
+ $(CXX) -shared $(LDFLAGS) $^ ${PDLIBS} $(patsubst %,-l%,$(LIBS)) -o $@
+ strip --strip-unneeded $@
+ chmod 755 $@
+
+$(INSTDIR):
+ -mkdir $(INSTDIR)
+
+install:: $(INSTDIR)
+
+install:: $(TARGET)
+ cp $^ $(INSTDIR)
+# chown root.root $(patsubst %,$(INSTDIR)/%,$(notdir $^))
+
+$(HELPDIR):
+ -mkdir $(HELPDIR)
+
+install-help:: $(HELPDIR)
+
+install-help:: ./pd
+ chmod 644 $^/*.*
+ cp $^/*.* $(HELPDIR)
+
+
+.PHONY: clean
+clean:
+ rm -f $(TARGDIR)/*.o $(TARGET)