From d6ca0c2b8f1f466507bf25fa0591d58c88f2cd5a Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 10 Nov 2010 21:48:41 +0000 Subject: converted cyclone build to a custom standlone makefile for making the libdir svn path=/trunk/externals/miXed/; revision=14380 --- cyclone/Makefile.libdir | 114 ++++++++++++++++++++++++++++++++++++++++++++++++ cyclone/README.txt | 78 +++++++++++++++++++++++++++++++++ cyclone/cyclone-meta.pd | 9 ++++ 3 files changed, 201 insertions(+) create mode 100644 cyclone/Makefile.libdir create mode 100644 cyclone/README.txt create mode 100644 cyclone/cyclone-meta.pd (limited to 'cyclone') diff --git a/cyclone/Makefile.libdir b/cyclone/Makefile.libdir new file mode 100644 index 0000000..9475432 --- /dev/null +++ b/cyclone/Makefile.libdir @@ -0,0 +1,114 @@ +# this Makefile builds a libdir for cyclone + +# where to install the library, overridden below depending on platform +prefix = /usr/local +libdir = $(prefix)/lib +bindir = $(prefix)/bin +pkglibdir = $(libdir)/pd-externals +objectsdir = $(pkglibdir) + +UNAME := $(shell uname -s) +ifeq ($(UNAME),Darwin) + CPU := $(shell uname -p) + ifeq ($(CPU),arm) # iPhone/iPod Touch + EXTENSION = pd_darwin + OS = iphoneos + PD_PATH = /Applications/Pd-extended.app/Contents/Resources + IPHONE_BASE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin + CC=$(IPHONE_BASE)/gcc + CPP=$(IPHONE_BASE)/cpp + CXX=$(IPHONE_BASE)/g++ + ISYSROOT = -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk + IPHONE_CFLAGS = -miphoneos-version-min=3.0 $(ISYSROOT) -arch armv6 + OPT_CFLAGS = -fast -funroll-loops -fomit-frame-pointer + CFLAGS := $(IPHONE_CFLAGS) $(OPT_CFLAGS) $(CFLAGS) + LDFLAGS += -arch armv6 -bundle -undefined dynamic_lookup $(ISYSROOT) + LIBS += -lc + STRIP = strip -x + else # Mac OS X + EXTENSION = pd_darwin + OS = macosx + PD_PATH = /Applications/Pd-extended.app/Contents/Resources + OPT_CFLAGS = -ftree-vectorize -ftree-vectorizer-verbose=2 -fast +# build universal 32-bit on 10.4 and 32/64 on newer + ifeq ($(shell uname -r | sed 's|\([0-9][0-9]*\)\.[0-9][0-9]*\.[0-9][0-9]*|\1|'), 8) + FAT_FLAGS = -arch ppc -arch i386 -mmacosx-version-min=10.4 + else + FAT_FLAGS = -arch ppc -arch i386 -arch x86_64 -mmacosx-version-min=10.4 + endif + CFLAGS += $(FAT_FLAGS) -fPIC -I/sw/include + LDFLAGS += $(FAT_FLAGS) -bundle -undefined dynamic_lookup -L/sw/lib + # if the 'pd' binary exists, check the linking against it to aid with stripping + LDFLAGS += $(shell test -e $(PD_PATH)/bin/pd && echo -bundle_loader $(PD_PATH)/bin/pd) + LIBS += -lc + STRIP = strip -x +# install into ~/Library/Pd on Mac OS X since /usr/local isn't used much + pkglibdir=$(HOME)/Library/Pd + endif +endif +ifeq ($(UNAME),Linux) + CPU := $(shell uname -m) + EXTENSION = pd_linux + OS = linux + PD_PATH = /usr + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += -fPIC + LDFLAGS += -Wl,--export-dynamic -shared -fPIC + LIBS += -lc + STRIP = strip --strip-unneeded -R .note -R .comment +endif +ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME))) + CPU := $(shell uname -m) + EXTENSION = dll + OS = cygwin + PD_PATH = $(cygpath $(PROGRAMFILES))/pd + OPT_CFLAGS = -O6 -funroll-loops -fomit-frame-pointer + CFLAGS += + LDFLAGS += -Wl,--export-dynamic -shared -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" + LIBS += -lc -lpd + STRIP = strip --strip-unneeded -R .note -R .comment +endif +ifeq (MINGW,$(findstring MINGW,$(UNAME))) + CPU := $(shell uname -m) + EXTENSION = dll + OS = windows + PD_PATH = $(shell cd "$(PROGRAMFILES)"/pd && pwd) + OPT_CFLAGS = -O3 -funroll-loops -fomit-frame-pointer + CFLAGS += -mms-bitfields + LDFLAGS += -s -shared -Wl,--enable-auto-import + LIBS += -L"$(PD_PATH)/src" -L"$(PD_PATH)/bin" -L"$(PD_PATH)/obj" -lpd -lwsock32 -lkernel32 -luser32 -lgdi32 + STRIP = strip --strip-unneeded -R .note -R .comment +endif + +cyclone: + $(MAKE) -f Makefile \ + OPT_CFLAGS="-O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing -fPIC" + +install: cyclone + install -d $(DESTDIR)$(objectsdir)/cyclone + install -p cyclone-meta.pd $(DESTDIR)$(objectsdir)/cyclone + install -p ../LICENSE.txt $(DESTDIR)$(objectsdir)/cyclone + install -p README.txt $(DESTDIR)$(objectsdir)/cyclone +# cyclone is compiled straight into $(OUT_DIR), yes a kludge, but the code of +# this build system is impenetrable + $(MAKE) OUT_DIR=$(DESTDIR)$(objectsdir)/cyclone +# install "maxmode" libraries into subdir, so they don't override the libdir + install -d $(DESTDIR)$(objectsdir)/cyclone/maxmode + install -p ../bin/cyclone.$(EXTENSION) \ + ../bin/hammer.$(EXTENSION) \ + ../bin/sickle.$(EXTENSION) \ + ../bin/maxmode.$(EXTENSION) \ + $(DESTDIR)$(objectsdir)/cyclone/maxmode +# install "cyclist" command line app with pd + install -d $(DESTDIR)$(bindir) + install -p -m0755 ../bin/cyclist $(DESTDIR)$(bindir) + install -p ../doc/help/cyclone/*.* \ + $(DESTDIR)$(objectsdir)/cyclone + install -d $(DESTDIR)$(objectsdir)/cyclone/examples + install -p ../test/cyclone/*.* \ + $(DESTDIR)$(objectsdir)/cyclone/examples + +clean: + -$(MAKE) -f Makefile $(DEST_PATHS) clean + -rm -f ../bin/*.pd_linux + -rm -f ../bin/cyclist diff --git a/cyclone/README.txt b/cyclone/README.txt new file mode 100644 index 0000000..8b9f56b --- /dev/null +++ b/cyclone/README.txt @@ -0,0 +1,78 @@ +http://suita.chopin.edu.pl/~czaja/miXed/externs/cyclone.html + +------- +cyclone +------- + +Cyclone is a library of PureData classes, bringing some level of compatibility +between Max/MSP and Pd environments. Although being itself in the early stage +of development, it is meant to eventually become part of a much larger +project, aiming at unification and standardization of computer musician's +tools. + +In its current form, cyclone is mainly for people using both Max and Pd, and +thus wanting to develop cross-platform patches. In this respect, cyclone has +much in common with Thomas Grill's flext, and flext-based externals. See +Thomas' page. While flext enables developing new cross-platform classes, +cyclone makes existing classes cross-platform. + +Cyclone also comes handy, somewhat, in the task of importing Max/MSP patches +into Pd. Do not expect miracles, though, it is usually not an easy task. + +The entire cyclone library, which might be preloaded with either -lib cyclone +or -lib maxmode option, consists of: + + * the main hammer and sickle sub-libraries, containing Pd versions of, + respectively, Max and MSP classes; + + * cyclone sub-library, taking care of loading hammer and sickle, and which + itself contains: a small set of operators (!-, !/, ==~, !=~, <~, <=~, >~, + >=~, !-~, !/~, %~, +=~); an importing mechanism provided by the cyclone + class. + + * optional dummies sub-library, which contains a large set of dummy classes, + serving as substitutions for Max/MSP classes not (yet) implemented in + cyclone; + + * maxmode sub-library, which imposes strict compatibility mode, and loads all + the other components, including dummies. + +The two main sub-libraries might be loaded separately, by using -lib hammer +and/or -lib sickle options. There is also a possibility of loading any single +class from hammer or sickle library dynamically (this feature is only +available in the linux snapshot). + +Currently, the hammer part contains: accum, acos, active, anal, Append (more +info), asin, bangbang, bondo, Borax, Bucket, buddy, capture, cartopol, Clip, +coll, comment, cosh, counter, cycle, decide, Decode, drunk, flush, forward, +fromsymbol, funbuff, funnel, gate, grab, Histo, iter, match, maximum, mean, +midiflush, midiformat, midiparse, minimum, mousefilter, MouseState, mtr (more +info), next, offer, onebang, past, Peak, poltocar, prepend (more info), prob, +pv, seq (more info), sinh, speedlim, spell, split, spray, sprintf, substitute, +sustain, switch, Table (more info), tanh, thresh, TogEdge, tosymbol, Trough, +universal, urn, Uzi, xbendin, xbendout, xnotein, xnoteout, and zl. + +The sickle part contains: abs~, acos~, acosh~, allpass~, asin~, asinh~, atan~, +atan2~, atanh~, average~, avg~, bitand~, bitnot~, bitor~, bitshift~, bitxor~, +buffir~, capture~, cartopol~, change~, click~, Clip~, comb~, cosh~, cosx~, +count~, curve~, cycle~, delay~, delta~, deltaclip~, edge~, frameaccum~, +framedelta~, index~, kink~, Line~, linedrive, log~, lookup~, lores~, matrix~ +(more info), maximum~, minimum~, minmax~, mstosamps~, onepole~, peakamp~, +peek~, phasewrap~, pink~, play~, poke~, poltocar~, pong~, pow~, rampsmooth~, +rand~, record~, reson~, sah~, sampstoms~, Scope~, sinh~, sinx~, slide~, +Snapshot~, spike~, svf~, tanh~, tanx~, train~, trapezoid~, triangle~, +vectral~, wave~, and zerox~. + +Cyclone comes without any documentation. All the included patches were +created merely for testing. + +Caveats: + +* The binaries provided in this snapshot release are not expected to run + inside of a pre-0.36 version of Pd, without prior recompiling. + +* If a single -lib cyclone startup option is used, cyclone in turn loads its + two main components: hammer and sickle. If a single -lib maxmode startup + option is used, all the remaining library components are going to be loaded: + cyclone, hammer, sickle, and dummies. In these cases, all the required + libraries should be accessible by Pd. diff --git a/cyclone/cyclone-meta.pd b/cyclone/cyclone-meta.pd new file mode 100644 index 0000000..2510aa1 --- /dev/null +++ b/cyclone/cyclone-meta.pd @@ -0,0 +1,9 @@ +#N canvas 10 10 200 200 10; +#N canvas 20 20 420 300 META 0; +#X text 10 10 META this is a prototype of a libdir meta file; +#X text 10 30 NAME cyclone; +#X text 10 50 AUTHOR Kzrysztof Czaja; +#X text 10 70 LICENSE BSD; +#X text 10 90 VERSION 0.1; +#X text 10 110 DESCRIPTION a library for porting and running Max/MSP patches in Pd; +#X restore 10 10 pd META; -- cgit v1.2.1