determing architecture in a makefile
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)