#
GRASP_HOME=/home/ballen/public_html/grasp-distribution/GRASP
# edit to the name of your C compiler:
CC = cc
# edit to include compilation flags that you desire:
# speed and optimization
# for fast execution on Sparc Ultra II chips
# CFLAGS= -fast -xO4 -dalign -xarch=v8plusa
# debugging and developement
# CFLAGS=-g -dalign -xarch=v8plusa
# CFLAGS= -fast
CFLAGS=-g -dalign -xarch=v8plusa
# edit to point to directory containing the Numerical Recipes library
RECIPES_LIB=/usr/local/recipes/lib
# edit to give the name of the numerical recipes library you wish to use:
# profiling
# LRECIPES=recipes_cp
# speed and optimization
# LRECIPES=recipes_c
# debugging and developement
LRECIPES=recipes_cg
# If you want to build the MPI code, set this variable to true, else to false
# If it is set to false, all the MPI defines below are ignored.
BUILD_MPI = true
# BUILD_MPI = false
# edit to give the name of your local MPI C compiler (and any flags)
# linking the MPI/MPE libraries.
MPICC = /usr/local/mpi/bin/mpicc -mpilog -g
# edit to give the names/paths of the MPI/MPE libraries you wish to use:
# if you do not want MPI/MPE, values are irrelevant (set to blank):
# You MAY need to include paths as well
# MPI_LIBS = -L /usr/local/mpi/lib/solaris/ch_p4 -lmpe -lpmpi -lmpi
# edit to point to the MPI/MPE include directory
MPI_INCLUDES=-I/usr/local/mpi/include
#If you have the GL/MESA libraries installed then you should set this
#variable to true. This library is used to display time frequency maps.
# HAVE_GL = false
HAVE_GL = true
XLIBS = -L/usr/X11/lib -L/usr/X11R6/lib -lX11 -lXext -lXmu -lXt -lXi -lSM -lICE
GL_LIBS = -L/usr/local/Mesa/Mesa-3.0/lib -lMesaGLU -lMesaGL $(XLIBS)
GL_I=-I/usr/local/Mesa/Mesa-3.0/include -I/usr/local/Mesa/Mesa-3.0/include/GL
# If you want to build code that depends upon the FRAME libraries,
# set this variable to true, else to false
# If it is set to false, the FRAME define is ignored
# BUILD_FRAME = false
BUILD_FRAME = true
# edit to point to the directory containing the FRAME directories
# include and lib. The required files are include/FrameL.h and
# lib/libFrame.a
FRAME_DIR=/usr/local/frame
# If you want to build code that will run on a real-time system (in the 40-meter lab)
# and gets the file names from there, you will need to have a set
# of epics libraries and include files available.
# unless you want to do this, please leave the following lines commented out!
# directories containing epics includes/libraries
# EPICS_INCLUDES=-I/home/ballen/epics2 -I/home/ballen/epics1
# EPICS_LIBS=-L/home/ballen/epics2 -L/home/ballen/epics1 -D_POSIX_PTHREAD_SEMANTICS -lezca -lca -lCom -lnsl -lsocket -ldl -lintl -lposix4
# BUILD_REALTIME = -DREALTIME
WITH_CLAPACK = true
#WITH_CLAPACK = false
# claplack library directory
CLAPACK_LIB=/usr/local/CLAPACK/
#
# Name of clapack and blas library
LCLAPACK=lapack_solaris
LBLAS=blas_solaris
# Sun
# LCLAPACK=libblas_solaris.a
# LBLAS=liblapack_solaris.a
# f2c library directory
F2C_LIB=/usr/local/CLAPACK/F2CLIBS
LF2C=F77
LF2CI=I77
F2C_INC=/usr/local/CLAPACK/F2CLIBS
CLAPACK_LIBS=-L$(CLAPACK_LIB) -l$(LCLAPACK) -l$(LBLAS) -L$(F2C_LIB) -l$(LF2C) -l$(LF2CI)
# The GRASP code includes some inline optimization tricks which speed
# up the code by having our own implementations of certain standard
# functions like pow(x,1.0/3.0) and sin and cos. This is at a price - these
# functions are less accurate than the routines that they replace.
# You should only uncomment the following lines if you are doing production
# work, and then only after verifying that the inline functions are
# sufficiently accurate for your purposes
# DEFINES = -DINLINE_CUBEROOT -DINLINE_TRIGS
# optimization for the Intel Paragon Supercomputer (w/CLASSPACK library)
# OPTIMIZED_OBJECTS=$(GRASP_HOME)/src/optimization/paragon/realft_paragon_risky.o
# OPTIMIZED_LIBS=-lkmath
# optimization for the Sparc (w/Sun Performance Library)
# OPTIMIZED_OBJECTS=$(GRASP_HOME)/src/optimization/sparc/realft_sparc.o
# OPTIMIZED_LIBS=-L/usr1/SUNWspro/SC4.2/lib -xlic_lib=sunperf
# optimization using FFTW (a public-domain optimized fft routine: see src/optimization/fftw2/README)
# NOTE THIS IS FASTER THAN SUN'S PERFORMANCE LIBRARY!
OPTIMIZED_OBJECTS=$(GRASP_HOME)/src/optimization/fftw2/realft_fftw.o
OPTIMIZED_LIBS=-L/usr/local/fftw-2.1.1/lib -lfftw
# optimization for SGI R10000 CPU machines (w/Cray-SGI computational library): see src/optimization/sgi/
# OPTIMIZED_OBJECTS=$(GRASP_HOME)/src/optimization/sgi/realft_sgi.o
# OPTIMIZED_LIBS= -lcomplib.sgimath
# If you want to build code that depends upon the GRtoolbox,
# set this variable to true, else to false
# If it is set to false, the varriables MEX, MEXFLAGS, and
# EXT varriables are ignored.
#
# BUILD_GRTOOLBOX = false
BUILD_GRTOOLBOX = true
# edit to the name of your mex compiler:
MEX = mex
# edit to include compilation flags that you desire:
# debugging and developement
MEXFLAGS= -g
# speed and optimization
#MEXFLAGS= -O
# Set the EXT varriable to indicate your platform.
# Mex-files have different filenames for different
# platforms.
#
# Alpha
#EXT = axp
# HP9000 series 700
#EXT = mexhp7
# IBM RS6000
#EXT = mexrs6
# Linux
#EXT = lx
# SGI
#EXT = sg
# SGI 6.4
#EXT = sg64
# Solaris
EXT = sol
# SunOS4x
#EXT = 4
GRASP_I=$(GRASP_HOME)/include
#############################################################################
# THE REGION ABOVE THIS SPACE IS FILLED IN BY InstallGRASP #
#############################################################################
INCLUDES= -I$(GRASP_I)
all: utility.o GR_error.o multitaper.o frameinterface.o utctime.o
utctime.o: utctime.c $(GRASP_I)/grasp.h
$(CC) $(CFLAGS) $(INCLUDES) -c utctime.c
ar -vr $(GRASP_HOME)/lib/libgrasp.a utctime.o
utility.o: utility.c $(GRASP_I)/grasp.h
$(CC) $(CFLAGS) $(INCLUDES) -c utility.c
ar -vr $(GRASP_HOME)/lib/libgrasp.a utility.o
GR_error.o: GR_error.c $(GRASP_I)/grasp.h
$(CC) $(CFLAGS) $(INCLUDES) -c GR_error.c
ar -vr $(GRASP_HOME)/lib/libgrasp.a GR_error.o
multitaper.o: multitaper.c $(GRASP_I)/grasp.h
$(CC) $(CFLAGS) $(INCLUDES) -c multitaper.c
ar -vr $(GRASP_HOME)/lib/libgrasp.a multitaper.o
# The nasty-looking awk script here sets a variable called
# FRAMELIB_VERSION_INT equal to 100 times the value of the macro
# FRAMELIB_VERSION in FrameL.h . So for example if FRAMELIB_VERSION is
# set to 2.37 then FRAMELIB_VERSION_INT=237. This integer variable is
# then used in conditional compilation statements in the code. If there
# is an easier way, please tell me (ballen@dirac.phys.uwm.edu)! You
# can not used floating point conditionals in the C-preprocessor.
frameinterface.o: frameinterface.c $(GRASP_I)/grasp.h
if [ '$(BUILD_FRAME)' = 'true' ]; \
then \
FRAMELIB_VERSION_INT=`cat $(FRAME_DIR)/include/FrameL.h | head | \
awk '{ if ($$0~/define FRAMELIB_VERSION/) print (100 * $$3 )}'`;\
echo FRAMELIB_VERSION_INT set to $$FRAMELIB_VERSION_INT;\
$(CC) -DFRAMELIB_VERSION_INT=$$FRAMELIB_VERSION_INT $(CFLAGS) $(BUILD_REALTIME) $(INCLUDES) $(EPICS_INCLUDES) -I$(FRAME_DIR)/include -c frameinterface.c; \
ar -vr $(GRASP_HOME)/lib/libgrasp.a frameinterface.o ;\
fi
# experimental data server
#dataserver.o: dataserver.c $(GRASP_I)/grasp.h
# $(CC) $(CFLAGS) $(INCLUDES) -c dataserver.c
# ar -vr $(GRASP_HOME)/lib/libgrasp.a dataserver.o