From 0d28c65db3a665bcc5045c8885a83ba83ae46f4a Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 17 Oct 2003 02:47:01 +0000 Subject: "" svn path=/trunk/; revision=1100 --- externals/grill/py/config-pd-linux.txt | 7 +++-- externals/grill/py/makefile.pd-linux | 24 +++++++++++++-- externals/grill/py/pd/simple-3.pd | 54 +++++++++++++++++----------------- externals/grill/py/pd/thread-1.pd | 42 +++++++++++++------------- externals/grill/py/py.vcproj | 8 ++--- externals/grill/py/source/pyext.cpp | 2 +- 6 files changed, 78 insertions(+), 59 deletions(-) (limited to 'externals/grill') diff --git a/externals/grill/py/config-pd-linux.txt b/externals/grill/py/config-pd-linux.txt index 339e5786..ffedf8e2 100644 --- a/externals/grill/py/config-pd-linux.txt +++ b/externals/grill/py/config-pd-linux.txt @@ -17,8 +17,9 @@ FLEXTPATH=/usr/local/lib/pd/flext PYTHONVER=2.3 # where are the python header files? PYTHONINCLUDE=/usr/local/include/python${PYTHONVER} -# where is the python library file? -PYTHONLIB=/usr/local/lib/python${PYTHONVER}/config +# where is the python library file? +# in most cases this need only be specified for static linking +# PYTHONLIB=/usr/local/lib/python${PYTHONVER}/config # where should flext libraries be built? TARGDIR=./pd-linux @@ -28,4 +29,4 @@ TARGDIR=./pd-linux INSTPATH=/usr/local/lib/pd/extra # define for shared build -#FLEXT_SHARED=1 +FLEXT_SHARED=1 diff --git a/externals/grill/py/makefile.pd-linux b/externals/grill/py/makefile.pd-linux index af9c999c..d77ea836 100644 --- a/externals/grill/py/makefile.pd-linux +++ b/externals/grill/py/makefile.pd-linux @@ -17,15 +17,26 @@ include $(CONFIG) # compiler+linker stuff INCLUDES=$(PDPATH) $(PYTHONINCLUDE) LIBPATH=$(PYTHONLIB) -FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS -CFLAGS=-O2 $(UFLAGS) +FLAGS=-DFLEXT_SYS=2 +CFLAGS=-pthread $(UFLAGS) LIBS=util python$(PYTHONVER) +ifdef DEBUG +CFLAGS+=-g -DFLEXT_DEBUG +else +CFLAGS+=-O2 +endif ifdef FLEXT_SHARED -CFLAGS+=-shared -DFLEXT_SHARED +CFLAGS+=-shared +FLAGS+=-DFLEXT_SHARED LIBPATH+=$(FLEXTPATH) + +ifdef DEBUG +LIBFLEXT=-lflext_d +else LIBFLEXT=-lflext +endif ifeq ($(CXX),icc) LDFLAGS+=-i_dynamic @@ -35,7 +46,12 @@ endif else +FLAGS+=-DFLEXT_THREADS +ifdef DEBUG +LIBFLEXT=$(FLEXTPATH)/libflext_td.a +else LIBFLEXT=$(FLEXTPATH)/libflext_t.a +endif endif @@ -65,7 +81,9 @@ $(TARGDIR)/%.o : $(SRCDIR)/%.cpp $(TARGET) : $(patsubst %.cpp,$(TARGDIR)/%.o,$(SRCS)) $(CXX) -shared $(LDFLAGS) -o $@ $^ $(patsubst %,-L%,$(LIBPATH)) $(LIBFLEXT) $(patsubst %,-l%,$(LIBS)) +ifndef DEBUG strip --strip-unneeded $@ +endif chmod 755 $@ $(INSTPATH): diff --git a/externals/grill/py/pd/simple-3.pd b/externals/grill/py/pd/simple-3.pd index 70416ad0..450a3ec9 100644 --- a/externals/grill/py/pd/simple-3.pd +++ b/externals/grill/py/pd/simple-3.pd @@ -1,27 +1,27 @@ -#N canvas 307 249 546 386 12; -#X msg 88 279 help; -#X text 15 50 This demonstrates message handling. See the simple.py -file.; -#X msg 87 304 doc; -#X msg 123 305 doc+; -#X floatatom 288 345 5 0 0; -#X text 17 22 py/pyext - Python script objects \, (C)2002 Thomas Grill -; -#X floatatom 316 119 5 0 0; -#X floatatom 399 119 5 0 0; -#X obj 225 279 pyext simple ex3 1; -#X msg 39 195 reload.; -#X msg 39 223 reload -10; -#X text 110 194 reload script and keep arguments; -#X text 128 224 reload script with new arguments; -#X text 281 140 triggers; -#X text 340 344 result; -#X text 410 140 sets argument; -#X connect 0 0 8 0; -#X connect 2 0 8 0; -#X connect 3 0 8 0; -#X connect 6 0 8 1; -#X connect 7 0 8 2; -#X connect 8 0 4 0; -#X connect 9 0 8 0; -#X connect 10 0 8 0; +#N canvas 384 270 546 386 12; +#X msg 88 279 help; +#X text 15 50 This demonstrates message handling. See the simple.py +file.; +#X msg 87 304 doc; +#X msg 123 305 doc+; +#X floatatom 288 345 5 0 0 0 - - -; +#X text 17 22 py/pyext - Python script objects \, (C)2002 Thomas Grill +; +#X floatatom 316 119 5 0 0 0 - - -; +#X floatatom 399 119 5 0 0 0 - - -; +#X obj 225 279 pyext simple ex3 1; +#X msg 39 195 reload.; +#X msg 39 223 reload -10; +#X text 110 194 reload script and keep arguments; +#X text 128 224 reload script with new arguments; +#X text 281 140 triggers; +#X text 340 344 result; +#X text 410 140 sets argument; +#X connect 0 0 8 0; +#X connect 2 0 8 0; +#X connect 3 0 8 0; +#X connect 6 0 8 1; +#X connect 7 0 8 2; +#X connect 8 0 4 0; +#X connect 9 0 8 0; +#X connect 10 0 8 0; diff --git a/externals/grill/py/pd/thread-1.pd b/externals/grill/py/pd/thread-1.pd index 5a9545e2..be775852 100644 --- a/externals/grill/py/pd/thread-1.pd +++ b/externals/grill/py/pd/thread-1.pd @@ -1,10 +1,8 @@ -#N canvas 440 61 588 400 12; +#N canvas 440 61 590 402 12; #X msg 38 265 help; #X msg 37 290 doc; #X msg 73 291 doc+; #X floatatom 145 323 5 0 0 0 - - -; -#X text 16 14 py/pyext - Python script objects \, (C)2002 Thomas Grill -; #X text 14 44 This demonstrates threading. See the threads.py file. ; #X obj 140 216 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 @@ -27,21 +25,23 @@ #X text 384 106 you can even stop it; #X obj 145 279 pyext threads ex1; #X text 93 101 - blocking!! -; -#X connect 0 0 21 0; -#X connect 1 0 21 0; -#X connect 2 0 21 0; -#X connect 6 0 7 0; -#X connect 7 0 21 0; -#X connect 9 0 12 0; -#X connect 10 0 11 0; -#X connect 11 0 21 1; -#X connect 11 1 21 2; -#X connect 11 2 14 0; -#X connect 12 0 21 1; -#X connect 12 1 21 2; -#X connect 12 2 13 0; -#X connect 13 0 6 0; -#X connect 14 0 6 0; -#X connect 19 0 21 0; -#X connect 21 0 3 0; -#X connect 21 1 8 0; +#X text 16 14 py/pyext - Python script objects \, (C)2002 \, 2003 Thomas +Grill; +#X connect 0 0 20 0; +#X connect 1 0 20 0; +#X connect 2 0 20 0; +#X connect 5 0 6 0; +#X connect 6 0 20 0; +#X connect 8 0 11 0; +#X connect 9 0 10 0; +#X connect 10 0 20 1; +#X connect 10 1 20 2; +#X connect 10 2 13 0; +#X connect 11 0 20 1; +#X connect 11 1 20 2; +#X connect 11 2 12 0; +#X connect 12 0 5 0; +#X connect 13 0 5 0; +#X connect 18 0 20 0; +#X connect 20 0 3 0; +#X connect 20 1 7 0; diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj index 2f841fc6..dad3f95d 100644 --- a/externals/grill/py/py.vcproj +++ b/externals/grill/py/py.vcproj @@ -42,7 +42,7 @@ OutputFile=".\pd-msvc\d/py.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="c:/programme/audio/pd/bin,..\flext\pd-msvc,f:\prog\packs\Python-2.2.1\PCbuild" + AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"..\flext\pd-msvc"" GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\pd-msvc\d/py.pdb" ImportLibrary=".\pd-msvc\d/py.lib" @@ -152,7 +152,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="c:\programme\audio\pd\src,f:\prog\max\flext\source,C:\Programme\prog\Python22\include" + AdditionalIncludeDirectories="c:\programme\audio\pd\src,f:\prog\max\flext\source,C:\Programme\prog\Python23\include" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;FLEXT_SYS=2;FLEXT_THREADS" StringPooling="TRUE" RuntimeLibrary="0" @@ -170,7 +170,7 @@ OutputFile="pd-msvc\py.dll" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="c:/programme/audio/pd/bin,..\flext\pd-msvc,C:\Programme\prog\Python22\libs" + AdditionalLibraryDirectories="c:/programme/audio/pd/bin;"..\flext\pd-msvc";C:\Programme\prog\Python23\libs" ProgramDatabaseFile=".\pd-msvc\tr/py.pdb" ImportLibrary=".\pd-msvc\tr/py.lib" TargetMachine="1"/> @@ -228,7 +228,7 @@ Name="VCCustomBuildTool"/> n,w->Header(),w->Count(),w->Atoms()); -// delete w; + delete w; } --thrcount; } -- cgit v1.2.1