Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

determing architecture in a makefile

I have a program that I'd like to build on both intel and ppc Macs running Leopard.

I'd like to have my makefile handle the job. I tried to determine the architecture by ..

ARCH = $(if $(findstring i386,$(MACHTYPE)),i386,powerpc)

But within the makefile MACHTYPE is empty. From the terminal, I get what I'd expect.

$ echo $MACHTYPE
i386-apple-darwin9.0

My eventual goal is to define a library for g95

FLIB = -L/sw/lib/gcc-lib/$(ARCH)-apple-darwin9/4.0.3/ -lf95

If anyone can help, I'd appreciate it.

TiA

Intel MacBook Pro, G4 Powerbook, Mac OS X (10.5.7)

Posted on Aug 4, 2009 7:36 PM

Reply
11 replies

determing architecture in a makefile

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.