From d5f3af34344340c718d07c9c84d562785443747e Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 23 Feb 2004 03:32:54 +0000 Subject: "" svn path=/trunk/; revision=1350 --- externals/grill/xsample/build-pd-mingw.bat | 3 + externals/grill/xsample/config-pd-cygwin.txt | 7 ++- externals/grill/xsample/config-pd-mingw.txt | 36 ++++++++++++ externals/grill/xsample/makefile.pd-cygwin | 30 +++++++--- externals/grill/xsample/makefile.pd-mingw | 86 ++++++++++++++++++++++++++++ 5 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 externals/grill/xsample/build-pd-mingw.bat create mode 100644 externals/grill/xsample/config-pd-mingw.txt create mode 100644 externals/grill/xsample/makefile.pd-mingw (limited to 'externals/grill/xsample') 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) -- cgit v1.2.1