Commit 1ef5dbac authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*synced iemlib and externals TODO

parent f87399d8
current: all
PD_DEFINES = -DPD -DUNIX
#################################
# path to private Pd-headers
PDSOURCE ?= /usr/local/src/pd/src
# path to iemlib.h
IEMLIB_INCLUDE = ../../include
#define to true if private Pd-header g_canvas.h is in out search-path
PD_DEFINES += -DHAVE_G_CANVAS_H
#################################
.SUFFIXES: .pd_linux
EXT = pd_linux
LDFLAGS = --export-dynamic -shared
LIB = -ldl -lm -lpthread
STRIP = strip
PD_LDFLAGS = --export-dynamic -shared $(LD_FLAGS)
PD_LIB = -lm -lc $(LIB)
#select either the DBG and OPT compiler flags below:
CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \
-Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing \
-DDL_OPEN -fPIC -fno-stack-protector
DBG_CFLAGS=-W -Wno-parentheses -Wno-switch -Wno-unused
CFLAGS=-O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing
PD_CFLAGS = $(PD_DEFINES) -fPIC -fno-stack-protector $(DBG_CFLAGS) $(CFLAGS)
INCLUDE = -I. -I$(PDSOURCE)
PD_INCLUDES = -I. -I$(IEMLIB_INCLUDE) -I$(PDSOURCE) -I../../../../pd/src
# the sources
SRC = $(sort $(filter %.c, $(wildcard *.c)))
#SRC = $(sort $(filter %.c, $(wildcard *.c)))
OBJ = $(SRC:.c=.o)
#
......@@ -27,19 +41,16 @@ OBJ = $(SRC:.c=.o)
#
clean:
-rm ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT)
-rm *.o
-rm -f ../../lib/$(TARGET).$(EXT) $(TARGET).$(EXT)
-rm -f *.o
all: $(OBJ)
@echo :: $(OBJ)
ld $(LDFLAGS) -o $(TARGET).$(EXT) *.o $(LIB)
strip --strip-unneeded $(TARGET).$(EXT)
$(LD) $(PD_LDFLAGS) -o $(TARGET).$(EXT) *.o $(PD_LIB)
$(STRIP) --strip-unneeded $(TARGET).$(EXT)
-cp $(TARGET).$(EXT) ../../lib/
$(OBJ) : %.o : %.c
touch $*.c
cc $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
$(CC) $(PD_CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c
......@@ -22,22 +22,22 @@ $(IEMLIBS):
install: install-bin install-doc install-abs
install-bin:
-install -d ${INSTALL_BIN}
-install -m 644 lib/*.* $(INSTALL_BIN)
-install -d $(DESTDIR)$(INSTALL_BIN)
-install -m 644 lib/*.* $(DESTDIR)$(INSTALL_BIN)
install-doc:
-install -d ${INSTALL_DOC}
-for d in ${IEMLIBS}; do \
-install -d $(DESTDIR)$(INSTALL_DOC)
-for d in $(IEMLIBS); do \
for e in pd wav; do \
install -m644 $$d/*.$$e $(INSTALL_DOC); \
install -m644 $$d/*.$$e $(DESTDIR)$(INSTALL_DOC); \
done; \
done
install-abs:
-install -d ${INSTALL_BIN}
-install -m 644 iemabs/*.pd $(INSTALL_BIN)
-install -d $(DESTDIR)$(INSTALL_BIN)
-install -m 644 iemabs/*.pd $(DESTDIR)$(INSTALL_BIN)
clean:
for d in ${IEMLIBS}; do \
${MAKE} -C $$d/src clean; \
for d in $(IEMLIBS); do \
$(MAKE) -C $$d/src clean; \
done
#include "../iemlib2/src/init.c"
void ii_setup()
{
init_setup();
}
#include "../iemlib2/src/toggle_mess.c"
void tm_setup()
{
toggle_mess_setup();
}
#include "../iemlib2/src/unsymbol.c"
void unsym_setup()
{
unsymbol_setup();
}
TARGET = iem_mp3
SRC = mp3play~.c \
$(TARGET).c
include ../../Make.include
current: all
current: all
.SUFFIXES: .d_fat
PD_INSTALL_PATH ?= "/Applications/Pd.app/Contents/Resources"
INCLUDE = -I. -I$(PD_INSTALL_PATH)/src
CFLAGS =-DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
LFLAGS = -bundle -undefined suppress -flat_namespace
PDSOURCE = "/Applications/Pd.app/Contents/Resources/src"
IEMLIB_INCLUDE = ../../include
PD_INCLUDES = -I. -I$(IEMLIB_INCLUDE) -I$(PDSOURCE)
PD_DEFINES = -DPD
CFLAGS =-O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch -fPIC
LFLAGS = -bundle -undefined suppress -flat_namespace
ARCH_FLAGS=-arch i386 -arch ppc
# the sources
SRC = mp3play~.c \
......@@ -19,26 +25,23 @@ SRC = mp3play~.c \
TARGET = iem_mp3.d_fat
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm ../$(TARGET)
rm *.o
all: $(OBJ)
@echo :: $(OBJ)
$(CC) -arch i386 -arch ppc $(LFLAGS) -o $(TARGET) *.o
strip -S -x $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
touch $*.c
$(CC) -arch i386 -arch ppc $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm -f ../$(TARGET)
rm -f *.o
all: $(OBJ)
@echo :: $(OBJ)
$(CC) $(ARCH_FLAGS) $(LFLAGS) -o $(TARGET) *.o
strip -S -x $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
$(CC) $(ARCH_FLAGS) $(PD_DEFINES) $(CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c
current: all
.SUFFIXES: .pd_linux
INCLUDE = -I. -I/usr/local/src/pd/src
LDFLAGS = -export-dynamic -shared
LIB = -ldl -lm -lpthread
#select either the DBG and OPT compiler flags below:
CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \
-Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing \
-DDL_OPEN -fPIC
SYSTEM = $(shell uname -m)
# the sources
SRC = mp3play~.c \
iem_mp3.c
TARGET = iem_mp3.pd_linux
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm ../$(TARGET)
rm *.o
all: $(OBJ)
@echo :: $(OBJ)
$(LD) $(LDFLAGS) -o $(TARGET) *.o $(LIB)
strip --strip-unneeded $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
#define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER)
#define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT)
#define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL)
#define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR)
#define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM)
#define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI)
#define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA)
/* now miller's code starts :
for 4 point interpolation
for lookup tables
for denormal floats
*/
#ifdef MSW
int sys_noloadbang;
//t_symbol *iemgui_key_sym=0;
#include <io.h>
#else
extern int sys_noloadbang;
//extern t_symbol *iemgui_key_sym;
#include <unistd.h>
#endif
#define DEFDELVS 64
#define XTRASAMPS 4
#define SAMPBLK 4
#define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */
/* machine-dependent definitions. These ifdefs really
should have been by CPU type and not by operating system! */
#ifdef IRIX
/* big-endian. Most significant byte is at low address in memory */
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#define int32 long /* a data type that has 32 bits */
#endif /* IRIX */
#ifdef MSW
/* little-endian; most significant byte is at highest address */
#define HIOFFSET 1
#define LOWOFFSET 0
#define int32 long
#endif /* MSW */
#if defined(__FreeBSD__) || defined(__APPLE__)
#include <machine/endian.h>
#endif
#ifdef __linux__
#include <endian.h>
#endif
#if defined(__unix__) || defined(__APPLE__)
#if !defined(BYTE_ORDER) || !defined(LITTLE_ENDIAN)
#error No byte order defined
#endif
#if BYTE_ORDER == LITTLE_ENDIAN
#define HIOFFSET 1
#define LOWOFFSET 0
#else
#define HIOFFSET 0 /* word offset to find MSB */
#define LOWOFFSET 1 /* word offset to find LSB */
#endif /* __BYTE_ORDER */
#include <sys/types.h>
#define int32 int32_t
#endif /* __unix__ or __APPLE__*/
union tabfudge_d
{
double tf_d;
int32 tf_i[2];
};
union tabfudge_f
{
float tf_f;
long tf_l;
};
#if defined __i386__ || defined __x86_64__
#define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \
(((*(unsigned int*)&(f))&0x60000000)==0x60000000))
/* more stringent test: anything not between 1e-19 and 1e19 in absolute val */
#else
#define IEM_DENORMAL(f) 0
#endif
#endif
TARGET = iem_t3_lib
SRC = t3_bpe.c \
t3_delay.c \
t3_line~.c \
t3_metro.c \
t3_sig~.c \
t3_timer.c \
$(TARGET).c
include ../../Make.include
current: all
current: all
.SUFFIXES: .d_fat
PD_INSTALL_PATH ?= "/Applications/Pd.app/Contents/Resources"
INCLUDE = -I. -I$(PD_INSTALL_PATH)/src
CFLAGS =-DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
LFLAGS = -bundle -undefined suppress -flat_namespace
PDSOURCE = "/Applications/Pd.app/Contents/Resources/src"
IEMLIB_INCLUDE = ../../include
PD_INCLUDES = -I. -I$(IEMLIB_INCLUDE) -I$(PDSOURCE)
PD_DEFINES = -DPD
CFLAGS =-O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch -fPIC
LFLAGS = -bundle -undefined suppress -flat_namespace
ARCH_FLAGS=-arch i386 -arch ppc
# the sources
SRC = t3_bpe.c \
......@@ -24,26 +30,23 @@ SRC = t3_bpe.c \
TARGET = iem_t3_lib.d_fat
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm ../$(TARGET)
rm *.o
all: $(OBJ)
@echo :: $(OBJ)
$(CC) -arch i386 -arch ppc $(LFLAGS) -o $(TARGET) *.o
strip -S -x $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
touch $*.c
$(CC) -arch i386 -arch ppc $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm -f ../$(TARGET)
rm -f *.o
all: $(OBJ)
@echo :: $(OBJ)
$(CC) $(ARCH_FLAGS) $(LFLAGS) -o $(TARGET) *.o
strip -S -x $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
$(CC) $(ARCH_FLAGS) $(PD_DEFINES) $(CFLAGS) $(PD_INCLUDES) -c -o $*.o $*.c
current: all
.SUFFIXES: .pd_linux
INCLUDE = -I. -I/usr/local/src/pd/src
LDFLAGS = -export-dynamic -shared
LIB = -ldl -lm -lpthread
#select either the DBG and OPT compiler flags below:
CFLAGS = -DPD -DUNIX -W -Werror -Wno-unused \
-Wno-parentheses -Wno-switch -O6 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing \
-DDL_OPEN -fPIC
SYSTEM = $(shell uname -m)
# the sources
SRC = t3_bpe.c \
t3_delay.c \
t3_line~.c \
t3_metro.c \
t3_sig~.c \
t3_timer.c \
iem_t3_lib.c
TARGET = iem_t3_lib.pd_linux
OBJ = $(SRC:.c=.o)
#
# ------------------ targets ------------------------------------
#
clean:
rm ../$(TARGET)
rm *.o
all: $(OBJ)
@echo :: $(OBJ)
$(LD) $(LDFLAGS) -o $(TARGET) *.o $(LIB)
strip --strip-unneeded $(TARGET)
mv $(TARGET) ..
$(OBJ) : %.o : %.c
$(CC) $(CFLAGS) $(INCLUDE) -c -o $*.o $*.c
#N canvas 375 118 410 467 10;
#X text 3 233 ~signal_in~;
#X text 28 48 dsp ON/OFF;
#X floatatom 79 164 3 15 133 0 - - -;
#X obj 79 185 mtof;
#X floatatom 79 206 9 0 22000 0 - - -;
#X text 149 205 Hz;
#X text 58 262 ~signal_out~;
#X floatatom 45 332 7 0 0 0 - - -;
#X text 203 290 dB;
#X floatatom 110 163 9 0 22000 0 - - -;
#X text 180 163 Hz;
#X floatatom 46 119 3 15 133 0 - - -;
#X floatatom 11 88 5 0 0 0 - - -;
#X text 46 87 % cpu;
#X floatatom 128 227 5 2 9999 0 - - -;
#X text 171 226 ms;
#X obj 11 68 dsp;
#X obj 11 48 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 1
;
#X obj 46 309 gainvu~ 300;
#X obj 203 167 vu 15 120 empty empty 8 -8 0 10 -66577 -1 1 0;
#X obj 259 178 vsl 15 128 0 127 0 1 empty empty empty 8 -8 0 10 -262144
-1 -1 8000 1;
#X obj 46 141 testtone~ 200;
#X obj 115 101 init 69;
#X text 73 120 midi;
#X text 15 362 2.arg:<float> interpolation_time [ms];
#X text 15 352 1.arg:<float> -90_degree_freq. [Hz];
#X obj 14 266 +~;
#X obj 14 287 *~ 0.5;
#X text 58 287 (like lp1~);
#X floatatom 234 327 7 0 0 0 - - -;
#X text 291 328 dB;
#X obj 13 19 cnv 8 1 1 empty empty ap1_dp~ 1 2 1 18 -262144 -1109 0
;
#X text 184 414 IEM KUG;
#X text 162 402 musil;
#X text 198 402 @;
#X text 206 402 iem.at;
#X text 167 424 Graz \, Austria;
#X text 119 391 (c) Thomas Musil 2000 - 2010;
#X text 120 13 allpass 1.order with double precision;
#X obj 46 248 ap1_dp~ 440 200;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 39 1;
#X connect 11 0 21 0;
#X connect 14 0 39 2;
#X connect 16 0 12 0;
#X connect 17 0 16 0;
#X connect 18 1 29 0;
#X connect 18 2 19 0;
#X connect 19 1 7 0;
#X connect 20 0 18 1;
#X connect 21 0 26 0;
#X connect 21 0 39 0;
#X connect 21 1 9 0;
#X connect 22 0 11 0;
#X connect 26 0 27 0;
#X connect 27 0 18 0;
#X connect 39 0 26 1;
#N canvas 256 230 453 306 10;
#X obj 22 42 inlet~;
#X obj 52 65 inlet;
#X obj 22 186 outlet~;
#X text 62 42 ~signal_in~;
#X obj 143 100 inlet;
#X text 178 101 <float> interpolation_time [ms];
#X text 28 157 ~filtered signal_out~;
#X text 89 64 <float> -90_degree_frequency [Hz];
#X text 84 182 1.arg: <float> -90_degree_frequency [Hz];
#X text 84 193 2.arg: <float> interpolation_time [ms] (opt.);
#X text 176 245 IEM KUG;
#X text 154 233 musil;
#X text 190 233 @;
#X text 199 233 iem.at;
#X text 159 255 Graz \, Austria;
#X obj 22 133 filter~ dap1 \$1 1 0 \$2;
#X text 11 9 ap1_dp~;
#X text 83 10 allpass 1.order with double precision;
#X text 111 222 (c) Thomas Musil 2000 - 2010;
#X connect 0 0 15 0;
#X connect 1 0 15 1;
#X connect 4 0 15 4;
#X connect 15 0 2 0;
#N canvas 375 118 402 502 10;
#X text 9 240 ~signal_in~;
#X text 34 40 dsp ON/OFF;
#X floatatom 83 150 3 15 133 0 - - -;
#X obj 83 172 mtof;
#X floatatom 83 193 9 0 22000 0 - - -;
#X text 154 193 Hz;
#X text 55 270 ~signal_out~;
#X floatatom 20 341 7 0 0 0 - - -;
#X text 76 341 dB;
#X floatatom 123 151 9 0 22000 0 - - -;
#X text 194 152 Hz;
#X floatatom 52 111 3 15 133 0 - - -;
#X floatatom 17 80 5 0 0 0 - - -;
#X text 62 80 % cpu;
#X floatatom 145 233 5 2 9999 0 - - -;
#X text 188 233 ms;
#X obj 17 60 dsp;
#X floatatom 114 213 4 0.01 1000 0 - - -;
#X text 154 212 Q;
#X text 57 372 2.arg:<float> Q [-];
#X text 57 382 3.arg:<float> interpolation_time [ms];
#X obj 17 40 tgl 15 0 empty empty empty 8 -8 0 10 -262144 -1 -1 1 1
;
#X obj 20 319 gainvu~ 300;
#X obj 214 194 vu 15 120 empty empty 8 -8 0 10 -66577 -1 1 0;
#X obj 275 188 vsl 15 128 0 127 0 1 empty empty empty 8 -8 0 10 -262144
-1 -1 8000 1;
#X obj 52 130 testtone~ 200;
#X obj 120 93 init 69;
#X text 79 112 midi;
#X text 57 362 1.arg:<float> -180_degree_freq. [Hz];
#X obj 20 276 +~;
#X obj 20 298 *~ 0.5;
#X text 64 297 (like bs2~);
#X floatatom 241 337 7 0 0 0 - - -;
#X text 298 338 dB;
#X obj 12 15 cnv 8 1 1 empty empty ap2_dp~ 1 2 1 18 -262144 -1109 0