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

INCLUDES        = -I. -I../ef_utility -I../ef_utility/ferret_cmn

CCSHFLAG        =
CC              = gcc
RANLIB          = /usr/bin/ranlib
CFLAGS          = -fPIC -Dlint -DVOID_SIGHANDLER -D_POSIX_VERSION -DFULL_GUI_VERSION -O2 -DX_REFRESH -DXT_CODE $(INCLUDES)
FC              = gfortran 
F77		= gfortran
F77SHFLAG       = 
FFLAGS          = -fPIC -Dunix -Dgfortran -fno-second-underscore -fno-backslash -fdollar-ok -ffixed-line-length-132 \
		  -fdefault-real-8 -fdefault-double-8 $(INCLUDES)
LD		= gcc
LD_DYN_FLAGS    = -dynamiclib -Wl,-undefined,dynamic_lookup  
SYSLIBS         = 

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

%.o : %.F
	$(FC) $(FFLAGS) -c $*.F -o $*.o

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

# gcc -dynamiclib -Wl,-undefined,dynamic_lookup -o add_9.dylib add_9.o
#    gcc -dynamiclib -Wl,-undefined,dynamic_lookup -o .so .o
