hi cyrille and frank,
it was not so easy on osx, I got an error with -export_dynamic because gcc does not know this flag on osx. then I tried to remove it, but some other errors showed up. I then looked how gem gets compiled on my machine and took "inspiration" from there to finally get an mscube compiling as a standalone gem external on osx: here are the flags that I used:
g++ -c -I/sw/include -g -O2 -fPIC -freg-struct-return -Os -falign-loops=32 -falign-functions=32 -falign-jumps=32 -funroll-loops -ffast-math -mmmx -fpascal-strings -I.. -I/Users/marius/devel/pd-rsync/pd-extended/Gem/src -I/Users/marius/devel/pd-rsync/pd-extended/pd/src mscube.cpp -o mscube.o
g++ -o mscube.pd_darwin -dynamiclib -mmacosx-version-min=10.3 -undefined dynamic_lookup -framework QuickTime -framework Carbon -framework AGL -framework OpenGL ./*.o -L/sw/lib -ldl -lz -lm -lpthread -L/Users/marius/devel/pd-rsync/pd-extended/pd/bin
rm -f *.o
I am not sure if I need all of these flags and how to write a beautiful makefile with variables, but with some help, I hope I will figure out. with the above information, do you think it would be possible to have one makefile for linux and darwin?
marius.
cyrille henry wrote:
hello,
Frank Barknecht a écrit :
Hallo, chris clepper hat gesagt: // chris clepper wrote:
C++ - Jamie did a lot of this for his personal use.
I have not used luagl, but I suspect it will not be comparable to C in speed.
luagl is not as fast as C, but it's already much faster than using lots of separators or double gemheads. Regarding Gem-externals: Does anyone have a simple template project how to write and compile a custom Gem external? This could be very useful, but I'm a bit confused how to do this in a simple way.
use a gem object (like cube). search and replace "cube" by the name of your object in both the ccp and h file. use this makefile (adjust the name of the file / src directory). it should compile.
cyrille
Ciao
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
hi, here is the default makefile that I came up with. I guess some parts are intel related (and should be removed?), maybe someone wants to look at it. it works on 10.5 intel. marius.
marius schebella wrote:
hi cyrille and frank,
it was not so easy on osx, I got an error with -export_dynamic because gcc does not know this flag on osx. then I tried to remove it, but some other errors showed up. I then looked how gem gets compiled on my machine and took "inspiration" from there to finally get an mscube compiling as a standalone gem external on osx: here are the flags that I used:
g++ -c -I/sw/include -g -O2 -fPIC -freg-struct-return -Os -falign-loops=32 -falign-functions=32 -falign-jumps=32 -funroll-loops -ffast-math -mmmx -fpascal-strings -I.. -I/Users/marius/devel/pd-rsync/pd-extended/Gem/src -I/Users/marius/devel/pd-rsync/pd-extended/pd/src mscube.cpp -o mscube.o
g++ -o mscube.pd_darwin -dynamiclib -mmacosx-version-min=10.3 -undefined dynamic_lookup -framework QuickTime -framework Carbon -framework AGL -framework OpenGL ./*.o -L/sw/lib -ldl -lz -lm -lpthread -L/Users/marius/devel/pd-rsync/pd-extended/pd/bin
rm -f *.o
I am not sure if I need all of these flags and how to write a beautiful makefile with variables, but with some help, I hope I will figure out. with the above information, do you think it would be possible to have one makefile for linux and darwin?
marius.
cyrille henry wrote:
hello,
Frank Barknecht a écrit :
Hallo, chris clepper hat gesagt: // chris clepper wrote:
C++ - Jamie did a lot of this for his personal use.
I have not used luagl, but I suspect it will not be comparable to C in speed.
luagl is not as fast as C, but it's already much faster than using lots of separators or double gemheads. Regarding Gem-externals: Does anyone have a simple template project how to write and compile a custom Gem external? This could be very useful, but I'm a bit confused how to do this in a simple way.
use a gem object (like cube). search and replace "cube" by the name of your object in both the ccp and h file. use this makefile (adjust the name of the file / src directory). it should compile.
cyrille
Ciao
PD-list@iem.at mailing list UNSUBSCRIBE and account-management ->
PD_DIR = /Users/marius/pd/src GEM_DIR = /Users/marius/Gem/src
LIBS = -lm -L/sw/lib -ldl -lz -lm -lpthread -dynamiclib -undefined dynamic_lookup
# build flags
INCLUDE = -I$(PD_DIR) -I. -I$(GEM_DIR) -I/sw/include CPPFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer -ffast-math \ -Wall -W -Wno-unused -Wno-parentheses -Wno-switch -g \ -c -fPIC -freg-struct-return -Os -falign-loops=32 -falign-functions=32 -falign-jumps=32 -mmmx -fpascal-strings
all: test.pd_darwin rm -f *.o
.SUFFIXES: .pd_darwin
clean: rm -f *.o rm -f *.pd_darwin
.cpp.o: g++ $(CPPFLAGS) $(INCLUDE) -o $*.o -c $*.cpp
.cpp.pd_darwin: g++ $(CPPFLAGS) $(INCLUDE) -o $*.o -c $*.cpp g++ -o $*.pd_darwin $*.o $(LIBS) rm -f *.o