Update of /cvsroot/pure-data/externals/markex In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13204
Modified Files: Makefile hsv2rgb.c rgb2hsv.c Added Files: MarkEx.c Log Message: allow to build as single library
Index: rgb2hsv.c =================================================================== RCS file: /cvsroot/pure-data/externals/markex/rgb2hsv.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** rgb2hsv.c 13 Mar 2006 15:59:40 -0000 1.1 --- rgb2hsv.c 13 Mar 2006 16:34:03 -0000 1.2 *************** *** 14,18 **** #include <math.h>
! inline float FLOAT_CLAMP(float x) { return((x > 1.f) ? 1.f : ( (x < 0.f) ? 0.f : x)); }
static inline float TRI_MAX(float v1, float v2, float v3) --- 14,18 ---- #include <math.h>
! static inline float FLOAT_CLAMP(float x) { return((x > 1.f) ? 1.f : ( (x < 0.f) ? 0.f : x)); }
static inline float TRI_MAX(float v1, float v2, float v3)
Index: Makefile =================================================================== RCS file: /cvsroot/pure-data/externals/markex/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 13 Mar 2006 15:59:40 -0000 1.2 --- Makefile 13 Mar 2006 16:34:03 -0000 1.3 *************** *** 1,13 **** current: ! echo make pd_darwin, pd_linux !
! SOURCES=$(sort $(filter %.c, $(wildcard *.c)))
! OTARGETS = $(SOURCES:.c=.o)
# ----------------------- DARWIN -----------------------
TARGETS = $(SOURCES:.c=.pd_darwin)
.SUFFIXES: .pd_darwin --- 1,14 ---- current: ! @echo make pd_linux, MarkEx.pd_linux, pd_darwin, MarkEx.pd_darwin
! MarkEx: ! @echo make MarkEx.pd_{linux,darwin}
! SOURCES=$(sort $(filter-out MarkEx.c, $(filter %.c, $(wildcard *.c))))
# ----------------------- DARWIN -----------------------
TARGETS = $(SOURCES:.c=.pd_darwin) + OTARGETS = $(SOURCES:.c=.o_darwin)
.SUFFIXES: .pd_darwin *************** *** 19,32 **** DARWININCLUDE = -I/usr/local/lib/pd/include -I../../pd/src -I /usr/local/include
! $(TARGETS): %.pd_darwin : %.c ! $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o -c $*.c $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o -lc -lm - rm $*.o
pd_darwin: $(TARGETS)
# ----------------------- LINUX -----------------------
TARGETS = $(SOURCES:.c=.pd_linux)
--- 20,39 ---- DARWININCLUDE = -I/usr/local/lib/pd/include -I../../pd/src -I /usr/local/include
! $(OTARGETS): %.o_darwin : %.c ! $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o_darwin -c $*.c ! ! $(TARGETS): %.pd_darwin : %.o_darwin $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o -lc -lm
pd_darwin: $(TARGETS)
+ MarkEx.pd_darwin: $(OTARGETS) + $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o MarkEx.o -c MarkEx.c + $(CC) -bundle -undefined suppress -flat_namespace -o MarkEx.pd_linux *.o_darwin -lc -lm + # ----------------------- LINUX -----------------------
+ OTARGETS = $(SOURCES:.c=.o_linux) TARGETS = $(SOURCES:.c=.pd_linux)
*************** *** 39,52 **** LINUXINCLUDE = -I/usr/local/lib/pd/include -I../../pd/src
! $(TARGETS): %.pd_linux : %.c ! $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ! $(LD) -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux - rm $*.o
pd_linux: $(TARGETS)
# ----------------------- CLEAN -----------------------
! clean: ; rm -f *.pd_* *.o *~
--- 46,65 ---- LINUXINCLUDE = -I/usr/local/lib/pd/include -I../../pd/src
! $(OTARGETS): %.o_linux : %.c ! $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o_linux -c $*.c ! ! $(TARGETS): %.pd_linux : %.o_linux ! $(LD) -export_dynamic -shared -o $*.pd_linux $*.o_linux -lc -lm strip --strip-unneeded $*.pd_linux
pd_linux: $(TARGETS)
+ MarkEx.pd_linux: $(OTARGETS) + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o MarkEx.o_linux -c MarkEx.c + $(LD) -export_dynamic -shared -o MarkEx.pd_linux *.o_linux -lc -lm + strip --strip-unneeded MarkEx.pd_linux + # ----------------------- CLEAN -----------------------
! clean: ; rm -f *.pd_* *.o *.o_* *~
Index: hsv2rgb.c =================================================================== RCS file: /cvsroot/pure-data/externals/markex/hsv2rgb.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hsv2rgb.c 13 Mar 2006 15:59:40 -0000 1.1 --- hsv2rgb.c 13 Mar 2006 16:34:03 -0000 1.2 *************** *** 14,18 **** #include <math.h>
! inline float FLOAT_CLAMP(float x) { return((x > 1.f) ? 1.f : ( (x < 0.f) ? 0.f : x)); }
///////////////////////////////////////////////////////// --- 14,18 ---- #include <math.h>
! static inline float FLOAT_CLAMP(float x) { return((x > 1.f) ? 1.f : ( (x < 0.f) ? 0.f : x)); }
/////////////////////////////////////////////////////////
--- NEW FILE: MarkEx.c --- /* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution.
MarkEx, Copyright (c) 1997-1999 Mark Danks */
#ifdef NT #pragma warning( disable : 4244 ) #pragma warning( disable : 4305 ) #endif
#include "m_pd.h"
static t_class *MarkEx_class;
static void *MarkEx_new(void) { t_object *x = (t_object *)pd_new(MarkEx_class); return (x); }
void abs_tilde_setup(void); void alternate_setup(void); void average_setup(void); void counter_setup(void); void hsv2rgb_setup(void); void invert_setup(void); void multiselect_setup(void); void oneshot_setup(void); void randomF_setup(void); void reson_tilde_setup(void); void rgb2hsv_setup(void); void strcat_setup(void); void tripleLine_setup(void); void tripleRand_setup(void); void vectorabs_setup(void); void vectorpack_setup(void); void setup_vector0x2a(void); void setup_vector0x2f(void); void setup_vector0x2d(void); void setup_vector0x2b(void);
/* ------------------------ setup routine ------------------------- */
void MarkEx_setup(void) { MarkEx_class = class_new(gensym("MarkEx"), MarkEx_new, 0, sizeof(t_object), CLASS_NOINLET, 0);
abs_tilde_setup(); alternate_setup(); average_setup(); counter_setup(); hsv2rgb_setup(); invert_setup(); multiselect_setup(); oneshot_setup(); randomF_setup(); reson_tilde_setup(); rgb2hsv_setup(); strcat_setup(); tripleLine_setup(); tripleRand_setup(); vectorabs_setup(); vectorpack_setup(); setup_vector0x2a(); setup_vector0x2f(); setup_vector0x2d(); setup_vector0x2b(); post("MarkEx loaded! (c) 1997-1999 Mark Danks "); }