aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.in12
-rw-r--r--src/OSC-common.h35
-rw-r--r--src/dumpOSC.c10
3 files changed, 33 insertions, 24 deletions
diff --git a/src/Makefile.in b/src/Makefile.in
index 518f05b..02b0751 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -17,7 +17,7 @@
EXT=o
-LIBS = -lm -lc
+LIBS = @LIBS@
LIBOSC = ../libOSC/@LIBOSC@
CFLAGS = @CFLAGS@
@@ -35,19 +35,19 @@ EXTS=sendOSC.@pd_suffix@ dumpOSC.@pd_suffix@ OSCroute.@pd_suffix@ OSC.@pd_suffix
all: $(EXTS)
dumpOSC.@pd_suffix@: dumpOSC.o
- cc $(LDFLAGS) -o dumpOSC.@pd_suffix@ $? -lc -lm
+ $(CC) $(LDFLAGS) -o dumpOSC.@pd_suffix@ $? $(LIBS)
sendOSC.@pd_suffix@: sendOSC.o htmsocket.o OSC-system-dependent.o
- cc $(LDFLAGS) -o sendOSC.@pd_suffix@ $? -lc -lm $(LIBOSC)
+ $(CC) $(LDFLAGS) -o sendOSC.@pd_suffix@ $? $(LIBS) $(LIBOSC)
OSCroute.@pd_suffix@: OSCroute.o OSC-pattern-match.o OSC-system-dependent.o
- cc $(LDFLAGS) -o OSCroute.@pd_suffix@ $? -lc -lm
+ $(CC) $(LDFLAGS) -o OSCroute.@pd_suffix@ $? $(LIBS)
OSC.@pd_suffix@: OSC.o sendOSC.o dumpOSC.o OSCroute.o htmsocket.o OSC-pattern-match.o OSC-system-dependent.o
- cc $(LDFLAGS) -o OSC.@pd_suffix@ $? -lc -lm $(LIBOSC)
+ $(CC) $(LDFLAGS) -o OSC.@pd_suffix@ $? $(LIBS) $(LIBOSC)
$(TARGETS): %.o : %.c
- cc $(CFLAGS) $(INCLUDES) -c -o $*.o $*.c
+ $(CC) $(CFLAGS) $(INCLUDES) -c -o $*.o $*.c
# ----------------------------------------------------------
diff --git a/src/OSC-common.h b/src/OSC-common.h
index d457686..46c66a9 100644
--- a/src/OSC-common.h
+++ b/src/OSC-common.h
@@ -34,6 +34,9 @@ The OpenSound Control WWW page is
by Matt Wright, 3/13/98
*/
+#ifndef _OSC_COMMON_H
+#define _OSC_COMMON_H
+
/* Boolean type */
#ifndef TRUE
@@ -41,20 +44,20 @@ typedef int Boolean;
#define TRUE 1
#define FALSE 0
#endif
-
-
-#ifdef WIN32
- #include <stdio.h>
- #ifdef OSC_EXPORTS
- #define OSC_API __declspec(dllexport)
- #else
- #define OSC_API __declspec(dllimport)
- #endif
- #ifdef _DEBUG
- #define DEBUG
- #endif
-#endif
-
+
+
+#ifdef _WIN32
+ #include <stdio.h>
+ #ifdef OSC_EXPORTS
+ #define OSC_API __declspec(dllexport)
+ #else
+ #define OSC_API __declspec(dllimport)
+ #endif
+ #ifdef _DEBUG
+ #define DEBUG
+ #endif
+#endif
+
//#define int32_t t_int
/* Fixed byte width types */
@@ -71,3 +74,7 @@ void OSCProblem(char *s, ...);
/* Warning for user */
void OSCWarning(char *s, ...);
+
+
+#endif /* _OSC_COMMON_H */
+
diff --git a/src/dumpOSC.c b/src/dumpOSC.c
index 873a3a9..8d34896 100644
--- a/src/dumpOSC.c
+++ b/src/dumpOSC.c
@@ -80,10 +80,12 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
//void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);
-#if defined(__sgi) || defined(__linux) || defined(WIN32) || defined(__APPLE__)
+#if defined(__sgi) || defined(__linux) || defined(_WIN32) || defined(__APPLE__)
-#ifdef WIN32
+#ifdef _WIN32
+ #ifdef _MSC_VER
#include "OSC-common.h"
+ #endif /* _MSC_VER */
#include <winsock2.h>
#include <string.h>
#include <stdlib.h>
@@ -122,7 +124,7 @@ The OSC webpage is http://cnmat.cnmat.berkeley.edu/OpenSoundControl
#include <sys/schedctl.h>
#include <sys/lock.h>
#endif
-#endif
+#endif /* _WIN32 */
char *htm_error_string;
@@ -329,7 +331,7 @@ static void dumpOSC_free(t_dumpOSC *x)
}
}
-#ifdef WIN32
+#ifdef _MSC_VER
OSC_API void dumpOSC_setup(void)
#else
void dumpOSC_setup(void)