[PD] Successfully compiled Mac OS X Intel externals
Stefano Papetti
papetti at sci.univr.it
Fri Sep 22 09:48:31 CEST 2006
Hi,
I'm sorry but at present time our MacBook is away so I can't try it out.
I'd like to build universal binaries in the near future but I have to
study Apple's documentation about them... It should be pretty simple:
compile 2 kind of file object (one with the -arch i386 flag and the other
with ppc) and them merge them at linking time. If I'm not wrong, the
makefiles provided with Pd 0.40 for Mac OS X 10.4, do exactly that.
Best,
Stefano
> Is the -arch required? Could you build a native build by omitting
> the -arch flag? How about building fat binaries?
>
> It looks to me that the only thing different from the old style is
> the -arch flag.
>
> .hc
>
> On Sep 21, 2006, at 2:56 AM, Stefano Papetti wrote:
>
>> Hi all,
>>
>> it seems that some people still have doubts about building
>> externals for
>> Mac OS X... so, last week I successfully compiled a few externals
>> for Mac
>> OS X Intel and PPC.
>> Here are the important parts from one of my makefiles (Intel Mac):
>>
>> MACOSXCFLAGS = -DMACOSX -DPD
>>
>> OPTIM = -O2
>> PARANOID = -Wall -W -Wstrict-prototypes \
>> -Wno-unused -Wno-parentheses -Wno-switch
>>
>> MACOSXSOUNDINCLUDE = -I$(RESOS)/modal_object -I$(RESOS)/
>> waveguide_object
>> -I$(RESOS)/inertial_object \
>> -I$(INTERS)/impact_interactor -I$(INTERS)/linpact_interactor
>> -I$(INTERS)/friction_interactor
>>
>> CFLAGS = $(MACOSXCFLAGS) $(MACOSXINCLUDE) $(MACOSXSOUNDINCLUDE) $
>> (OPTIM)
>> $(PARANOID)
>>
>> TARGET = friction_2modalb~
>>
>> OBJ = friction_interactor.o modal_obj_b.o matrix_calc.o
>>
>> all: $(TARGET).pd_darwin install
>>
>> $(TARGET).pd_darwin: $(TARGET).o $(OBJ)
>> cd $(OBJDIR) ; \
>> $(CC) -arch i386 -bundle -undefined suppress -flat_namespace \
>> -o $(TARGET).pd_darwin $(TARGET).o $(OBJ) -lm
>>
>> $(TARGET).o: $(TARGET).c \
>> pd_modules.h \
>> friction_interactor.h \
>> modal_obj_b.h \
>> matrix_calc.h
>>
>> install:
>> -strip -x $(OBJDIR)/$(TARGET).pd_darwin
>> -mv $(OBJDIR)/$(TARGET).pd_darwin $(MACOSXBINDIR)
>>
>> %.o: %.c \
>> pd_modules.h
>> [ -d $(TOP)/obj_macosx ] || mkdir $(TOP)/obj_macosx
>> $(CC) -g $(CFLAGS) -c -o $(OBJDIR)/$@ $<
>>
>>
>> and to compile on a G4 I just changed -arch i386 to -arch ppc.
>> They work great!
>>
>> Hope this helps.
>>
>> Greetings,
>> Stefano
>>
>>
>>
>> _______________________________________________
>> PD-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/
>> listinfo/pd-list
>
>
> ------------------------------------------------------------------------
>
> The arc of history bends towards justice. - Dr. Martin Luther
> King, Jr.
>
>
More information about the Pd-list
mailing list