[PD] Successfully compiled Mac OS X Intel externals

Hans-Christoph Steiner hans at eds.org
Fri Sep 22 03:53:16 CEST 2006


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