diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2006-01-28 10:24:28 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2006-01-28 10:24:28 +0000 |
commit | 831a08e85446b13afa7e12d3cf338c53341003c5 (patch) | |
tree | a4aa261fb623ee4328c189b01cb9068f38580a5f | |
parent | 4175e0717ef88fb5c90d0ab1635028f8b6df8f0c (diff) |
some cleanups for OSX, fixed line endings
svn path=/trunk/externals/clr/; revision=4510
-rwxr-xr-x | clr.cpp | 14 | ||||
-rwxr-xr-x | makefile.darwin | 31 |
2 files changed, 19 insertions, 26 deletions
@@ -16,8 +16,14 @@ extern "C" { #include <assert.h>
#include <stdlib.h>
-#include <string.h>
+#include <string.h> + +#ifdef _WIN32
#include <io.h> // for _close
+#define close _close +#else +#include <unistd.h> +#endif #include <map>
@@ -961,7 +967,7 @@ static int classloader(char *dirname, char *classname) goto bailout; // found - _close(fd);
+ close(fd);
clr_class = (t_clr_class *)getbytes(sizeof(t_clr_class));
@@ -1096,8 +1102,8 @@ void clr_setup(void) mono_add_internal_call("PureData.Core::PostBug",(const void *)PD_PostBug);
mono_add_internal_call("PureData.Core::PostVerbose",(const void *)PD_PostVerbose);
- mono_add_internal_call("PureData.Core::GenSym", PD_GenSym);
- mono_add_internal_call("PureData.Core::EvalSym", PD_EvalSym);
+ mono_add_internal_call("PureData.Core::GenSym", (const void *)PD_GenSym);
+ mono_add_internal_call("PureData.Core::EvalSym", (const void *)PD_EvalSym);
MonoAssembly *assembly = mono_domain_assembly_open (monodomain, "PureData.dll");
diff --git a/makefile.darwin b/makefile.darwin index 54a8a01..1bdc00a 100755 --- a/makefile.darwin +++ b/makefile.darwin @@ -1,6 +1,6 @@ current: pd_darwin -clean: ; rm -f *.pd_linux *.o *.pd_darwin +clean: ; rm -f *.o *.pd_darwin # ----------------------- Mac OSX ----------------------- @@ -10,31 +10,18 @@ pd_darwin: clr.pd_darwin .SUFFIXES: .pd_darwin -# where are the PD header files? -# leave it blank if it is a system directory (like /usr/local/include), -# since gcc 3.2 complains about it -#PDPATH=/usr/local/src/pd/src -PDPATH=/Users/davide/Desktop/Pd-0.39-0.app/Contents/Resources/src/ +PDPATH=/Users/thomas/Develop/pd/devel_0_39 -# where is the PD executable? -#PD=/usr/local/bin/pd -PD=/Users/davide/Desktop/Pd-0.39-0.app/Contents/Resources/bin/pd -#PD=/Users/davidemorelli/Desktop/robaDavide/Pd-0.38-3.app/Contents/Resources/src/ +MONO=/Library/Frameworks/Mono.Framework -CFLAGS=`pkg-config --cflags mono` -#LDFLAGS=`pkg-config --libs mono` -LDFLAGS=-L/sw/lib -L/sw/lib/pkgconfig/../../lib -lmono -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -lintl -liconv +# where is the PD executable? +PD=$(PDPATH)/bin/pd -DARWININCLUDE = -I../../src -I$(PDPATH) +LDFLAGS=-L$(MONO)/Libraries -lmono -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 # -lintl -liconv -#DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ -# -Wno-unused -Wno-parentheses -Wno-switch +DARWININCLUDE = -I$(MONO)/Headers -I$(MONO)/Headers/glib-2.0 -I$(MONO)/Libraries/glib-2.0/include -I$(PDPATH)/src DARWINCFLAGS = -DPD -O2 -.c.pd_darwin: - cc $(DARWINCFLAGS) $(DARWININCLUDE) $(CFLAGS) -o $*.o -c $*.c -# cc -bundle -bundle_loader $(PD) -multiply_defined supress $(LDFLAGS) -o $*.pd_darwin *.o - cc -bundle -bundle_loader $(PD) -flat_namespace $(LDFLAGS) -o $*.pd_darwin *.o -# cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $(FANNLIB) *.o -# rm -f $*.o +.cpp.pd_darwin: + g++ -dynamiclib -undefined dynamic_lookup $(DARWINCFLAGS) $(DARWININCLUDE) $(CFLAGS) $(LDFLAGS) -o $*.pd_darwin $*.cpp |