Commit eced1303 authored by Jonathan Wilkes's avatar Jonathan Wilkes

keep midr-mjpeg.mov in pd/doc/media, but remove all the copies of external...

keep midr-mjpeg.mov in pd/doc/media, but remove all the copies of external media files. There aren't any references to those copied files in any of the docs, so they are useless. This means the root "doc" directory is now gone.
parent 6f822aef
#==============================================================================#
#
# Centralized build system for "doc".
#
# see for instructions: http://puredata.org/docs/developer/build
# <hans@at.or.at>
#
#==============================================================================#
CWD := $(shell pwd)
# these are designed to be overridden by the packages/Makefile
cvs_root_dir := $(shell cd $(CWD)/.. && pwd)
DESTDIR = $(CWD)/build/
BUILDLAYOUT_DIR = $(cvs_root_dir)/packages
CURL := curl --connect-timeout 600 --max-time 3600
# default target
all:
@echo "this currently does nothing"
include $(BUILDLAYOUT_DIR)/Makefile.buildlayout
#==============================================================================#
#
# OVERARCHING BUILD TARGETS
#
#==============================================================================#
DOC_TARGETS = media
# clean up after everything is installed
final_setup:
chmod -R ugo-w $(pddocdir)
install: $(objectsdir) $(helpdir) $(manualsdir) $(examplesdir) \
$(patsubst %, %_install,$(DOC_TARGETS))
@echo " "
@echo "doc install succeeded!"
#==============================================================================#
#
# PROJECT-SPECIFIC TARGETS
#
#==============================================================================#
#------------------------------------------------------------------------------#
# TEMPLATE
TEMPLATE_NAME = template
template_install: $(manualsdir)
install -d $(helpdir)$(manualsdir)/$(TEMPLATE_NAME)
install -p $(doc_src)/template/*.* \
$(helpdir)$(manualsdir)/$(TEMPLATE_NAME)
template_clean:
-rm -f -- $(helpdir)$(manualsdir)/$(TEMPLATE_NAME)/*.*
-rmdir -- $(helpdir)$(manualsdir)/$(TEMPLATE_NAME)
#------------------------------------------------------------------------------#
# MEDIA
MEDIA_NAME = media
media_install: $(pddocdir)
install -d $(DESTDIR)$(pddocdir)/$(MEDIA_NAME)
install -p $(doc_src)/media/*.* \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)
# ln is cp on MinGW, so these won't work since the target files don't exist at
# the time that the media_install target is generally run. For MinGW, this is
# instead handled in packages/win32_inno/pd-inno.iss.in
ifneq (MINGW,$(findstring MINGW,$(UNAME)))
# random sound files
ln -sf ../../doc/sound/bell.aiff \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/bell.aiff
ln -sf ../../doc/sound/voice.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/voice.wav
ln -sf ../../doc/sound/voice2.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/voice2.wav
ln -sf ../../extra/bsaylor/examples/noiseburst.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/noiseburst.wav
ln -sf ../../extra/ekext/examples/stink.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/stink.wav
ln -sf ../../extra/ekext/examples/beauty.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/beauty.wav
ln -sf ../../extra/ekext/examples/drummach.wav \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/drummach.wav
# Gem videos
ln -sf ../../extra/Gem/examples/data/alea.mpg \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/alea.mpg
ln -sf ../../extra/Gem/examples/data/homer.avi \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/homer.avi
ln -sf ../../extra/Gem/examples/data/anim-1.mov \
$(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/anim-1.mov
endif
media_clean:
-rm -f -- $(DESTDIR)$(pddocdir)/$(MEDIA_NAME)/*.*
-rmdir -- $(DESTDIR)$(pddocdir)/$(MEDIA_NAME)
#==============================================================================#
#
# CLEAN TARGETS
#
#==============================================================================#
# the destination-specific clean targets are in Makefile.buildlayout
clean: $(patsubst %, %_clean,$(DOC_TARGETS))
distclean: clean cruft_clean
test_locations:
@echo "PD_VERSION: $(PD_VERSION)"
@echo "PACKAGE_VERSION: $(PACKAGE_VERSION)"
@echo "CWD $(CWD)"
@echo "DESTDIR $(DESTDIR)"
@echo "PREFIX $(prefix)"
@echo "BINDIR $(bindir)"
@echo "LIBDIR $(libdir)"
@echo "OBJECTSDIR $(objectsdir)"
@echo "PDDOCDIR $(pddocdir)"
@echo "LIBPDDIR $(libpddir)"
@echo "LIBPDBINDIR $(libpdbindir)"
@echo "HELPDIR $(helpdir)"
@echo "MANUALSDIR $(manualsdir)"
@echo "EXAMPLESDIR $(examplesdir)"
- add externals HOWTO to manuals/Pd
- create Makefile for Pd-extended build system
- add pd-fileformat doc: http://student-kmt.hku.nl/%7Etjeerd/pd/pd_fileformat.html
- replace [pddp] with "pddp" in all help files so that it doesn't cause bugs
with the pddp/pddp.pd meta file, and other things in the future. Here's a
pattern: sed -n 's|obj \([0-9]*\) \([0-9]*\) pddp;|msg \1 \2 pddp;|p' *.pd
- add doc/pddp/about, help, etc. to doc/Makefile
- mv doc/pddp/pddp.pd to doc/pddp/about/pddp-about.pd
- add [symbol 1( and [1 ( test messages to the bottom right example in
[pd some odd cases of list handling] in
doc/pddp/all_about_lists_vs_anythings.pd
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
HOWTO_EN=HOWTO-externals-en
HOWTO_DE=HOWTO-externals-de
HOWTO_EXAMPLES=example1 example2 example3 example4
HTMLDIR_EN=HOWTO
HTMLDIR_DE=HOWTO-de
LATEX=latex
DVIPS=dvips
DVIPDF=dvipdf
LATEX2HTML=latex2html
default: en_pdf
TARGETS: default \
en_ps en_pdf en_html de_ps de_pdf de_html ps pdf html \
clean cleaner distclean \
examples $(HOWTO_EXAMPLES)
.PHONY: $(TARGETS)
en_ps: $(HOWTO_EN).ps
en_pdf: $(HOWTO_EN).pdf
en_html:
mkdir -p ${HTMLDIR_EN}
$(LATEX2HTML) -dir $(HTMLDIR_EN) -split 4 $(HOWTO_EN).tex
de_ps: $(HOWTO_DE).ps
de_pdf: $(HOWTO_DE).pdf
de_html:
mkdir -p ${HTMLDIR_DE}
$(LATEX2HTML) -dir $(HTMLDIR_DE) -split 4 $(HOWTO_DE).tex
ps: en_ps de_ps
pdf: en_pdf de_pdf
html: en_html de_html
clean:
-rm -f *.aux *.log *.toc *.dvi *~
cleaner: clean
-rm -f *.ps *.pdf
-rm -rf $(HTMLDIR_EN) $(HTMLDIR_DE)
distclean: cleaner
@for d in ${HOWTO_EXAMPLES}; do ${MAKE} -C $$d clean; done
%.dvi:
$(LATEX) $*.tex
$(LATEX) $*.tex
%.ps: %.dvi
$(DVIPS) $*.dvi
%.pdf: %.dvi
$(DVIPDF) $*.dvi
examples: $(HOWTO_EXAMPLES)
echo made examples
$(HOWTO_EXAMPLES):
$(MAKE) -C $@
# Makefile
# (c) 2006 IOhannes m zmlnig
# path to pd
## change this according to your setup!
PDROOT=../../../../pd
#PDROOT=/home/zmoelnig/src/pd/
# here we find the sources of pd (and evtl. the pd.lib)
PDSRCDIR=$(PDROOT)/src
PDLIBDIR=$(PDROOT)/bin
# this is the filename-extension
# people have to specify it at the cmdline: eg "make pd_linux"
EXTENSION=$(MAKECMDGOALS)
# if no filename-extension is supplied by the user
# try to guess one, based on what "uname" tells us
UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
DEFAULTEXTENSION= pd_linux
else
ifeq ($(UNAME),Darwin)
DEFAULTEXTENSION= pd_darwin
else
ifeq (MINGW,$(findstring MINGW,$(UNAME)))
DEFAULTEXTENSION= pd_nt
else
ifeq ($(UNAME),IRIX)
UNAMEV := $(shell uname -R)
ifeq (6.,$(findstring 6.,$(UNAMEV)))
DEFAULTEXTENSION= pd_irix6
else
DEFAULTEXTENSION= pd_irix5
endif
else
DEFAULTEXTENSION=help
endif
endif
endif
endif
# if no extension is given, call "make" again with a guessed extension
auto:
make $(DEFAULTEXTENSION)
# just a stupid fallback
help:
@echo "choose one command: make pd_linux (linux), make pd_darwin (osX), make pd_irix5 (IRIX5), make pd_irix6 (IRIX6), make dll (MSVC), make pd_nt (MinWG)"
# delete old build files
clean:
-rm -f *.dll *.pd_* *.o *.obj *~
# we want to compile all C-files we find in the current directory
SOURCES=$(sort $(filter %.c, $(wildcard *.c)))
# each C-files maps will become an external with the given filename-extension
TARGETS=$(SOURCES:.c=.$(EXTENSION))
# ----------------------- Linux -----------------------
pd_linux: $(TARGETS)
LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \
-Wall -W -Wshadow -Wstrict-prototypes -Werror \
-Wno-unused -Wno-parentheses -Wno-switch
LINUXLDFLAGS = -export_dynamic -shared -lc -lm
LINUXINCLUDE = -I$(PDSRCDIR)
%.pd_linux: %.c
$(CC) $(LINUXLDFLAGS) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.pd_linux $*.c
strip --strip-unneeded $*.pd_linux
# ----------------------- Mac OSX -----------------------
pd_darwin: $(TARGETS)
DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
DARWININCLUDE = -I$(PDSRCDIR)
DARWINLDFLAGS = -bundle -undefined suppress -flat_namespace
%.pd_darwin: %.c
$(CC) $(DARWINCFLAGS) $(DARWININCLUDE) $(DARWINLDFLAGS) -o $*.pd_darwin $*.c
# ----------------------- IRIX 5.x -----------------------
pd_irix5: $(TARGETS)
SGICFLAGS5 = -o32 -DPD -DSGI -O2
SGIINCLUDE = -I$(PDSRCDIR)
SGILDFLAGS = -elf -shared -rdata_shared
%.pd_irix5: %.c
$(CC) $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c
$(LD) $(SGILDFLAGS) -o $*.pd_irix5 $*.o
rm $*.o
# ----------------------- IRIX 6.x -----------------------
pd_irix6: $(TARGETS)
SGICFLAGS6 = -DPD -DSGI -n32 \
-OPT:roundoff=3 -OPT:IEEE_arithmetic=3 -OPT:cray_ivdep=true \
-Ofast=ip32
%.pd_irix6: %.c
$(CC) $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c
$(LD) $(SGILDFLAGS) -o $*.pd_irix6 $*.o
rm $*.o
# ----------------------- NT -----------------------
dll: $(TARGETS)
PDNTCFLAGS = /W3 /WX /DPD /DNT /D__WIN32__ /DMSW /nologo
VC="C:\Programme\Microsoft Visual Studio\Vc98"
PDNTINCLUDE = /I. /I$(PDROOT)\tcl\include /I$(PDSRCDIR)\src /I$(VC)\include
PDNTLDIR = $(VC)\lib
PDNTLIB = $(PDNTLDIR)\libc.lib \
$(PDNTLDIR)\oldnames.lib \
$(PDNTLDIR)\kernel32.lib \
$(PDLIBDIR)\pd.lib
%.dll: %.c
cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c
link /dll /export:$*_setup $*.obj $(PDNTLIB)
pd_nt: $(TARGETS)
MINGWCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \
-Wall -W -Wshadow -Wstrict-prototypes -Werror \
-Wno-unused -Wno-parentheses -Wno-switch -mms-bitfields
MINGWLDFLAGS = -export_dynamic -shared -lm -lkernel32 -lcoldname -lcrtdll -lpd -L$(PDLIBDIR)
MINGWINCLUDE = -I$(PDSRCDIR)
%.pd_nt: %.c
$(CC) $(MINGWLDFLAGS) $(MINGWCFLAGS) $(MINGWINCLUDE) -o $*.dll $*.c
/*
* HOWTO write an External for Pure data
* (c) 2001-2006 IOhannes m zmölnig zmoelnig[AT]iem.at
*
* this is the source-code for the first example in the HOWTO
* it creates an object that prints "Hello world!" whenever it
* gets banged.
*
* for legal issues please see the file LICENSE.txt
*/
/**
* include the interface to Pd
*/
#include "m_pd.h"
/**
* define a new "class"
*/
static t_class *helloworld_class;
/**
* this is the dataspace of our new object
* we don't need to store anything,
* however the first (and only) entry in this struct
* is mandatory and of type "t_object"
*/
typedef struct _helloworld {
t_object x_obj;
} t_helloworld;
/**
* this method is called whenever a "bang" is sent to the object
* the name of this function is arbitrary and is registered to Pd in the
* helloworld_setup() routine
*/
void helloworld_bang(t_helloworld *x)
{
/*
* post() is Pd's version of printf()
* the string (which can be formatted like with printf()) will be
* output to wherever Pd thinks it has too (pd's console, the stderr...)
* it automatically adds a newline at the end of the string
*/
post("Hello world !!");
}
/**
* this is the "constructor" of the class
* this method is called whenever a new object of this class is created
* the name of this function is arbitrary and is registered to Pd in the
* helloworld_setup() routine
*/
void *helloworld_new(void)
{
/*
* call the "constructor" of the parent-class
* this will reserve enough memory to hold "t_helloworld"
*/
t_helloworld *x = (t_helloworld *)pd_new(helloworld_class);
/*
* return the pointer to the class - this is mandatory
* if you return "0", then the object-creation will fail
*/
return (void *)x;
}
/**
* define the function-space of the class
* within a single-object external the name of this function is special
*/
void helloworld_setup(void) {
/* create a new class */
helloworld_class = class_new(gensym("helloworld"), /* the object's name is "helloworld" */
(t_newmethod)helloworld_new, /* the object's constructor is "helloworld_new()" */
0, /* no special destructor */
sizeof(t_helloworld), /* the size of the data-space */
CLASS_DEFAULT, /* a normal pd object */
0); /* no creation arguments */
/* attach functions to messages */
/* here we bind the "helloworld_bang()" function to the class "helloworld_class()" -
* it will be called whenever a bang is received
*/
class_addbang(helloworld_class, helloworld_bang);
}
# Makefile
# (c) 2006 IOhannes m zmlnig
# just use the Makefile in ../example1/
# (so i only have to maintain one Makefile)
include ../example1/Makefile
/*
* HOWTO write an External for Pure data
* (c) 2001-2006 IOhannes m zmölnig zmoelnig[AT]iem.at
*
* this is the source-code for the second example in the HOWTO
* it creates an object that increments and outputs a counter
* whenever it gets banged.
*
* for legal issues please see the file LICENSE.txt
*/
/**
* include the interface to Pd
*/
#include "m_pd.h"
/**
* define a new "class"
*/
static t_class *counter_class;
/**
* this is the dataspace of our new object
* the first (mandatory) "t_object"
* and a variable that holds the current counter value
*/
typedef struct _counter {
t_object x_obj;
t_int i_count;
} t_counter;
/**
* this method is called whenever a "bang" is sent to the object
* a reference to the class-dataspace is given as argument
* this enables us to do something with the data (e.g. increment the counter)
*/
void counter_bang(t_counter *x)
{
/*
* convert the current counter value to floating-point to output it later
*/
t_float f=x->i_count;
/* increment the counter */
x->i_count++;
/* send the old counter-value to the 1st outlet of the object */
outlet_float(x->x_obj.ob_outlet, f);
}
/**
* this is the "constructor" of the class
* we have one argument of type floating-point (as specified below in the counter_setup() routine)
*/
void *counter_new(t_floatarg f)
{
t_counter *x = (t_counter *)pd_new(counter_class);
/* set the counter value to the given argument */
x->i_count=f;
/* create a new outlet for floating-point values */
outlet_new(&x->x_obj, &s_float);
return (void *)x;
}
/**
* define the function-space of the class
*/
void counter_setup(void) {
counter_class = class_new(gensym("counter"),
(t_newmethod)counter_new,
0,
sizeof(t_counter),
CLASS_DEFAULT,
A_DEFFLOAT, 0); /* the object takes one argument which is a floating-point and defaults to 0 */
/* call a function when object gets banged */
class_addbang(counter_class, counter_bang);
}
# Makefile
# (c) 2006 IOhannes m zmlnig
# just use the Makefile in ../example1/
# (so i only have to maintain one Makefile)
include ../example1/Makefile
/*
* HOWTO write an External for Pure data
* (c) 2001-2006 IOhannes m zmölnig zmoelnig[AT]iem.at
*
* this is the source-code for the third example in the HOWTO
* it creates an object that increments and outputs a counter
* whenever it gets banged.
* the counter value can be "set" to a special value, or "reset" to a default
* an upper and lower boundary can be specified: whenever the counter crosses
* such boundary a "bang" is emitted at the 2nd outlet and the counter value wraps
*
* for legal issues please see the file LICENSE.txt
*/
/**
* include the interface to Pd
*/
#include "m_pd.h"
/**
* define a new "class"
*/
static t_class *counter_class;
/**
* this is the dataspace of our new object
* the first element is the mandatory "t_object"
* then we have all sort of variables for the
* actual counter value, the step-size and the counting boundaries
* finally we have 2 "t_outlet" elements so we can send data
* to a "named" outlet.
*/
typedef struct _counter {
t_object x_obj; /* mandatory t_object */
t_int i_count; /* the current counter value */
t_float step; /* step size;
* this is "float" because of the passive inlet we are using */
t_int i_down, i_up; /* lower and upper boundary */
t_outlet *f_out, *b_out; /* outlets */
} t_counter;
/**
* this method is called whenever a "bang" is sent to the object
*/
void counter_bang(t_counter *x)
{
t_float f=x->i_count;
t_int step = x->step;
x->i_count+=step;
if (x->i_down-x->i_up) {
if ((step>0) && (x->i_count > x->i_up)) {
x->i_count = x->i_down;
/* we crossed the upper boundary, so we send a bang out of
* the 2nd outlet (which is x->b_out)
*/
outlet_bang(x->b_out);
} else if (x->i_count < x->i_down) {
x->i_count = x->i_up;
outlet_bang(x->b_out);
}
}
/* output the current counter value at the 1st outlet (which is x->f_out) */
outlet_float(x->f_out, f);
}
/**
* this is called whenever a "reset" message is sent to the inlet of the object
* since the "reset" message has no arguments (as declared in counter_setup())
* we only get a reference to the class-dataspace
*/
void counter_reset(t_counter *x)
{
x->i_count = x->i_down;
}
/**
* this is called whenever a "set" message is sent to the inlet of the object
* since the "set" message has one floating-point argument (as declared in counter_setup())
* we get a reference to the class-dataspace and the value
*/
void counter_set(t_counter *x, t_floatarg f)
{
x->i_count = f;
}
/**
* this is called whenever a "bound" message is sent to the inlet of the object
* note that in counter_new(), we rewrite a list to the 2nd inlet
* to a "bound" message to the 1st inlet
*/
void counter_bound(t_counter *x, t_floatarg f1, t_floatarg f2)
{
x->i_down = (f1<f2)?f1:f2;
x->i_up = (f1>f2)?f1:f2;
}
/**
* this is the "constructor" of the class
* we expect a variable number of arguments to this object
* symbol "s" is the name of the object itself
* the arguments are given as a t_atom array of argc elements.
*/
void *counter_new(t_symbol *s, int argc, t_atom *argv)
{
t_counter *x = (t_counter *)pd_new(counter_class);
t_float f1=0, f2=0;
/* depending on the number of arguments we interprete them differently */
x->step=1;
switch(argc){
default:
case 3:
x->step=atom_getfloat(argv+2);
case 2:
f2=atom_getfloat(argv+1);
case 1:
f1=atom_getfloat(argv);
break;
case 0:
break;
}
if (argc<2)f2=f1;
x->i_down = (f1<f2)?f1:f2;
x->i_up = (f1>f2)?f1:f2;
x->i_count=x->i_down;
/* create a new active inlet for this object
* a message with the selector "list" that is sent
* to this inlet (it is the 2nd inlet from left),
* will be appear to be the same message but with the selector "bound"
* at the 1st inlet.
* the method for "bound" messages is given in counter_setup()
*/
inlet_new(&x->x_obj, &x->x_obj.ob_pd,
gensym("list"), gensym("bound"));
/* create a passive inlet inlet (it will be the 2rd inlet from left)
* whenever a floating point number is sent to this inlet,
* its value will be immediately stored in "x->step"
* no function will be called
*/
floatinlet_new(