aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2003-04-14 10:04:47 +0000
committerThomas Grill <xovo@users.sourceforge.net>2003-04-14 10:04:47 +0000
commitc58149336328a7c05d9c713368d30ea30ec0ac1b (patch)
tree6eec8fc93c6568040ab8d0a43ca4f5bc9b252d72
parent1a5eb47494cc7a1cd1ae3111c54cff7f1d9168fe (diff)
""
svn path=/trunk/; revision=560
-rw-r--r--externals/grill/xsample/build-pd-bcc.bat3
-rw-r--r--externals/grill/xsample/build-pd-cygwin.sh15
-rw-r--r--externals/grill/xsample/build-pd-msvc.bat4
-rw-r--r--externals/grill/xsample/config-pd-bcc.txt21
-rw-r--r--externals/grill/xsample/config-pd-cygwin.txt33
-rw-r--r--externals/grill/xsample/config-pd-msvc.txt19
-rwxr-xr-xexternals/grill/xsample/make-files.txt9
-rw-r--r--externals/grill/xsample/makefile.pd-bcc73
-rw-r--r--externals/grill/xsample/makefile.pd-cygwin73
-rwxr-xr-xexternals/grill/xsample/makefile.pd-darwin1
-rw-r--r--externals/grill/xsample/makefile.pd-linux1
-rw-r--r--externals/grill/xsample/makefile.pd-msvc54
-rw-r--r--externals/grill/xsample/readme.txt13
13 files changed, 311 insertions, 8 deletions
diff --git a/externals/grill/xsample/build-pd-bcc.bat b/externals/grill/xsample/build-pd-bcc.bat
new file mode 100644
index 00000000..3dd21329
--- /dev/null
+++ b/externals/grill/xsample/build-pd-bcc.bat
@@ -0,0 +1,3 @@
+@echo --- Building with BorlandC++ ---
+
+make -f makefile.pd-bcc
diff --git a/externals/grill/xsample/build-pd-cygwin.sh b/externals/grill/xsample/build-pd-cygwin.sh
new file mode 100644
index 00000000..94778444
--- /dev/null
+++ b/externals/grill/xsample/build-pd-cygwin.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+SYS=pd-cygwin
+
+. config-${SYS}.txt
+
+make -f makefile.${SYS} &&
+{
+ if [ $INSTDIR != "" ]; then
+ make -f makefile.${SYS} install
+ fi
+ if [ $HELPDIR != "" ]; then
+ make -f makefile.${SYS} install-help
+ fi
+}
diff --git a/externals/grill/xsample/build-pd-msvc.bat b/externals/grill/xsample/build-pd-msvc.bat
new file mode 100644
index 00000000..d6187f08
--- /dev/null
+++ b/externals/grill/xsample/build-pd-msvc.bat
@@ -0,0 +1,4 @@
+@echo --- Building with MS Visual C++ ---
+
+nmake -f makefile.pd-msvc clean
+nmake -f makefile.pd-msvc
diff --git a/externals/grill/xsample/config-pd-bcc.txt b/externals/grill/xsample/config-pd-bcc.txt
new file mode 100644
index 00000000..bd3972df
--- /dev/null
+++ b/externals/grill/xsample/config-pd-bcc.txt
@@ -0,0 +1,21 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+
+# where is PD?
+PDPATH=c:\programme\audio\pd
+
+# where do the flext libraries reside?
+FLEXTPATH=$(PDPATH)\flext
+
+# where is BorlandC++?
+BCCPATH=c:\programme\prog\bcc55
+
+# where should the external(s) be built?
+OUTPATH=.\pd-bcc
+
+# should the external be installed? (yes/no)
+INSTALL=yes
+
+# where should the external be installed?
+INSTDIR=$(PDPATH)\extra
diff --git a/externals/grill/xsample/config-pd-cygwin.txt b/externals/grill/xsample/config-pd-cygwin.txt
new file mode 100644
index 00000000..da08bf2e
--- /dev/null
+++ b/externals/grill/xsample/config-pd-cygwin.txt
@@ -0,0 +1,33 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 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=/cygdrive/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-cygwin
+
+# 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=pentium3 -msse -mfpmath=sse # gcc 3.2
+# UFLAGS=-mcpu=pentiumpro # gcc 2.95
diff --git a/externals/grill/xsample/config-pd-msvc.txt b/externals/grill/xsample/config-pd-msvc.txt
new file mode 100644
index 00000000..e69617a7
--- /dev/null
+++ b/externals/grill/xsample/config-pd-msvc.txt
@@ -0,0 +1,19 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+
+# where is PD?
+PDPATH=c:\programme\audio\pd
+
+# where do the flext libraries reside?
+FLEXTPATH=$(PDPATH)\flext
+
+# where is MS VC++?
+MSVCPATH=c:\programme\prog\microsoft visual studio\VC98
+
+# where should the external be built?
+OUTPATH=pd-msvc
+
+# where should the external be installed?
+# (leave blank to omit installation)
+INSTDIR=$(PDPATH)\extra
diff --git a/externals/grill/xsample/make-files.txt b/externals/grill/xsample/make-files.txt
index 1607b051..8e71de6e 100755
--- a/externals/grill/xsample/make-files.txt
+++ b/externals/grill/xsample/make-files.txt
@@ -1,7 +1,6 @@
# all the source files from the package
-SRCS= \
- main.cpp play.cpp groove.cpp record.cpp inter.cpp
-
-HDRS= \
- main.h inter.h
+SRCDIR=source
+SRCS=main.cpp play.cpp groove.cpp record.cpp inter.cpp
+
+HDRS=main.h inter.h
diff --git a/externals/grill/xsample/makefile.pd-bcc b/externals/grill/xsample/makefile.pd-bcc
new file mode 100644
index 00000000..0b959d11
--- /dev/null
+++ b/externals/grill/xsample/makefile.pd-bcc
@@ -0,0 +1,73 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+# Makefile for BorlandC++
+#
+# usage: make -f makefile.pd-bcc
+#
+# ---------------------------------------------
+
+!include config-pd-bcc.txt
+
+NAME=xsample
+SETUPFUNCTION=$(NAME)_setup
+
+# flext stuff
+TARGET=pdwin
+
+# includes, libs
+INCPATH=-I$(BCCPATH)\include -I$(PDPATH)\src -I$(FLEXTPATH)
+LIBPATH=-L$(BCCPATH)\lib -L$(PDPATH)\lib
+LIBS=cw32.lib import32.lib C0D32.OBJ
+
+# compiler definitions and flags
+DEFS=-DFLEXT_SYS=2
+CFLAGS=-6 -O2 -OS -ff -tWD
+
+
+# the rest can stay untouched
+# ----------------------------------------------
+
+# all the source files from the package
+!include make-files.txt
+
+# default target
+all: $(OUTPATH)\$(NAME).dll
+
+# remove build
+clean:
+ -del /s /q $(OUTPATH) > nul
+ rmdir $(OUTPATH)
+
+
+install:
+ cp $(OUTPATH)\$(NAME).dll $(INSTDIR)
+
+# ----------------------------------------------
+
+OBJS= $(SRCS:.cpp=.obj)
+
+#.PATH.OBJ=$(OUTPATH)
+
+#$(SRCS): $(HDRS)
+# -touch $<
+
+{$(SRCDIR)}.cpp.obj:
+ bcc32 -c $(CFLAGS) $(DEFS) $(INCPATH) -n$(OUTPATH) $<
+
+$(OUTPATH):
+ -@if not exist $< mkdir $<
+
+$(OUTPATH)\pd.lib: $(PDPATH)\bin\pd.dll
+ implib -a $< $**
+
+$(OUTPATH)\$(NAME).def:
+ @echo EXPORTS $(SETUPFUNCTION) = _$(SETUPFUNCTION) > $<
+
+$(OUTPATH)\$(NAME).dll :: $(OUTPATH) $(OUTPATH)\$(NAME).def $(OUTPATH)\pd.lib
+
+$(OUTPATH)\$(NAME).dll :: $(OBJS)
+ cd $(OUTPATH)
+ ilink32 -C -Tpd $(LIBPATH) $** ,..\$<,,$(LIBS) pd.lib $(FLEXTPATH)\flext-$(TARGET).lib ,$(NAME).def
+ cd ..
+ \ No newline at end of file
diff --git a/externals/grill/xsample/makefile.pd-cygwin b/externals/grill/xsample/makefile.pd-cygwin
new file mode 100644
index 00000000..538a9f63
--- /dev/null
+++ b/externals/grill/xsample/makefile.pd-cygwin
@@ -0,0 +1,73 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+# Makefile for gcc @ cygwin
+#
+# usage:
+# to build run "make -f makefile.pd-cygwin"
+# to install (as root), do "make -f makefile.pd-cygwin install"
+#
+
+CONFIG=config-pd-cygwin.txt
+
+include ${CONFIG}
+
+FLEXTLIB=$(FLEXTPATH)/flext-pdwin.lib
+PDLIBS=$(PD)/bin/pd.dll $(PD)/bin/pthreadVC.dll
+
+# compiler stuff
+INCLUDES=$(PDINC) # /usr/include
+FLAGS=-DFLEXT_SYS=2
+CFLAGS=${UFLAGS} -O6 -funroll-loops -fmove-all-movables -frerun-loop-opt -finline-functions -fno-rtti -fno-exceptions
+LIBS=m
+
+# ----------------------------------------------
+# the rest can stay untouched
+# ----------------------------------------------
+
+NAME=xsample
+
+include make-files.txt
+
+MAKEFILE=makefile.pd-cygwin
+TARGET=$(TARGDIR)/$(NAME).dll
+
+# default target
+all: $(TARGDIR) $(TARGET)
+
+$(patsubst %,$(SRCDIR)/%,$(SRCS)): $(patsubst %,$(SRCDIR)/%,$(HDRS)) $(MAKEFILE) $(CONFIG)
+ touch $(patsubst %,$(SRCDIR)/%,$(SRCS))
+
+$(TARGDIR):
+ -mkdir $(TARGDIR)
+
+$(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 $@
+ 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)
diff --git a/externals/grill/xsample/makefile.pd-darwin b/externals/grill/xsample/makefile.pd-darwin
index a7d378cb..c88a505b 100755
--- a/externals/grill/xsample/makefile.pd-darwin
+++ b/externals/grill/xsample/makefile.pd-darwin
@@ -28,7 +28,6 @@ FRAMEWORKS=Carbon
# ----------------------------------------------
NAME=xsample
-SRCDIR=source
include make-files.txt
diff --git a/externals/grill/xsample/makefile.pd-linux b/externals/grill/xsample/makefile.pd-linux
index c8742ea0..d5ba9016 100644
--- a/externals/grill/xsample/makefile.pd-linux
+++ b/externals/grill/xsample/makefile.pd-linux
@@ -25,7 +25,6 @@ LIBS=m
# ----------------------------------------------
NAME=xsample
-SRCDIR=source
include make-files.txt
diff --git a/externals/grill/xsample/makefile.pd-msvc b/externals/grill/xsample/makefile.pd-msvc
new file mode 100644
index 00000000..2f0ebc52
--- /dev/null
+++ b/externals/grill/xsample/makefile.pd-msvc
@@ -0,0 +1,54 @@
+# xsample - extended sample objects for Max/MSP and pd (pure data)
+# Copyright (c) 2001-2003 Thomas Grill (xovo@gmx.net)
+#
+# Makefile for MSVC++ 6
+#
+# usage:
+# to build run "make -f makefile.pd-msvc"
+#
+
+!include config-pd-msvc.txt
+
+# includes
+INCPATH=/I"$(MSVCPATH)\include" /I"$(PDPATH)\src" /I"$(FLEXTPATH)"
+LIBPATH=/LIBPATH:"$(MSVCPATH)\lib" /LIBPATH:"$(PDPATH)\bin" /LIBPATH:"$(FLEXTPATH)"
+LIBS=pd.lib pthreadVC.lib flext-pdwin.lib
+
+# compiler definitions and flags
+DEFS=/DFLEXT_SYS=2
+
+CFLAGS=/GR- /GX- /GD /G6 /Ox /ML
+
+# the rest can stay untouched
+# ----------------------------------------------
+
+NAME=xsample
+
+!include make-files.txt
+
+
+all: $(OUTPATH) $(OUTPATH)\$(NAME).dll
+
+# remove build
+clean:
+ -del /q $(OUTPATH) > nul
+ -rmdir $(OUTPATH) > nul
+
+OBJS= $(SRCS:.cpp=.obj)
+
+$(OUTPATH):
+ -mkdir $(OUTPATH) > nul
+
+{$(SRCDIR)}.cpp{}.obj:
+ cl /c /LD $(CFLAGS) $(DEFS) $(INCPATH) $** /Fo$(OUTPATH)\$@
+
+$(OUTPATH)\$(NAME).dll: $(OBJS)
+ cd $(OUTPATH)
+ link /DLL /out:$(NAME).dll /INCREMENTAL:NO $** $(LIBS) $(LIBPATH)
+ @-del *.exp
+ @-del *.lib
+ cd ..
+!ifdef INSTPATH
+ @-if not exist $(INSTPATH) mkdir $(INSTPATH)
+ copy $@ $(INSTPATH) > nul
+!endif
diff --git a/externals/grill/xsample/readme.txt b/externals/grill/xsample/readme.txt
index f884c80e..094a2966 100644
--- a/externals/grill/xsample/readme.txt
+++ b/externals/grill/xsample/readme.txt
@@ -34,13 +34,23 @@ Package files:
----------------------------------------------------------------------------
+BUILDING XSAMPLE
+----------------
+
The package should at least compile (and is tested) with the following compilers:
pd - Windows:
-------------
-o Microsoft Visual C++ 6: edit "xsample.dsp" project file
+o Microsoft Visual C++ 6 command line: edit "config-pd-msvc.txt" and run "build-pd-msvc.bat"
+
+o Microsoft Visual C++ 6 IDE: edit "xsample.dsp" project file
> due to a compiler bug the optimization using templates is not functional
+o BCC: edit "config-pd-bcc.txt" and run "build-pd-bcc.bat"
+
+o Cygwin GCC: edit "config-pd-cygwin.txt" and run "sh ./build-pd-cygwin.sh"
+> various versions of GCC die during compile with template optimization turned on
+
pd - linux:
-----------
o GCC: edit "config-pd-linux.txt" and run "sh ./build-pd-linux.sh"
@@ -91,6 +101,7 @@ Version history:
- fixed scale mode bug with xgroove~
- added validity check for buffers
- Max/MSP OSX: new file xsample-objectmappings.txt fixes load of library on finding correct helpfiles!
+- makefiles for command line MSVC++, BCC, cygwin GCC
0.2.4:
- according to flext 0.2.3 changed sample type to t_sample (S)