[PD] PD markov object
c.m.bryan
chrismbryan at gmail.com
Tue Aug 1 13:58:44 CEST 2006
> > I'm needing some compilation help with the markov object I found here:
> >
> > http://icem-www.folkwang-hochschule.de/~finnendahl/pd.html (bottom of the
> > page)
> >
> > I'm using it on linux, but I can't get it to compile on win32.
>
> "Can't get it to compile" is not enough info to give us a chance to
> help. Please tell us a bit more about your problem.
Yes, my apologies. I'm using cygwin.
It seems that the makefile is tailored only to linux, and my goal is
to compile a .dll for windows. At first the compilation itself failed
with lots of "undefined reference to ..." that quickly scrolled off
the dos window (why can't they put a scrollbar on it?!).
I tried hacking the makefile, and now it compiles to the *.o files OK,
but the linking still failes with a similar multitude of "undefined
reference" errors, all things to do with pd, like "outlet_float," etc.
I've pasted the makefile below.
I understand that the problem is with includes and libraries, but I
haven't find a solution. Any clues (or a working makefile!) are
appreciated :)
-Chris
(makefile)
current: all
# This makefile is a ripoff of the zexy lib makefile
# by johannes m. zmoelnig (thanks, johannes :-)
# mahash/mapwrite/mapread makefile
# everything is GnuGPL that should come with the object
# make sure that the "m_pd.h" is somehow available either by putting
it into this
# directory, by adding it's path to the INCLUDE-path or by putting it into an
# already included path, e.g. "/usr/local/include/"
#these are the user adjustables : adjust them to fit into your system
# PD will install to $(DESTDIR)$(INSTALLL_PREFIX)$(PDLIBDIR), which is
/usr/local/lib/pd
# by default
DESTDIR =
INSTALL_PREFIX = /cygdrive/c/WINDOWS/Desktop/pd-0.38-4/pd-0.38-4-devel-2
PDLIBDIR = /lib
INSTALLDIR = /externs
HELPFILEDIR = /doc/5.reference
#these were the user adjustables
TARGETS = dice in_out markovUtils rb_tree buffer dice2 fileio markov rand table
# ----------------------- LINUX ----------------------------
.SUFFIXES: .pd_linux
LINUXOBJECTS = $(TARGETS:%=%.o)
ARCH = $(shell uname --machine)
PD_DIR = $(DESTDIR)$(INSTALL_PREFIX)$(PDLIBDIR)
ifeq (${ARCH},alpha)
AFLAGS = -mieee -mcpu=ev56
endif
LINCLUDE = -I/usr/include
-I/cygdrive/c/WINDOWS/Desktop/pd-0.38-4/pd-0.38-4-devel-2/src
$(LINUXOBJECTS): *.h
CFLAGS = -O2 -g -Wall $(LINCLUDE) $(UCFLAGS) $(AFLAGS) \
-DPD -O2 -funroll-loops -fomit-frame-pointer \
-W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
everything: clean all install distclean
install:
# cp maphash.pd_linux $(PD_DIR)$(INSTALLDIR)
# cp maphash-help.pd $(PD_DIR)$(HELPFILEDIR)/maphash.pd
# cp maphash-io.pd $(PD_DIR)$(INSTALLDIR)
# cp maphash-io-example.txt $(PD_DIR)$(INSTALLDIR)
# ln -s $(PD_DIR)$(HELPFILEDIR)/maphash.pd $(PD_DIR)$(HELPFILEDIR)/mapread.pd
# ln -s $(PD_DIR)$(HELPFILEDIR)/maphash.pd $(PD_DIR)$(HELPFILEDIR)/mapwrite.pd
uninstall:
# rm $(PD_DIR)$(INSTALLDIR)/maphash.pd_linux
# rm $(PD_DIR)$(INSTALLDIR)/maphash-io.pd
# rm $(PD_DIR)$(INSTALLDIR)/maphash-io-example.txt
# rm $(PD_DIR)$(HELPFILEDIR)/maphash.pd
# rm $(PD_DIR)$(HELPFILEDIR)/mapread.pd
# rm $(PD_DIR)$(HELPFILEDIR)/mapwrite.pd
distclean:
touch dummy.o
touch dummy.pd_linux
touch dummy~
touch _dummy
rm *.o *.pd_linux *~ _*
clean:
touch dummy.o
touch dummy.pd_linux
rm *.o *.pd_linux
all: $(LINUXOBJECTS)
@echo :: $(LINUXOBJECTS)
ld -L/cygdrive/c/WINDOWS/Desktop/pd-0.38-4/pd-0.38-4-devel-2/lib
-export_dynamic -shared -o markov.dll *.o -lc -lm
strip --strip-unneeded markov.dll
.c.pd_linux:
gcc $(CFLAGS) -O2 -DPD -fPIC $(INCLUDE) -c -o $*.o $*.c
(end makefile)
More information about the Pd-list
mailing list