diff options
author | Hans-Christoph Steiner <eighthave@users.sourceforge.net> | 2006-03-17 02:41:47 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@iem.at> | 2015-10-14 15:08:22 +0200 |
commit | 5065a96db886a6e2b4a44cc5eb3b31e4c40ccea8 (patch) | |
tree | e9587aef317e154c705da2e5c349baf515691c3b /multio | |
parent | 9cd1ec09c9ecc37be99f8f7523141b2740ba3beb (diff) |
cleaned things up for the Pd-extended build system, it shouldn't break anything, simple things
svn path=/trunk/externals/hardware/; revision=4717
Diffstat (limited to 'multio')
-rwxr-xr-x | multio/Makefile | 15 | ||||
-rw-r--r--[-rwxr-xr-x] | multio/multio-help.pd (renamed from multio/help-multio.pd) | 0 | ||||
-rwxr-xr-x | multio/multio.c | 12 | ||||
-rw-r--r-- | multio/multio.libs | 1 |
4 files changed, 17 insertions, 11 deletions
diff --git a/multio/Makefile b/multio/Makefile index 9f79bae..729d964 100755 --- a/multio/Makefile +++ b/multio/Makefile @@ -3,6 +3,8 @@ CSYM=multio current: pd_linux +pd_src = ../../../pd + # ----------------------- NT ----------------------- pd_nt: $(NAME).dll @@ -39,7 +41,7 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -fPIC \ -Wall -W -Wshadow -Wstrict-prototypes \ -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS) -LINUXINCLUDE = -I../../src +LINUXINCLUDE = -I../../src -I$(pd_src)/src .c.pd_linux: $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c @@ -53,12 +55,15 @@ pd_darwin: $(NAME).pd_darwin .SUFFIXES: .pd_darwin -DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ - -Wno-unused -Wno-parentheses -Wno-switch +DARWINCFLAGS = -DPD -O2 -Wall -W + +DARWININCLUDE = -I../../src -I$(pd_src)/src -I/sw/include +DARWINLIBS = -L/sw/lib -lusb .c.pd_darwin: - $(CC) $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - $(CC) -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o + $(CC) $(DARWINCFLAGS) $(DARWININCLUDE) -o $*.o -c $*.c + $(CC) -bundle -bundle_loader $(pd_src)/bin/pd $(DARWINLIBS) \ + -o $*.pd_darwin $*.o rm -f $*.o # ---------------------------------------------------------- diff --git a/multio/help-multio.pd b/multio/multio-help.pd index eaae25b..eaae25b 100755..100644 --- a/multio/help-multio.pd +++ b/multio/multio-help.pd diff --git a/multio/multio.c b/multio/multio.c index 65c1ac5..9238974 100755 --- a/multio/multio.c +++ b/multio/multio.c @@ -9,9 +9,9 @@ output is a list of 2 floats (channel, value) */ -#ifdef NT
-#include <windows.h>
-#endif +#ifdef _WIN32 +#include <windows.h> +#endif /* _WIN32 */ #include "m_pd.h" #include "usb.h" @@ -73,7 +73,7 @@ static void *usb_read_thread(void *w) bytesread = usb_interrupt_read(x->d, 0x81, buffer, 8, 1000); if(bytesread > 0) { - if(x->buf_count[mybuf]+bytesread > MAXBUF)
+ if(x->buf_count[mybuf]+bytesread > MAXBUF) x->buf_count[mybuf] = 0; x->double_buffer[mybuf][x->buf_count[mybuf]++] = bytesread; // store the number of bytes for that message for(cnt = 0; cnt < bytesread; cnt++) // append the message data into the buffer @@ -83,9 +83,9 @@ static void *usb_read_thread(void *w) // post("thread read %i bytes to buffer %i (now %i bytes)",bytesread, mybuf,x->buf_count[mybuf] ); } } -#ifdef NT
+#ifdef _WIN32 Sleep(1); -#endif +#endif /* _WIN32 */ } } diff --git a/multio/multio.libs b/multio/multio.libs new file mode 100644 index 0000000..d567bab --- /dev/null +++ b/multio/multio.libs @@ -0,0 +1 @@ +-lusb |