/*
 * Local configuration file for libastetool.a
 */

ADSOFT = /adsoft

/* if you want to turn on debug falgs, define here */
#define PassCDebugFlags

/* path to install libraries */
INSTALL_LIB_PATH = $(TOP)/$(EXT)

/* path to install executable binaries */
INSTALL_BIN_PATH = $(TOP)/$(EXT)/bin

/*
// CFITSIO
*/
CFITSIO_DIR = ${ADSOFT}/cfitsio/3.060
/*   where fitsio.h exists */
CFITSIO_INC = ${CFITSIO_DIR}/include
/*   CFITSIO link option */
CFITSIO_LNK = -L${CFITSIO_DIR}/${EXT} -lcfitsio

/*
// COM + CLI (only required to compile tools directory)
*/
COM_CLI_DIR = ${ADSOFT}/com_cli/2.06
READLINE_DIR = ${ADSOFT}/readline/5.0
/*   where cli.h, com.h exists */
COM_CLI_INC = ${COM_CLI_DIR}/include
/*   COM + CLI [+ readline] link option */
/*   specify libreadline.a for MacOSX Tiger, which has system BSD readline */
COM_CLI_LNK = -L${COM_CLI_DIR}/${EXT} -lCOM -lCLI ${READLINE_DIR}/${EXT}/libreadline.a -ltermcap

/*
// ASTETOOL (only required to compile tools directory)
*/
ASTETOOL_DIR = ${ADSOFT}/astetool/1.86
/*   where aste_*.h exists */
ASTETOOL_INC = ${ASTETOOL_DIR}/include
/*   ASCATOOL link option */
ASTETOOL_LNK = -L${ASTETOOL_DIR}/${EXT} -lastetool

/* Architecture dependent definitions */

#if defined(AlphaArchitecture)
CDEBUGFLAGS = -O -g3
#else
CDEBUGFLAGS = -O3 -g -Wall
#endif

#if defined(LinuxArchitecture)
LIBSYS = -lg2c
#endif

#if defined(DarwinArchitecture)
EXTRA_DEFINES = -fno-common
INSTALLFLAGS = -c
LIBSYS = -L/sw/lib -lg2c
#endif

#if defined(i386DarwinArchitecture)
CC = gcc
/*#define HasG77*/
/*#define HasIFORT*/
#define HasGfortran
/*#define HasG95*/
#if defined(HasIFORT)
FC = ifort
IFORT_LIB = /opt/intel/fc/9.1.030/lib/lib
FFLAGS = -g -w
LIBSYS = -ldl $(IFORT_LIB)ifport.a $(IFORT_LIB)ifcore.a $(IFORT_LIB)irc.a $(IFORT_LIB)irc_s.a $(IFORT_LIB)imf.a
#elif defined(HasGfortran)
FC = gfortran
FFLAGS = -g -Wall -fno-second-underscore -fno-f2c
LIBSYS = -lgfortran
#elif defined(HasG95)
FC = g95
FFLAGS = -g -Wall -fno-second-underscore
LIBSYS = -L/sw/lib -lf95
#else	/* default g77 */
FC = g77
FFLAGS = -g -O -Wall -fno-second-underscore -fno-f2c	/* optimization required for g77 bug */
LIBSYS = -L/sw/lib -lg2c
#endif
INSTALLFLAGS = -c
#endif

#if defined(UltrixArchitecture)
FFLAGS = -g
CDEBUGFLAGS = -g
LIBSYS=-lUfor -lfor -lutil -li -lots
#endif

#if defined(AlphaArchitecture)
LIBSYS = -lUfor -lfor -lFutil -lots
#endif

#if defined(SunArchitecture)
CDEBUGFLAGS = -O -g
FFLAGS = -O -g
#if (OSMajorVersion == 4)
LIBSYS = -L`echo /usr/lang/SC?.0` -lF77
#else
/*LIBSYS = -L/opt/SUNWspro/lib -lM77 -lF77 -lsunmath*/
FC = f95
#define HasF90
LIBSYS = -L/opt/SUNWspro/lib -lfsu -lfui -lf77compat -lsunmath
#endif
#endif

#if defined(cygwinArchitecture)
LIBSYS = -lg2c
#endif
