#
# platform_specific_includes.mk.x86_64-darwin
#
# This file is included in the External Function Makefiles and defines
# platform specific macros
# ACM 2/2001 debug flags

INCLUDES        = -I. -I$(TMAP_LOCAL)/include

FINCLUDES       = -I. -I../ef_utility -I../ef_utility/ferret_cmn


CCSHFLAG        =
CC              = gcc
RANLIB          = /usr/bin/ranlib
CFLAGS          = -fPIC -arch x86_64 -c -u -DDARWIN -O2 $(INCLUDES)
FC              = gfortran
F77		= gfortran
F77SHFLAG       = -dynamiclib
FFLAGS          = -fPIC -c -assume no2underscores -assume nobscc -zero -noautomatic -extend-source 132 -heap-arrays 10 $(FINCLUDES)
LD		= gcc
LD_DYN_FLAGS    = -arch x86_64 -dynamiclib -undefined dynamic_lookup
SYSLIBS         = -lc

CPP             = cpp
CPP_FLAGS       = -P -traditional $(INCLUDES)
CFLAGS_DEBUG	= -g -Ddebug
FFLAGS_DEBUG	= -g -Ddebug
FER_LOCAL_EXTFCNS = /usr/local/src/FERRET/external_functions/libs

.F.so:
	$(FC) $(FFLAGS) $(<F)
	$(LD) $(LD_DYN_FLAGS) $*.o -o $*.so
