aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2013-07-04 15:04:30 +0000
committermusil <tmusil@users.sourceforge.net>2013-07-04 15:04:30 +0000
commit4d924e08a85c14d113842d3a1026d9d1d66c40ad (patch)
treebed01bd0463936372696ca5108a347813624c9dd
parent2f748dca4b0c20fc58c48d42f558db04e3ddf47d (diff)
iemlib.h now in include folder parallel to library folder, changed makefiles,, removed iemlib.h and makefile_linux
svn path=/trunk/externals/iemlib/; revision=17180
-rw-r--r--iemlib1/src/iemlib.h118
-rw-r--r--iemlib1/src/makefile30
-rw-r--r--iemlib1/src/makefile_d_fat7
-rw-r--r--iemlib1/src/makefile_linux73
4 files changed, 35 insertions, 193 deletions
diff --git a/iemlib1/src/iemlib.h b/iemlib1/src/iemlib.h
deleted file mode 100644
index ac1ffce..0000000
--- a/iemlib1/src/iemlib.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* 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 - 2012 */
-
-#ifndef __IEMLIB_H__
-#define __IEMLIB_H__
-
-
-#define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL)
-#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)
-
-#define SETNULL(atom) ((atom)->a_type = A_NULL)
-
-/* 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__) || defined(__FreeBSD_kernel__)
-#include <machine/endian.h>
-#endif
-
-#if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(ANDROID)
-#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
-
-/* on 64bit systems we cannot use garray_getfloatarray... */
-#if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40))
-# define iemarray_t t_word
-# define iemarray_getarray garray_getfloatwords
-# define iemarray_getfloat(pointer, index) (pointer[index].w_float)
-# define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue)
-#else
-# define iemarray_t t_float
-# define iemarray_getarray garray_getfloatarray
-# define iemarray_getfloat(pointer, index) (pointer[index])
-# define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue)
-#endif
-
-#endif
diff --git a/iemlib1/src/makefile b/iemlib1/src/makefile
index f1fa0e4..3e23fcf 100644
--- a/iemlib1/src/makefile
+++ b/iemlib1/src/makefile
@@ -1,4 +1,34 @@
TARGET = iemlib1
+
+SRC = biquad_freq_resp.c \
+ db2v.c \
+ f2note.c \
+ filter~.c \
+ FIR~.c \
+ for++.c \
+ gate.c \
+ hml_shelf~.c \
+ iem_cot4~.c \
+ iem_delay~.c \
+ iem_pow4~.c \
+ iem_sqrt4~.c \
+ lp1_t~.c \
+ mov_avrg_kern~.c \
+ para_bp2~.c \
+ peakenv~.c \
+ peakenv_hold~.c \
+ prvu~.c \
+ pvu~.c \
+ rvu~.c \
+ sin_freq~.c \
+ sin_phase~.c \
+ sparse_FIR~.c \
+ soundfile_info.c \
+ split.c \
+ v2db.c \
+ vcf_filter~.c \
+ $(TARGET).c
+
include ../../Make.include
diff --git a/iemlib1/src/makefile_d_fat b/iemlib1/src/makefile_d_fat
index c997007..9948e3c 100644
--- a/iemlib1/src/makefile_d_fat
+++ b/iemlib1/src/makefile_d_fat
@@ -4,7 +4,10 @@ current: all
PD_INSTALL_PATH ?= "/Applications/Pd.app/Contents/Resources"
-INCLUDE = -I. -I$(PD_INSTALL_PATH)/src
+# path to iemlib.h
+IEMLIB_INCLUDE = ../../include
+
+INCLUDE = -I. -I$(IEMLIB_INCLUDE) -I$(PD_INSTALL_PATH)/src
CFLAGS =-DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \
-Wno-unused -Wno-parentheses -Wno-switch
@@ -13,7 +16,7 @@ LFLAGS = -bundle -undefined suppress -flat_namespace
# the sources
-SRC = biquad_freq_resp.c \
+SRC = biquad_freq_resp.c \
db2v.c \
f2note.c \
filter~.c \
diff --git a/iemlib1/src/makefile_linux b/iemlib1/src/makefile_linux
deleted file mode 100644
index 6e9f461..0000000
--- a/iemlib1/src/makefile_linux
+++ /dev/null
@@ -1,73 +0,0 @@
-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 -O2 -funroll-loops -fomit-frame-pointer -fno-strict-aliasing \
- -DDL_OPEN -fPIC
-
-SYSTEM = $(shell uname -m)
-
-# the sources
-
-SRC = biquad_freq_resp.c \
- db2v.c \
- f2note.c \
- filter~.c \
- FIR~.c \
- for++.c \
- gate.c \
- hml_shelf~.c \
- iem_cot4~.c \
- iem_delay~.c \
- iem_pow4~.c \
- iem_sqrt4~.c \
- lp1_t~.c \
- mov_avrg_kern~.c \
- para_bp2~.c \
- peakenv~.c \
- peakenv_hold~.c \
- prvu~.c \
- pvu~.c \
- rvu~.c \
- sin_freq~.c \
- sin_phase~.c \
- sparse_FIR~ \
- soundfile_info.c \
- split.c \
- v2db.c \
- vcf_filter~.c \
- iemlib1.c
-
-TARGET = iemlib1.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
-
-
-
-