#****************************************************************************
#*			TAU Portable Profiling Package			   **
#*			http://www.cs.uoregon.edu/research/tau	           **
#****************************************************************************
#*    Copyright 1997-2002        				   	   **
#*    Department of Computer and Information Science, University of Oregon **
#*    Advanced Computing Laboratory, Los Alamos National Laboratory        **
#****************************************************************************
#######################################################################
##                  pC++/Sage++  Copyright (C) 1993,1995             ##
##  Indiana University  University of Oregon  University of Rennes   ##
#######################################################################
 
#######################################################################
# This is a sample Makefile that contains the Profiling and Tracing 
# options. Makefiles of other applications and libraries (not included 
# in this distribution) should include this Makefile.
# It defines the following variables that should be added to CFLAGS
# TAU_INCLUDE  	-  Include path for tau headers
# TAU_DEFS      -  Defines that are needed for tracing and profiling only.
# And for linking add to LIBS 
# TAU_LIBS	-  TAU Tracing and Profiling library libprof.a 
# 
# When the user needs to turn off tracing and profiling and run the 
# application without any runtime overhead of instrumentation, simply
# remove TAUDEFS and TAULIBS from CFLAGS and LIBS respectively but keep
# TAUINC.
#######################################################################

########### Automatically modified by the configure script ############
CONFIG_ARCH=x86_64
TAU_ARCH=x86_64
CONFIG_CC=gcc
CONFIG_CXX=g++
TAU_CC_FE=$(CONFIG_CC)
TAU_CXX_FE=$(CONFIG_CXX)

# Front end C/C++ Compilers
#BGL#TAU_CC_FE=gcc #ENDIF#
#BGL#TAU_CXX_FE=g++ #ENDIF#
#BGP#TAU_CC_FE=gcc #ENDIF#
#BGP#TAU_CXX_FE=g++ #ENDIF#
#CATAMOUNT#TAU_CC_FE=gcc #ENDIF#
#CATAMOUNT#TAU_CXX_FE=g++ #ENDIF#
#CRAYCNL#TAU_CC_FE=gcc #ENDIF#
#CRAYCNL#TAU_CXX_FE=g++ #ENDIF#
#CRAYXMT#TAU_CC_FE=/usr/bin/gcc #ENDIF#
#CRAYXMT#TAU_CXX_FE=/usr/bin/g++ #ENDIF#
##SC_GFORTRAN#TAU_CC_FE=gcc #ENDIF#
##SC_GFORTRAN#TAU_CXX_FE=g++ #ENDIF#
##SC_PATHSCALE#TAU_CC_FE=gcc #ENDIF#
##SC_PATHSCALE#TAU_CXX_FE=g++ #ENDIF#


USER_OPT=-g -O2
EXTRADIR=
EXTRADIRCXX=
TAUROOT=$(PWD)/../..
TULIPDIR=
TAUEXTRASHLIBOPTS=
TAUGCCLIBOPTS=
TAUGCCLIBDIR=/usr/lib/gcc/x86_64-linux-gnu/4.4.3/
IFORTLIBDIR=
PERFSUITELINK=
TAUGFORTRANLIBDIR=
PAPIDIR=
PAPISUBDIR=
CHARMDIR=
PDTDIR=
PDTCOMPDIR=
DYNINSTDIR=
JDKDIR=
OPARIDIR=
EPILOGDIR=
EPILOGBINDIR=
EPILOGINCDIR=
EPILOGLIBDIR=
EPILOGEXTRALINKCMD=
SICORTEXLINK=
VAMPIRTRACEDIR=
VAMPIRTRACEINCS=
VAMPIRTRACELIBS=
VAMPIRTRACEMPILIBS=
SCOREPDIR=
SCOREPINCS=
SCOREPLIBS=
SCOREPMPILIBS=
KTAU_INCDIR=
KTAU_INCUSERDIR=
KTAU_LIB=
KTAU_KALLSYMS_PATH=/proc/kallsyms
PYTHON_INCDIR=
PYTHON_LIBDIR=
PERFINCDIR=
PERFLIBDIR=
PERFLIBRARY=
UPCNETWORK=
TAU_SHMEM_INC=
TAU_SHMEM_LIB=
TAU_CONFIG=
TAU_MPI_INC=
TAU_MPI_LIB=
TAU_MPI_FLIB=
TAU_MPILIB_DIR=
TAU_MPI_NOWRAP_LIB=
TAU_MPI_NOWRAP_FLIB=
FULL_CXX=/usr/bin/g++
FULL_CC=/usr/bin/gcc
TAU_PREFIX_INSTALL_DIR=$(PWD)/../..

TAU_BIN_DIR=$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/bin
TAU_INC_DIR=$(TAU_PREFIX_INSTALL_DIR)/include
TAU_LIB_DIR=$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/lib

#######################################################################

#OPARI#TAU_OPARI_TOOL=$(TAU_BIN_DIR)/opari        #ENDIF#
#ENABLE64BIT#ABI 	     = -mabi=64		  #ENDIF#
#ENABLEN32BIT#ABI 	     = -mabi=n32	  #ENDIF#
#ENABLE32BIT#ABI 	     = -mabi=32		  #ENDIF#

#######################################################################
#SP1#IBM_XLC_ABI	     = -q32 		  #ENDIF#
#SP1#IBM_GNU_ABI	     = -maix32 		  #ENDIF#
#IBM64#IBM_XLC_ABI	     = -q64 		  #ENDIF#
#IBM64#IBM_GNU_ABI	     = -maix64 		  #ENDIF#
#IBM64LINUX#IBM_XLC_ABI	     = -q64 		  #ENDIF#
#IBM64LINUX#IBM_GNU_ABI	     = -m64 		  #ENDIF#
#SUNX86_64#SUN_GNU_ABI       = -m64		  #ENDIF#
#SUNX86_64#SUN_CC_ABI        = -xarch=amd64       #ENDIF#
#MIPS32LINUX#SC_GNU_ABI	     = -mabi=n32 	  #ENDIF#
#MIPS32LINUX#SC_PATH_ABI     = -mabi=n32          #ENDIF#
#MIPS64LINUX#SC_GNU_ABI	     = -mabi=64 	  #ENDIF#
#MIPS64LINUX#SC_PATH_ABI     = -mabi=64           #ENDIF#
SC_ABI     	     = $(SC_GNU_ABI) 	  #ENDIF##GNU#
#USE_PATHCC#SC_ABI     	     = $(SC_PATH_ABI) 	  #ENDIF#
#MIPS32#ABI                  = $(SC_ABI) 	  #ENDIF#
#MIPS64#ABI                  = $(SC_ABI) 	  #ENDIF#

#USE_IBMXLC#IBM_ABI    	     = $(IBM_XLC_ABI) 	  #ENDIF#
IBM_ABI	     	     = $(IBM_GNU_ABI) 	  #ENDIF##GNU#
#SP1# ABI		     = $(IBM_ABI)	  #ENDIF#
#PPC64# ABI		     = $(IBM_ABI)	  #ENDIF#
#SOLARIS64#SUN_GNU_ABI	     = -mcpu=v9 -m64	  #ENDIF#
#SOLARIS64#SUN_CC_ABI	     = -xarch=v9 -xcode=pic32	  #ENDIF#
#SOL2CC#SUN_ABI	     	     = $(SUN_CC_ABI)	  #ENDIF#
SUN_ABI	     	     = $(SUN_GNU_ABI)	  #ENDIF##GNU#
#SOL2#ABI	     	     = $(SUN_ABI)	  #ENDIF#
#SUNX86_64#ABI		     = $(SUN_ABI)	  #ENDIF#
#FORCEIA32#ABI               = -m32#ENDIF#
#######################################################################
F90_ABI	= $(ABI) 
#IBM64_FORTRAN#F90_ABI	     = -q64 		  #ENDIF#
#######################################################################

#UPCC#TAU_UPCC= upcc "-inst-toolname=gasp-tau" -inst -network=$(UPCNETWORK) #ENDIF#

#UPCC#TAU_GASP_O=TauGASP.o #ENDIF#
#UPCC#TAU_GASPU_O=TauGASPU.o #ENDIF#
############# Standard Defines ##############
TAU_CC = $(CONFIG_CC) $(ABI) $(ISA)
TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA)
TAU_RUN_CC = $(FULL_CC) $(ABI) $(ISA)
#UPCC#TAU_RUN_CC = $(TAU_UPCC) #ENDIF#
TAU_RUN_CXX = $(FULL_CXX) $(ABI) $(ISA)
TAU_INSTALL = /bin/cp
TAU_SHELL = /bin/sh
LSX = .a
#############################################
# JAVA DEFAULT ARCH 
#############################################
JDKARCH                 = linux
#COMPAQ_ALPHA#JDKARCH   = alpha      #ENDIF#
#SOL2#JDKARCH           = solaris    #ENDIF#
#SGIMP#JDKARCH          = irix       #ENDIF#
#SP1#JDKARCH            = aix        #ENDIF#
#T3E#JDKARCH            = cray       #ENDIF#
#############################################
# JAVA OBJECTS
#############################################
#JAVA#TAU_JAVA_O 	= TauJava.o TauJAPI.o  #ENDIF#
#JAVA#TAUJAPI 	= Profile.class        #ENDIF#


#############################################
# OpenMP OBJECTS
#############################################
#OPENMP#OPENMP_O 	= OpenMPLayer.o #ENDIF#

#############################################
# Opari OBJECTS
#############################################
OPARI_O 	= TauKojakOpariDisable.o #ENDIF#
#OPARI#OPARI_O 	= TauOpari.o #ENDIF#
#KOJAKOPARI#OPARI_O 	= TauKojakOpari.o #ENDIF#
#EPILOG#OPARI_O 	=  #ENDIF#
#VAMPIRTRACE#OPARI_O 	=  #ENDIF#

#############################################
# CallPath OBJECTS
#############################################
#PROFILEPARAM#PARAM_O  = ProfileParam.o #ENDIF#


#############################################
# DYNINST DEFAULT ARCH
#############################################
DYNINST_PLATFORM 	= $(PLATFORM)


############# OpenMP Fortran Option ########
#OPENMP#TAU_F90_OPT = -mp                   #ENDIF#
#SOL2CC_OPENMP#TAU_F90_OPT = -xopenmp       #ENDIF#
#SUNCC_OPENMP#TAU_F90_OPT = -xopenmp=parallel       #ENDIF#
#COMPAQCXX_OPENMP#TAU_F90_OPT = -omp        #ENDIF#
#IBMXLC_OPENMP#TAU_F90_OPT = -qsmp=omp -qthreaded   #ENDIF#
#GUIDE#TAU_F90_OPT =                        #ENDIF#
#PGIOPENMP#TAU_F90_OPT = -mp                #ENDIF#
#INTELOPENMP#TAU_F90_OPT = -openmp          #ENDIF#
#HITACHI_OPENMP#TAU_F90_OPT =               #ENDIF#
#GNUOPENMP#TAU_F90_OPT = -fopenmp          #ENDIF#

#ZEPTO_GFORTRAN#TAU_F90_OPT = -fno-underscoring     #ENDIF#

#THREADSAFE_COMPILERS#TAU_R         =_r     #ENDIF#

############# Fortran Compiler #############
#GNU_FORTRAN#TAU_F90         = g77              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#GNU_GFORTRAN#TAU_F90         = gfortran              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#G95_FORTRAN#TAU_F90         = g95              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#SC_GFORTRAN#TAU_F90         = scgfortran              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#SGI_FORTRAN#TAU_F90         = f90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#IBM_FORTRAN#TAU_F90         = xlf90$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#BGP#TAU_F90         = mpixlf90$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#BGP_GFORTRAN#TAU_F90         = mpif90    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#BGL#TAU_F90         = blrts_xlf90$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#IBM64_FORTRAN#TAU_F90       = xlf90$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#IBMXLFAPPLE#TAU_F90       = xlf90$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#CRAY_FORTRAN#TAU_F90        = f90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#CRAY_X1_FORTRAN#TAU_F90     = ftn              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#PGI_FORTRAN#TAU_F90         = pgf90            $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#PGI_CATAMOUNT#TAU_F90         = qk-pgf90         $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#CATAMOUNT#TAU_F90         = ftn         $(F90_ABI) $(TAU_F90_OPT) #ENDIF#
#ABSOFT_FORTRAN#TAU_F90      = f90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#LAHEY_FORTRAN#TAU_F90      = lf95              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#LAHEY64_FORTRAN#TAU_F90      = lf95              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#NAGWARE_FORTRAN#TAU_F90      = f95              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#FUJITSU_FORTRAN#TAU_F90     = F90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#FUJITSU_SOLARIS#TAU_F90     = f90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#SUN_FORTRAN#TAU_F90         = f90              $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#COMPAQ_FORTRAN#TAU_F90      = f90              $(F90_ABI)  $(TAU_F90_OPT)  #ENDIF#
#KAI_FORTRAN#TAU_F90         = guidef90         $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#HP_FORTRAN#TAU_F90          = f90 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#HITACHI_FORTRAN#TAU_F90     = f90 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#INTEL_FORTRAN#TAU_F90       = efc 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#INTEL32_FORTRAN#TAU_F90     = ifc 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#INTELIFORT#TAU_F90     = ifort 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#PATHSCALE_FORTRAN#TAU_F90     = pathf90         $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#SC_PATHSCALE#TAU_F90     = scpathf95         $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#OPEN64ORC_FORTRAN#TAU_F90     = orf90         $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#NEC_FORTRAN#TAU_F90         = f90 	        $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#CRAYCNL#TAU_F90         = ftn            $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#ZEPTO_GFORTRAN#TAU_F90         = /bgsys/drivers/ppcfloor/gnu-linux/bin/powerpc-bgp-linux-gfortran    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#

TAU_F77 = $(TAU_F90)
#IBM_FORTRAN#TAU_F77         = xlf$(TAU_R)    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#
#BGP#TAU_F77         = mpixlf77_r    $(F90_ABI) $(TAU_F90_OPT)   #ENDIF#



############# Portable F90 Options #############
#IBM64_FORTRAN#TAU_F90_FIXED      = -qfixed  #ENDIF#
#IBM_FORTRAN#TAU_F90_FIXED      = -qfixed  #ENDIF#
#IBM_FORTRAN#TAU_F90_SUFFIX     = -qsuffix=f=f90  #ENDIF#
#IBMXLFAPPLE#TAU_F90_FIXED      = -qfixed  #ENDIF#
#IBMXLFAPPLE#TAU_F90_SUFFIX     = -qsuffix=f=f90  #ENDIF#
#IBM64_FORTRAN#TAU_F90_SUFFIX     = -qsuffix=f=f90  #ENDIF#

############# Profiling Options #############
PROFILEOPT1           = -DPROFILING_ON        #ENDIF##PROFILE#
#PAPI#PROFILEOPT3              = -DTAU_PAPI -I$(PAPIDIR)/src -I$(PAPIDIR)/include #ENDIF#
#PAPI#PAPI_O       	       = PapiLayer.o 	       #ENDIF#
#PROFILEOPT4
#PROFILESTATS#PROFILEOPT5      = -DPROFILE_STATS       #ENDIF#
#DEBUGPROF#PROFILEOPT6         = -DDEBUG_PROF          #ENDIF#
#STDCXXLIB#PROFILEOPT7         = -DTAU_STDCXXLIB       #ENDIF#
#CRAYX1CC#PROFILEOPT7          = #ENDIF#
#CRAYCC#PROFILEOPT7            = #ENDIF#
#INTELTFLOP#PROFILEOPT8        = -DPOOMA_TFLOP         #ENDIF#
#NORTTI#PROFILEOPT9            = -DNO_RTTI             #ENDIF#
#RTTI#PROFILEOPT9              = -DRTTI                #ENDIF#
#USE_CC#PROFILEOPT10           = -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#CRAYCNL_SHARED#PROFILEOPT10           = -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF#
PROFILEOPT10              = -DTAU_GNU -DTAU_DOT_H_LESS_HEADERS #ENDIF##GNU#
#CRAYXMT#PROFILEOPT10              = -DTAU_CRAYXMT -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#APPLECXX#PROFILEOPT10         = -DTAU_GNU  -DTAU_DOT_H_LESS_HEADERS -fPIC #ENDIF#
#SOL2CC#PROFILEOPT10           = -DTAU_SOL2CC  -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#SUNCC#PROFILEOPT10            = -DTAU_SOL2CC  -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#USE_PATHCC#PROFILEOPT10       = -DTAU_DOT_H_LESS_HEADERS -DTAU_PATHSCALE #ENDIF#
#OPEN64ORC#PROFILEOPT10        = -DTAU_DOT_H_LESS_HEADERS -DTAU_OPEN64ORC -fpic  #ENDIF#
#PROFILEOPT11
#PGI1.7#PROFILEOPT12	       = -DPGI 		       #ENDIF#
#CRAYKAI#PROFILEOPT12	       = -DCRAYKAI	       #ENDIF#
#HP_FORTRAN#PROFILEOPT12       = -DHP_FORTRAN	       #ENDIF#
#CRAYCC#PROFILEOPT13	       = -h instantiate=used -DCRAYCC -DTAU_DOT_H_LESS_HEADERS  #ENDIF#
#CRAYX1CC#PROFILEOPT13	       = -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#SGICC#TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(USER_OPT) -LANG:std  #ENDIF#
#INTELCXXLIBICC#TAU_CXX = $(CONFIG_CXX) $(ABI) $(ISA) $(USER_OPT) -cxxlib-icc #ENDIF#
#PTHREAD_AVAILABLE#PROFILEOPT15 = -DPTHREADS -DTAU_PTHREAD_PRELOAD       #ENDIF#
#COMPAQCXX_PTHREAD#PROFILEOPT15 = -DPTHREADS -pthread -DTAU_PTHREAD_PRELOAD #ENDIF#
#TAU_SPROC#PROFILEOPT15 	= -DTAU_SPROC  	       #ENDIF#
#TAU_PAPI_THREADS#PROFILEOPT15 	= -DTAU_PAPI_THREADS  	       #ENDIF#
#TULIPTHREADS#PROFILEOPT16 = -DTULIPTHREADS            #ENDIF#
#TRACE#TRACEOPT		       = -DTRACING_ON 	       #ENDIF#
#KTAU#KTAU_O			= TauKtau.o KtauProfiler.o KtauSymbols.o  #ENDIF#
#KTAU_MERGE#KTAU_MERGE_O      	= KtauFuncInfo.o KtauMergeInfo.o ktau_syscall.o  #ENDIF#
#KTAU_SHCTR#KTAU_SHCTR_O      	= KtauCounters.o  #ENDIF#
#MPITRACE#TRACEOPT	 = -DTAU_MPITRACE -DTRACING_ON #ENDIF#
#PTHREAD_AVAILABLE#THR_O       = PthreadLayer.o        #ENDIF#
#TAU_PAPI_THREADS#THR_O       = PapiThreadLayer.o        #ENDIF#
#TAU_SPROC#THR_O       	       = SprocLayer.o        #ENDIF#
#JAVA#THR_O       	       = JavaThreadLayer.o     #ENDIF#
#TULIPTHREADS#THR_O       = TulipThreadLayer.o         #ENDIF#
PLATFORM_O       = TauLinuxTimers.o       #ENDIF##LINUXTIMERS#
#TULIPTHREADS#PROFILEOPT17  = -I$(TULIPDIR)/include -I$(TULIPDIR)/Tuliplib   #ENDIF#
#SMARTS#PROFILEOPT17  = -I$(TULIPDIR)/include -I$(TULIPDIR)/lib -I$(TULIPDIR)/machine-specific/$(HOSTTYPE)  #ENDIF#
#SMARTS#PROFILEOPT18  = -DSMARTS   #ENDIF#
#KAI#PROFILEOPT19  	       = -DKAI  -DTAU_DOT_H_LESS_HEADERS #ENDIF#
#USE_DECCXX#PROFILEOPT19  	       = -DTAU_DOT_H_LESS_HEADERS   #ENDIF#
#SGICC#PROFILEOPT19  	       = -DTAU_DOT_H_LESS_HEADERS   #ENDIF#
#USE_INTELCXX#PROFILEOPT19     = -DTAU_DOT_H_LESS_HEADERS  #ENDIF#
#USE_NECCXX#PROFILEOPT19     = -DTAU_DOT_H_LESS_HEADERS   #ENDIF#
#PGI#PROFILEOPT19  	       = -DTAU_DOT_H_LESS_HEADERS   -fPIC #ENDIF#
#APPLEPGI#PROFILEOPT19  	       = -DTAU_DOT_H_LESS_HEADERS   -DTAU_APPLE_PGI #ENDIF#
#ACC#PROFILEOPT19  	       = -AA +z -DTAU_DOT_H_LESS_HEADERS -DTAU_HPUX #ENDIF#
#FUJITSU#PROFILEOPT19  	       = -DFUJITSU -DTAU_DOT_H_LESS_HEADERS   #ENDIF#
#KAINOEX#PROFILEOPT20  	       = --no_exceptions   #ENDIF#
#SGICCNOEX#PROFILEOPT20  	       = -LANG:exceptions=off  #ENDIF#
#HPGNU#PROFILEOPT21	       = -fPIC #ENDIF#
#HITACHI#PROFILEOPT21	       = -DTAU_HITACHI #ENDIF#
#SP1#PROFILEOPT21	       = -D_POSIX_SOURCE -DTAU_AIX #ENDIF#
#SP1#PROFILEOPT21_SP1       = -D_POSIX_SOURCE -DTAU_AIX #ENDIF#
PROFILEOPT21_SP1	       = -DTAU_AIX #ENDIF##GNU#
#SP1#PROFILEOPT21       = $(PROFILEOPT21_SP1) #ENDIF#
#PPC64#TAU_PIC_PROFILEOPT21           = -qpic=large #ENDIF#
#BGL#TAU_PIC_PROFILEOPT21           = #ENDIF#
#USE_IBMXLC#PROFILEOPT21	       = -DTAU_DOT_H_LESS_HEADERS -DTAU_XLC $(TAU_PIC_PROFILEOPT21) #ENDIF#
#IBMXLCAPPLE#PROFILEOPT21	       = -DTAU_DOT_H_LESS_HEADERS -DTAU_XLC -DTAU_APPLE_XLC #ENDIF#
#JAVA#PROFILEOPT23	       = -DJAVA 		#ENDIF#
PROFILEOPT24 =
#JAVA#PROFILEOPT25 = -I$(JDKDIR)/include -I$(JDKDIR)/include/$(JDKARCH) #ENDIF#
#MPI#PROFILEOPT26 = -DTAU_MPI #ENDIF#
#MPI_THREADED#PROFILEOPT26 = -DTAU_MPI -DTAU_MPI_THREADED #ENDIF#
#OPENMP#PROFILEOPT27 = -mp -DTAU_OPENMP#ENDIF#
PROFILEOPT27 = #ENDIF##GNU#
#SOL2CC_OPENMP#PROFILEOPT27 = -xopenmp -DTAU_OPENMP#ENDIF#
#SUNCC_OPENMP#PROFILEOPT27 = -xopenmp=parallel -DTAU_OPENMP#ENDIF#
#SUNCC_OPENMP#PROFILEOPT27 = -xopenmp=parallel -DTAU_OPENMP#ENDIF#
#HITACHI_OPENMP#PROFILEOPT27 = -DTAU_OPENMP#ENDIF#
#COMPAQCXX_OPENMP#PROFILEOPT27 = -omp -DTAU_OPENMP#ENDIF#
#IBMXLC_OPENMP#PROFILEOPT27 = -qsmp=omp -qthreaded -DTAU_OPENMP #ENDIF#
#OPEN64_OPENMP#PROFILEOPT27 = -mp -DTAU_OPENMP #ENDIF#
#GUIDE#PROFILEOPT27 = -DTAU_OPENMP #ENDIF#
#PGIOPENMP#PROFILEOPT27 = -mp -D_OPENMP -DTAU_OPENMP -U_RWSTD_MULTI_THREAD -U_REENTRANT #ENDIF#
#INTELOPENMP#PROFILEOPT27 = -openmp -DTAU_OPENMP #ENDIF#
#GNUOPENMP#PROFILEOPT27 = -fopenmp -DTAU_OPENMP #ENDIF#
#OPARI#PROFILEOPT28 = #ENDIF#
#OPARI_REGION#PROFILEOPT28 = -DTAU_OPARI_REGION #ENDIF#
#OPARI_CONSTRUCT#PROFILEOPT28 = -DTAU_OPARI_CONSTRUCT #ENDIF#
#SGITIMERS#PROFILEOPT30         = -DSGI_TIMERS          #ENDIF#
#BGLTIMERS#PROFILEOPT30         = -DBGL_TIMERS -I/bgl/BlueLight/ppcfloor/bglsys/include #ENDIF#
#BGPTIMERS#PROFILEOPT30         = -DBGP_TIMERS -I/bgsys/drivers/ppcfloor/arch/include/common -I/bgsys/drivers/ppcfloor/arch/include -I/bgsys/drivers/ppcfloor/arch/include/spi #ENDIF#
#CRAYTIMERS#PROFILEOPT30         = -DCRAY_TIMERS          #ENDIF#
PROFILEOPT31       = -DTAU_LINUX_TIMERS    #ENDIF##LINUXTIMERS#
#ALPHATIMERS#PROFILEOPT31       = -DTAU_ALPHA_TIMERS    #ENDIF#
#CPUTIME#PROFILEOPT32           = -DCPU_TIME          #ENDIF#
#PAPIWALLCLOCK#PROFILEOPT33     = -DTAU_PAPI_WALLCLOCKTIME    #ENDIF#
#PAPIVIRTUAL#PROFILEOPT34       = -DTAU_PAPI_VIRTUAL    #ENDIF#
#SGICOUNTERS#PROFILEOPT35      = -DSGI_HW_COUNTERS     #ENDIF#
#EPILOG#PROFILEOPT36	       = -DTAU_EPILOG -I$(EPILOGINCDIR)	#ENDIF#
#SCALASCA#PROFILEOPT36	       = -DTAU_SCALASCA -DTAU_EPILOG -I$(EPILOGINCDIR)	#ENDIF#
#VAMPIRTRACEINTS#TAU_VAMPIRTRACEOPTS = -DTAU_64BITTYPES_NEEDED -DHAVE_INTTYPES_H #ENDIF#
#VAMPIRTRACE#PROFILEOPT36	       = -DTAU_VAMPIRTRACE $(VAMPIRTRACEINCS) $(TAU_VAMPIRTRACEOPTS)#ENDIF#
#PROFILECALLPATH#PROFILEOPT36  = -DTAU_CALLPATH #ENDIF#
#PROFILEPHASE#PROFILEOPT36  = -DTAU_CALLPATH -DTAU_PROFILEPHASE#ENDIF#
#SCOREP#PROFILEOPT36	       = -DTAU_SILC -DTAU_SCOREP $(SCOREPINCS) #ENDIF#
#PYTHON#PROFILEOPT37  = -I$(PYTHON_INCDIR) #ENDIF#
#NOCOMM#PROFILEOPT38  = -DTAU_NOCOMM #ENDIF#
#SETNODE0#PROFILEOPT40  = -DTAU_SETNODE0 #ENDIF#
#COMPENSATE#PROFILEOPT41  = -DTAU_COMPENSATE #ENDIF#
#DYNINST41##PROFILEOPT44  = -DTAU_DYNINST41BUGFIX #ENDIF#
# DyninstAPI v4.2.1 fixes the bug, so we don't need OPT44 anymore
#PROFILEMEMORY#PROFILEOPT45  = -DTAU_PROFILEMEMORY   #ENDIF#
#MPIGREQUEST#PROFILEOPT46  = -DTAU_MPIGREQUEST   #ENDIF#
#MPIOREQUEST#PROFILEOPT47  = -DTAU_MPIOREQUEST   #ENDIF#
#MPIDATAREP#PROFILEOPT48  = -DTAU_MPIDATAREP   #ENDIF#
#MPIERRHANDLER#PROFILEOPT49  = -DTAU_MPIERRHANDLER  #ENDIF#
#CATAMOUNT#PROFILEOPT50  = -DTAU_CATAMOUNT  #ENDIF#
#CRAYCNL#PROFILEOPT50  = -DTAU_CRAYCNL  #ENDIF#
#MPICONSTCHAR#PROFILEOPT51  = -DTAU_MPICONSTCHAR  #ENDIF#
#MPIATTR#PROFILEOPT52  = -DTAU_MPIATTRFUNCTION   #ENDIF#
#MPITYPEEX#PROFILEOPT53  = -DTAU_MPITYPEEX   #ENDIF#
#MPIADDERROR#PROFILEOPT54  = -DTAU_MPIADDERROR   #ENDIF#
#MPINEEDSTATUSCONV#PROFILEOPT55  = -DTAU_MPI_NEEDS_STATUS   #ENDIF#

#DEPTHLIMIT#PROFILEOPT56      = -DTAU_DEPTH_LIMIT       #ENDIF#
#TAU_CHARM#PROFILEOPT57 = -DTAU_CHARM -I$(CHARMDIR)/include #ENDIF#
#PROFILEHEADROOM#PROFILEOPT58  = -DTAU_PROFILEHEADROOM   #ENDIF#
PROFILEOPT60           = -DTAU_LARGEFILE -D_LARGEFILE64_SOURCE     #ENDIF##TAU_LARGEFILE#
#BGP#PROFILEOPT60           = -DTAU_LARGEFILE -D_LARGEFILE64_SOURCE #ENDIF#
# Omit the -D_LARGETFILE64_SOURCE till we can check the IBM crash
#SHMEM#PROFILEOPT61           = -DTAU_SHMEM #ENDIF#
#KTAU#PROFILEOPT62  = -DTAUKTAU -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -I$(KTAU_INCUSERDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF#
#KTAU_MERGE#PROFILEOPT63  = -DTAUKTAU_MERGE -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF#
#FREEBSD#PROFILEOPT64  = -DTAU_FREEBSD #ENDIF#
#PROFILEPARAM#PROFILEOPT65  = -DTAU_PROFILEPARAM #ENDIF#
#IBMMPI#PROFILEOPT66  = -DTAU_IBM_MPI #ENDIF#
#WEAKMPIINIT#PROFILEOPT67  = -DTAU_WEAK_MPI_INIT   #ENDIF#
#LAMPI#PROFILEOPT68 = -DTAU_LAMPI #ENDIF#
#MPICH_IGNORE_CXX_SEEK#PROFILEOPT68 = -DMPICH_IGNORE_CXX_SEEK #ENDIF#
#MPICH2_MPI_INPLACE#PROFILEOPT73 = -DTAU_MPICH2_MPI_IN_PLACE #ENDIF#

#MIPS32LINUX#PROFILEOPT74 = -DTAU_SICORTEX #ENDIF#
#MIPS64LINUX#PROFILEOPT74 = -DTAU_SICORTEX #ENDIF#
#TAU_BFD#PROFILEOPT75 = -DTAU_BFD #ENDIF#

#MPIFILE#PROFILEOPT76  = -DTAU_MPIFILE   #ENDIF#
#TAU_DEMANGLE#PROFILEOPT77 = -DHAVE_GNU_DEMANGLE #ENDIF#

#VAMPIRTRACE_5_7_API#PROFILEOPT78 = -DTAU_VAMPIRTRACE_5_7_API #ENDIF#

PROFILEOPT79 = -DHAVE_TR1_HASH_MAP #ENDIF##TAU_TR1_HASH_MAP#

MRNET_ROOT=
MRNET_INCLUDE=
MRNET_LIBS=
#MRNET#PROFILEOPT80 = -DTAU_EXP_UNIFY -DTAU_MONITORING #ENDIF#


############# RENCI Scalable Trace Lib Options #############
STFF_DIR=
SDDF_DIR=
#RENCI_STFF#PROFILEOPT69 = -DRENCI_STFF -I$(STFF_DIR)/include #ENDIF#
#RENCI_STFF#TAU_LINKER_OPT11 = -L$(STFF_DIR)/lib -lstff -L$(SDDF_DIR)/lib -lPablo $(TAU_MPI_LIB) #ENDIF#
#RENCI_STFF#RENCI_STFF_O = RenciSTFF.o    #ENDIF#

############# KTAU (again) #############
#KTAU_SHCTR#PROFILEOPT70  = -DTAUKTAU_SHCTR -DKTAU_USER_SRC_COMPILE -I$(KTAU_INCDIR) -DKTAU_INCUSERDIR=\"$(KTAU_INCUSERDIR)\" -DKTAU_KALLSYMS_PATH=\"$(KTAU_KALLSYMS_PATH)\" #ENDIF#
#KTAU#TAU_LINKER_OPT12 = -L$(KTAU_LIB) -lktau #ENDIF#

#MIPS32LINUX#PROFILEOPT71 =  -D_ABIN32=2 -D_MIPS_SIM=_ABIN32 #ENDIF#

#BGL#PROFILEOPT72 = -DTAU_BGL -I/bgl/BlueLight/ppcfloor/bglsys/include #ENDIF#
#BGP#PROFILEOPT72 = -DTAU_BGP -I/bgsys/drivers/ppcfloor/arch/include/common -I/bgsys/drivers/ppcfloor/arch/include -I/bgsys/drivers/ppcfloor/arch/include/spi #ENDIF#

#For F90 support for all platforms
FWRAPPER	       = TauFMpi.o       
#MPI2#MPI2EXTENSIONS	       = TauMpiExtensions.o       #ENDIF#
#CRAYX1CC#MPI2EXTENSIONS	       =        #ENDIF#

#SGICOUNTERS#LEXTRA	       = -lperfex 	       #ENDIF#
#ALPHATIMERS#LEXTRA	       = -lrt 	       #ENDIF#
#PAPI#LEXTRA	       	       = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF#
#IA64PAPI#LEXTRA	       = -L$(PAPIDIR)/$(PAPISUBDIR) -lpapi #ENDIF#
#PAPIPFM##LEXTRA	       = -L$(PAPIDIR)/$(PAPISUBDIR) -lpfm -lpapi -lpfm #ENDIF#
#X86_64PAPI#LEXTRA  = -L$(PAPIDIR)/$(PAPISUBDIR)/ -L$(PAPIDIR)/lib64/ -lpapi -lperfctr #ENDIF#
#PAPIPFMPERFCTR#LEXTRA  = -L$(PAPIDIR)/$(PAPISUBDIR)/ -L$(PAPIDIR)/lib64/ -lpapi -lpfm -lperfctr #ENDIF#
#PAPI#TAU_CNL_PAPI_FLAGS =  $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF#
#CRAYCNL#LEXTRA  = $(TAU_CNL_PAPI_FLAGS) #ENDIF#
#SOL2PAPI#LEXTRA	       = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -lcpc #ENDIF#
#IBMPAPI#LEXTRA  = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -L/usr/lpp/pmtoolkit/lib -L/usr/pmapi/lib -lpmapi#ENDIF#
#PPC64PAPI#LEXTRA  = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF#
#BGLPAPI_RTS#LEXTRA  = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.rts.a -L/bgl/BlueLight/ppcfloor/bglsys/lib -lbgl_perfctr.rts -lrts.rts -ldevices.rts #ENDIF#
#BGLPAPI#LEXTRA  = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a -L/bgl/BlueLight/ppcfloor/bglsys/lib -lbgl_perfctr.rts -lrts.rts -ldevices.rts #ENDIF#
#BGPPAPI#LEXTRA  = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a  -L/bgsys/drivers/ppcfloor/runtime/SPI -lSPI.cna #ENDIF#
#IBM64PAPI#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi64.a -L/usr/lpp/pmtoolkit/lib  -L/usr/pmapi/lib -lpmapi #ENDIF#
#IBM64PAPILINUX#LEXTRA = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a #ENDIF#
#SGI64PAPI#LEXTRA  = -L$(PAPIDIR)/$(PAPISUBDIR) -lpapi64 #ENDIF#
#ALPHAPAPI#LEXTRA	       	       = $(PAPIDIR)/$(PAPISUBDIR)/libpapi.a /usr/lib/dcpi/dadd.a -lclu -lrt #ENDIF#

TAU_PAPI_EXTRA_FLAGS	       = $(LEXTRA)
#IA64PAPI#TAU_PAPI_EXTRA_FLAGS	       = -L$(PAPIDIR)/$(PAPISUBDIR) -lpapi #ENDIF#

#SICORTEX#TAU_PAPI_EXTRA_FLAGS = -L$(PAPIDIR)/lib -L$(PAPIDIR)/lib64 -lpapi #ENDIF#

# By default make TAU_PAPI_RPATH null. Support it on a compiler by compiler basis.
#PAPI###TAU_PAPI_RPATH	= -rpath $(PAPIDIR)/$(PAPISUBDIR) #ENDIF#
#PAPI##TAU_PAPI_RPATH	=  #ENDIF#
#PPC64PAPI#TAU_PAPI_RPATH = #ENDIF#
#BGLPAPI#TAU_PAPI_RPATH = #ENDIF#
#BGPPAPI#TAU_PAPI_RPATH = #ENDIF#
#USE_INTELCXX#TAU_PAPI_RPATH	=  #ENDIF#
#CRAYX1CC#TAU_PAPI_RPATH = #ENDIF#
#PGI#TAU_PAPI_RPATH	= -R$(PAPIDIR)/$(PAPISUBDIR) #ENDIF#
TAU_PAPI_RPATH	= -Wl,-rpath $(PAPIDIR)/$(PAPISUBDIR) #ENDIF##GNU#
#USE_PATHCC#TAU_PAPI_RPATH	= #ENDIF#

# if the user has specified -cc=gcc -c++=g++ -fortran=intel, we shouldn't use -rpath
# because they are likely going to link with ifort
#INTEL32_FORTRAN#TAU_PAPI_RPATH	=  #ENDIF#
#SOL2PAPI#TAU_PAPI_RPATH	= #ENDIF#
#IBMPAPI#TAU_PAPI_RPATH	= #ENDIF#
#IBM64PAPI#TAU_PAPI_RPATH	= #ENDIF#
#PAPI#TAU_LINKER_OPT1 = $(TAU_PAPI_RPATH) #ENDIF#

#PTHREAD_AVAILABLE#LEXTRA1     = -lpthread -ldl	       #ENDIF#
#TULIPTHREADS#LEXTRA1     = -L$(TULIPDIR)/Tuliplib  -ltulip	       #ENDIF#
#SMARTS##include $(TAU_INC_DIR)/makefiles/GNUmakefile-$(HOSTTYPE)  #ENDIF#
#SMARTS#LEXTRA1	    = $(LSMARTS)	#ENDIF#

TAU_GCCLIB	= -lgcc_s 
#INTEL32_ON_64#TAU_GCCLIB	= -lgcc #ENDIF#
#FREEBSD#TAU_GCCLIB	= -lgcc #ENDIF#
#BGL#TAU_GCCLIB	= -lgcc #ENDIF#
TAU_FORTRANLIBS       = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF##GNU#
#OPEN64ORC_FORTRAN#TAU_FORTRANLIBS       = -lfortran -lffio #ENDIF#
#PATHSCALE_FORTRAN#TAU_FORTRANLIBS       = -lpathfstart -lpathfortran #ENDIF#
#SC_PATHSCALE#TAU_FORTRANLIBS       = -lpathfstart -lpathfortran #ENDIF#
#NAGWARE_FORTRAN#TAU_FORTRANLIBS		= $(EXTRADIR)/lib/quickfit.o -L$(EXTRADIR)/lib -lf96 #ENDIF#
#G95_FORTRAN#TAU_FORTRANLIBS	       = -L$(EXTRADIR) -lf95 #ENDIF#
#GNU_FORTRAN#TAU_FORTRANLIBS	       = -lg2c       #ENDIF#
#GNU_GFORTRAN#TAU_FORTRANLIBS	       = -L$(TAUGFORTRANLIBDIR) -lgfortran -lgfortranbegin       #ENDIF#
#SC_GFORTRAN#TAU_FORTRANLIBS	       = -lgfortran -lgfortranbegin       #ENDIF#
#SGI_FORTRAN#TAU_FORTRANLIBS	       = -lfortran -lftn       #ENDIF#
#USE_IBMXLC#TAU_IBM_FORTRANLIBS	       =  -bh:4 -bpT:0x10000000 -bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF#
TAU_IBM_FORTRANLIBS	       =  -Wl,-bh:4 -Wl,-bpT:0x10000000 -Wl,-bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF##GNU#
#KAI#TAU_IBM_FORTRANLIBS	       =  --backend -bh:4 --backend -bpT:0x10000000 --backend -bpD:0x20000000 /lib/crt0.o -lxlf90 -lm -lc #ENDIF#
#IBM_FORTRAN#TAU_FORTRANLIBS = $(TAU_IBM_FORTRANLIBS) #ENDIF#

#USE_IBMXLC#TAU_IBM64_FORTRANLIBS      =  -bh:4 -bpT:0x10000000 -bpD:0x20000000 -b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF#
TAU_IBM64_FORTRANLIBS      =  -Wl,-bh:4 -Wl,-bpT:0x10000000 -Wl,-bpD:0x20000000 -Wl,-b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF##GNU#
#KAI#TAU_IBM64_FORTRANLIBS      =  --backend -bh:4 --backend -bpT:0x10000000 --backend -bpD:0x20000000 --backend -b64 /lib/crt0_64.o -lxlf90 -lm -lc #ENDIF#
#IBM64_FORTRAN#TAU_FORTRANLIBS = $(TAU_IBM64_FORTRANLIBS) #ENDIF#
#IBM64_FORTRAN#TAU_FORLIBDIR=lib64 #ENDIF#
#IBM_FORTRAN#TAU_FORLIBDIR=lib #ENDIF#
#BGL#TAU_FORLIBDIR=blrts_dev_lib #ENDIF#
#BGP#TAU_FORLIBDIR=bglib #ENDIF#
#PPC64XLF#TAU_FORTRANLIBS = -L$(EXTRADIR)/$(TAU_FORLIBDIR) -lxlf90 -lxlfmath -lxl -lxlomp_ser #ENDIF#
#BGL#TAU_FORTRANLIBS = -L$(EXTRADIR)/$(TAU_FORLIBDIR) -L$(EXTRADIR)/blrts_lib -lxlf90 -lxlfmath -lxl #ENDIF#

#BGP#TAU_BGL_OMP_SERIAL= -lxlomp_ser #ENDIF#
#OPENMP#TAU_BGL_OMP_SERIAL= #ENDIF#
#BGP#TAU_OMP_SERIAL=$(TAU_BGL_OMP_SERIAL) #ENDIF#
#BGP#TAU_FORTRANLIBS = -L$(EXTRADIR)/$(TAU_FORLIBDIR) -lxlf90 -lxlfmath $(TAU_OMP_SERIAL) #ENDIF#
#BGP_GFORTRAN#TAU_FORTRANLIBS = -lgfortran -lgfortranbegin -lm #ENDIF#

#IBMXLFAPPLE#TAU_FORTRANLIBS	       = -L$(EXTRADIR)/lib -lxlf90 -lxlfmath -lxl      #ENDIF#

#ZEPTO_GFORTRAN#TAU_FORTRANLIBS = -lgfortran -lgfortranbegin -lm #ENDIF#
#CRAY_FORTRAN#TAU_FORTRANLIBS	       =        #ENDIF#
#CRAY_X1_FORTRAN#TAU_FORTRANLIBS	       =        #ENDIF#
#PGI_FORTRAN#TAU_FORTRANLIBS	       = $(EXTRADIR)/lib/f90main.o -lpgf90 -lpgf90rtl -lpgf90_rpm1 -lpgf902 -lpgftnrtl -lrt #ENDIF#
#APPLEPGI#TAU_FORTRANLIBS	       = $(EXTRADIR)/lib/f90main.o -lpgf90 -lpgf90rtl -lpgf90_rpm1 -lpgf902 -lpgftnrtl #ENDIF#
#HP_FORTRAN#TAU_FORTRANLIBS	       = -L$(EXTRADIR)/lib/pa2.0 -lF90 -lcl        #ENDIF#
#INTEL_FORTRAN#TAU_FORTRANLIBS         = -lcprts -lPEPCF90   #ENDIF#
#INTEL32_FORTRAN#TAU_FORTRANLIBS       = -lcprts -lCEPCF90 -lF90 #ENDIF#
#INTELIFORT#TAU_FORTRANLIBS       = -lcprts #ENDIF#
#INTEL81FIX#TAU_FORTRANLIBS       = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) -lcxa -lunwind -L$(EXTRADIR)/lib -lifcore $(EXTRADIR)/lib/for_main.o #ENDIF#
#INTEL10FIX#TAU_FORTRANLIBS       = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) -L$(IFORTLIBDIR) -lifcore $(IFORTLIBDIR)/for_main.o #ENDIF#
#INTELCXXLIBICC#TAU_FORTRANLIBS       = -lcprts -L$(EXTRADIR)/lib -lifcore $(EXTRADIR)/lib/for_main.o #ENDIF#
#PGI1.7#LEXTRA = -lstd -lstrm#ENDIF#
#PGI1.7#TAUHELPER = $(TAUROOT)/src/Profile/TauPGIHelper.cpp #ENDIF#
# LINKER OPTIONS
TAU_LINKER_OPT2 = $(LEXTRA)


#ACC#TAUHELPER = -AA #ENDIF#
#FUJITSU_FORTRAN#TAU_FORTRANLIBS	       = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj9i6 -lfj9f6 -lfj9e6        #ENDIF#
#FUJITSU_SOLARIS#TAU_FORTRANLIBS	       = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj90l -lfj90f #ENDIF#
#SUN_FORTRAN#TAU_FORTRANLIBS	       = -lfui -lfsumai -lfprodai -lfminlai -lfmaxlai -lfminvai -lfmaxvai -lfsu -lsunmath        #ENDIF#
#SUN_FORTRAN#TAU_FORTRANLIBS_SUN_OPTERON   = -lfsu -lsunmath #ENDIF#
#SUN_FORTRAN#TAU_FORTRANLIBS_SUNCC   = -lfsu #ENDIF#
#SUN386I#TAU_FORTRANLIBS	       = $(TAU_FORTRANLIBS_SUN_OPTERON) #ENDIF#
#SUNX86_64#TAU_FORTRANLIBS	       = $(TAU_FORTRANLIBS_SUN_OPTERON) #ENDIF#
#SUNCC#TAU_FORTRANLIBS	       = $(TAU_FORTRANLIBS_SUNCC) #ENDIF#
#SOL2#EXTRALIBS = -lsocket -lnsl      #ENDIF#
#SUN386I#EXTRALIBS = -lsocket -lnsl -lrt     #ENDIF#
#SUNX86_64#EXTRALIBS = -lsocket -lnsl -lrt     #ENDIF#
#COMPAQ_FORTRAN#TAU_FORTRANLIBS =  $(EXTRADIR)/lib/cmplrs/fort90/for_main.o -L$(EXTRADIR)/lib -L$(EXTRADIR)/lib/cmplrs/fort90 -L$(EXTRADIR)/lib/cmplrs/fort90 -lUfor -lfor -lFutil -lm -lmld -lexc -lc #ENDIF#
#ABSOFT_FORTRAN#TAU_FORTRANLIBS =  -L$(EXTRADIR)/lib -lfio -lf90math -lU77 -lf77math -lfio #ENDIF#
#LAHEY_FORTRAN#TAU_FORTRANLIBS	       = $(EXTRADIR)/lib/fj90rt0.o -L$(EXTRADIR)/lib -lfj9i6 -lfj9f6 -lfj9e6 -lfccx86_6a #ENDIF#
#LAHEY64_FORTRAN#TAU_FORTRANLIBS             = $(EXTRADIR)/lib64/fj90rt0.o -L$(EXTRADIR)/lib64  -lfj90f -lfj90i -lelf #ENDIF#
#HITACHI_FORTRAN#TAU_FORTRANLIBS =  -lf90 -lhf90math #ENDIF#
#NEC_FORTRAN#TAU_FORTRANLIBS =  -f90lib #ENDIF#
#COMPAQ_GUIDEF90#TAU_FORTRANLIBS = $(EXTRADIR)/lib/cmplrs/fort90/for_main.o -lfor #ENDIF#


#HITACHI#TAU_HITACHI_EXTRA 	=  -L/usr/local/lib -llrz32 #ENDIF#

## To use the standard F90 linker instead of TAU_LINKER + TAU_FORTRANLIBS, add
TAU_CXXLIBS		= -L$(TAUGCCLIBDIR)  $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF##GNU#
TAU_GNUCXXLIBS		= -L$(TAUGCCLIBDIR) -lstdc++ $(TAU_GCCLIB) #ENDIF##GNU#
#OPEN64ORC#TAU_CXXLIBS		= -lstdc++ #ENDIF#
#PATHSCALE_FORTRAN#TAU_CXXLIBS		= -lstdc++ #ENDIF#
#LAHEY_FORTRAN#TAU_CXXLIBS		= $(TAU_GNUCXXLIBS) /usr/lib/libc.a #ENDIF#
#NAGWARE_FORTRAN#TAU_CXXLIBS		= $(TAU_GNUCXXLIBS) /usr/lib/libc.a #ENDIF#
#PGI#TAU_CXXLIBS        	= -lstd -lC       #ENDIF#
#APPLEPGI#TAU_CXXLIBS        	= -lstd -lcpp       #ENDIF#
#PGI_FORTRAN#TAU_CXXLIBS_PGI_CNL       	= -L$(EXTRADIR)/lib -lstd -lC     #ENDIF#
#PATHSCALE_FORTRAN#TAU_CXXLIBS_PATHSCALE_CNL      	= -L$(EXTRADIR)/lib -lstdc++     #ENDIF#
#GNU_GFORTRAN#TAU_CXXLIBS_GNU_CNL      	= -L$(EXTRADIR)/lib -lstdc++ -lgcc_eh    #ENDIF#
#INTELIFORT#TAU_CXXLIBS_INTEL_CNL      	= -lstdc++   #ENDIF#
#CRAY_FORTRAN#TAU_CXXLIBS_CRAY_CNL = -L$(EXTRADIR) -lcray-c++-rts -lstdc++ -lgcc_eh #ENDIF#
#CRAYCNL#TAU_CXXLIBS       	= $(TAU_CXXLIBS_PGI_CNL) $(TAU_CXXLIBS_PATHSCALE_CNL) $(TAU_CXXLIBS_GNU_CNL) $(TAU_CXXLIBS_INTEL_CNL) $(TAU_CXXLIBS_CRAY_CNL) #ENDIF#
#CATAMOUNT#TAU_CXXLIBS       	= $(TAU_CXXLIBS_PGI_CNL) $(TAU_CXXLIBS_PATHSCALE_CNL) $(TAU_CXXLIBS_GNU_CNL)   #ENDIF#
#CRAYX1CC#TAU_CXXLIBS        	= -L/opt/ctl/CC/CC/lib -lC       #ENDIF#

## Set the gfortran options on BGP
#BGP_GFORTRAN#TAU_CXXLIBS		= -lstdc++ #ENDIF#
#BGP_GFORTRAN#TAU_GNULIBS		= -lstdc++ #ENDIF#
#BGP_GFORTRAN#TAU_CXXLIBS_GNU_CNL	= -lstdc++ #ENDIF#

## Set the gfortran options on Zepto BGP
#ZEPTO_GFORTRAN#TAU_CXXLIBS		= -lstdc++ #ENDIF#

TAU_SGI_INIT = /usr/lib32/c++init.o 
#ENABLE64BIT#TAU_SGI_INIT  = /usr/lib64/c++init.o #ENDIF#
#ENABLEN32BIT#TAU_SGI_INIT = /usr/lib32/c++init.o #ENDIF#
#ENABLE32BIT#TAU_SGI_INIT  = /usr/lib/c++init.o   #ENDIF#

#SGICC#TAU_CXXLIBS      	= $(TAU_SGI_INIT) -lC #ENDIF#
#APPLECXX#TAU_CXXLIBS 		= -lstd -lC #ENDIF#
#SOL2CC#TAU_CXXLIBS               = -lCstd -lCrun #ENDIF#
#SOL2CC#TAU_CXXLIBS_SUN_OPTERON   = -lCstd -lCrun -lm #ENDIF#
#SUNCC#TAU_CXXLIBS_SUNCC   = -lCstd -lCrun #ENDIF#
#SUN386I#TAU_CXXLIBS   = $(TAU_CXXLIBS_SUN_OPTERON) #ENDIF#
#SUNCC#TAU_CXXLIBS   = $(TAU_CXXLIBS_SUNCC) #ENDIF#
#SUNX86_64#TAU_CXXLIBS   = $(TAU_CXXLIBS_SUN_OPTERON) #ENDIF#
#FUJITSU_SOLARIS#TAU_CXXLIBS               = -lstd -lstdm #ENDIF#
#PPC64XLC#TAU_XLCLIBS         = -L$(EXTRADIRCXX)/$(TAU_FORLIBDIR) -libmc++ -lstdc++       #ENDIF#
#IBMXLCAPPLE#TAU_FORLIBDIR =lib       #ENDIF#
#IBMXLCAPPLE#TAU_XLCLIBS         = -L$(EXTRADIRCXX)/$(TAU_FORLIBDIR) -libmc++ -lstdc++       #ENDIF#
#BGL#TAU_XLCLIBS         = -L$(EXTRADIRCXX)/blrts_dev_lib -L$(EXTRADIRCXX)/blrts_lib -libmc++ -L/bgl/BlueLight/ppcfloor/blrts-gnu/powerpc-bgl-blrts-gnu/lib -lstdc++      #ENDIF#
#BGP#TAU_XLCLIBS         = -L$(EXTRADIRCXX)/bglib -libmc++ -lstdc++      #ENDIF#
#SP1#TAU_XLCLIBS         = -lC            #ENDIF#
#USE_IBMXLC#TAU_CXXLIBS         = $(TAU_XLCLIBS) #ENDIF#
#USE_DECCXX#TAU_CXXLIBS         = -lcxxstd -lcxx #ENDIF#
#USE_INTELCXX#TAU_CXXLIBS_INTEL        = -lcprts -lPEPCF90 #ENDIF#
#USE_INTELCXX#TAU_CXXLIBS_INTEL        = -lcprts #ENDIF#
#INTELIFORT#TAU_CXXLIBS_INTEL        = -lcprts #ENDIF#
#INTEL81FIX#TAU_CXXLIBS_INTEL        = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) -lcxa -lunwind#ENDIF#
#INTEL10FIX#TAU_CXXLIBS_INTEL        = -L$(TAUGCCLIBDIR) $(TAUGCCLIBOPTS) -lstdc++ $(TAU_GCCLIB) #ENDIF#
#INTELCXXLIBICC#TAU_CXXLIBS_INTEL        = -lcprts #ENDIF#
#USE_INTELCXX#TAU_CXXLIBS        = $(TAU_CXXLIBS_INTEL) #ENDIF#
#APPLECXX#TAU_CXXLIBS 		= -lstdc++ -L$(TAUGCCLIBDIR)  $(TAUGCCLIBOPTS) -lgcc_s.1 -lSystemStubs #ENDIF#

# EXTERNAL PACKAGES: EPILOG
#SCALASCA#TAU_ELG_SERIAL_SUFFIX =.ser #ENDIF#
#EPILOG#TAU_LINKER_OPT3 	=  -L$(EPILOGLIBDIR) -lelg$(TAU_ELG_SERIAL_SUFFIX) $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF#
#EPILOGMPI#TAU_LINKER_OPT3 	=  -L$(EPILOGLIBDIR) -lelg.mpi $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF#
#EPILOGOMPI#TAU_LINKER_OPT3 	=  -L$(EPILOGLIBDIR) -lelg.ompi $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF#
#EPILOGOMP#TAU_LINKER_OPT3 	=  -L$(EPILOGLIBDIR) -lelg.omp $(EPILOGEXTRALINKCMD) $(TAU_HITACHI_EXTRA) #ENDIF#

#USE_IBMXLC#TAU_IBM_NOCOMPINST   	     = -optNoCompInst 	  #ENDIF#



# When using shared, we don't want -lelg.mpi or -lvt.mpi showing up
#FORCESHARED#TAU_LINKER_OPT3=#ENDIF#


TAU_LINKER_OPT4 = $(LEXTRA1)
#HITACHI_OPENMP#TAU_LINKER_OPT4 = -lcompas -lpthreads -lc_r #ENDIF#
#OPENMP#TAU_LINKER_OPT5 = -mp #ENDIF#
#SOL2CC_OPENMP#TAU_LINKER_OPT5 = -xopenmp #ENDIF#
#SUNCC_OPENMP#TAU_LINKER_OPT5 = -xopenmp=parallel #ENDIF#
TAU_LINKER_OPT5 = #ENDIF##GNU#
#COMPAQCXX_OPENMP#TAU_LINKER_OPT5 = -omp #ENDIF#
#IBMXLC_OPENMP#TAU_LINKER_OPT5 = -qsmp=omp -qthreaded #ENDIF#
#OPEN64_OPENMP#TAU_LINKER_OPT5 = -mp #ENDIF#
#GUIDE#TAU_LINKER_OPT5 = #ENDIF#
#PGIOPENMP#TAU_LINKER_OPT5 = -mp #ENDIF#
#INTELOPENMP#TAU_LINKER_OPT5 = -openmp #ENDIF#
#GNUOPENMP#TAU_LINKER_OPT5 = -fopenmp #ENDIF#

# MALLINFO needs -lmalloc on sgi, sun 
#SGIMP#TAU_LINKER_OPT6 = -lmalloc #ENDIF#
#SOL2#TAU_LINKER_OPT6 = #ENDIF#
#SUN386I#TAU_LINKER_OPT6 = -lmalloc #ENDIF#
#SUNX86_64#TAU_LINKER_OPT6 = -lmalloc #ENDIF#

# We need -lCio with SGI CC 7.4+
#SGICC#TAU_LINKER_OPT7 = -lCio #ENDIF#

# charm
#TAU_CHARM#TAU_LINKER_OPT8 = -lconv-core #ENDIF#

# extra libs
#SUN386I#TAU_LINKER_OPT9 = $(EXTRALIBS) #ENDIF#
#SUNX86_64#TAU_LINKER_OPT9 = $(EXTRALIBS) #ENDIF#
#SOL2#TAU_LINKER_OPT9 = $(EXTRALIBS)    #ENDIF#

#BGL#TAU_LINKER_OPT10 = -L/bgl/BlueLight/ppcfloor/bglsys/lib -lrts.rts #ENDIF#

#USE_IBMXLC#TAU_IBM_PYTHON_SHFLAG = -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp -Wl,-einitpytau#ENDIF#
TAU_IBM_PYTHON_SHFLAG = -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp -Wl,-einitpytau#ENDIF##GNU#
#KAI#TAU_IBM_PYTHON_SHFLAG = --backend -Wl,-bI:$(PYTHON_LIBDIR)/config/python.exp --backend -Wl,-einitpytau#ENDIF#
#ACC#TAU_HPUX_PYTHON_SHFLAG = -lstd_v2 -lCsup_v2 -lm -lcl -lc #ENDIF#

#USE_IBMXLC#TAU_IBM_LD_FLAGS = -binitfini:poe_remote_main #ENDIF#
TAU_IBM_LD_FLAGS = -Wl,-binitfini:poe_remote_main #ENDIF##GNU#
#MPICH2_MPI_INPLACE#TAU_IBM_LD_FLAGS = #ENDIF#
#KAI#TAU_IBM_LD_FLAGS = --backend -binitfini:poe_remote_main #ENDIF#


#PYTHON#TAU_IBM_SHFLAGS = $(TAU_IBM_PYTHON_SHFLAG) #ENDIF#
#PYTHON#TAU_HPUX_SHFLAGS = $(TAU_HPUX_PYTHON_SHFLAG) #ENDIF#
#SP1#TAU_EXTRA_LIBRARY_FLAGS = $(TAU_IBM_SHFLAGS)  #ENDIF#
#SOL2#TAU_EXTRA_LIBRARY_FLAGS = #ENDIF#
#SGIMP#TAU_EXTRA_LIBRARY_FLAGS = -lmalloc  #ENDIF#
#HP#TAU_EXTRA_LIBRARY_FLAGS  = $(TAU_HPUX_SHFLAGS) #ENDIF#

#MPI#TAU_MPI_WRAPPER_LIB= -L$(TAU_LIB_DIR) -lTauMpi$(TAU_CONFIG) #ENDIF#
#EPILOGMPI#TAU_MPI_WRAPPER_LIB= #ENDIF#
#EPILOGOMPI#TAU_MPI_WRAPPER_LIB= #ENDIF#

##############################################
# Build TAU_LINKER_SHOPTS
TAU_IBM_LINKER_SHOPTS=-Wl,-brtl -Wl,-bexpall #ENDIF##GNU#
#USE_IBMXLC#TAU_IBM_LINKER_SHOPTS= -brtl -bexpall #ENDIF#
TAU_BGP_GNU_LINKER_SHOPTS=-Xlinker -export-dynamic -dynamic #ENDIF##GNU#
#USE_IBMXLC#TAU_BGP_XLC_LINKER_SHOPTS=-qnostaticlink #ENDIF#
#KAI#TAU_IBM_LINKER_SHOPTS= --backend -brtl #ENDIF#
#SP1#TAU_LINKER_SHOPTS= $(TAU_IBM_LINKER_SHOPTS) #ENDIF#
#BGP#TAU_LINKER_SHOPTS= $(TAU_BGP_GNU_LINKER_SHOPTS) $(TAU_BGP_XLC_LINKER_SHOPTS) #ENDIF#

##############################################
# MPI _r suffix check (as in libmpi_r)
#MPI_R_SUFFIX#TAU_MPI_R_SUFFIX=_r    #ENDIF#

##############################################
# Flags to build a shared object: TAU_SHFLAGS
AR_SHFLAGS 		= -shared  	        #ENDIF##GNU#
#USE_PATHCC#AR_SHFLAGS 		= -shared -fPIC  	#ENDIF#
#PGI#AR_SHFLAGS 		= -shared -fPIC 	#ENDIF#
#APPLEPGI#AR_SHFLAGS 		= -shared               #ENDIF#
#SGICC#AR_SHFLAGS 		= -shared  	        #ENDIF#
#OPEN64ORC#AR_SHFLAGS 		= -shared -fpic 	#ENDIF#
#APPLECXX#TAU_APPLE_SHFLAGS = -dynamiclib -flat_namespace -undefined suppress #ENDIF#
#PYTHON#TAU_APPLE_SHFLAGS   = -bundle -flat_namespace -undefined suppress     #ENDIF#
#USE_INTELCXX#AR_SHFLAGS  	= -shared 		#ENDIF#
#APPLECXX#AR_SHFLAGS = $(TAU_APPLE_SHFLAGS)             #ENDIF#
#SOL2#AR_SHFLAGS  		= -G 		        #ENDIF#
#SUNCC#AR_SHFLAGS  		= -G 		        #ENDIF#
#CRAYCNL#AR_SHFLAGS  		= -shared 		#ENDIF#
TAU_BGP_AR_SHFLAGS = -shared
#USE_IBMXLC#AR_SHFLAGS          = -G 		        #ENDIF#
#USE_IBMXLC#TAU_BGP_AR_SHFLAGS          = -qmkshrobj    #ENDIF#
#BGP#AR_SHFLAGS          = $(TAU_BGP_AR_SHFLAGS)        #ENDIF#
#USE_DECCXX#AR_SHFLAGS  	= -shared 		#ENDIF#
#ACC#AR_SHFLAGS  		= -b 		        #ENDIF#
TAU_ARFLAGS			= $(AR_SHFLAGS) -o 
TAU_SHFLAGS = $(AR_SHFLAGS) -o

############# RANLIB Options #############
TAU_RANLIB = echo "Built" 
TAU_RANLIB_FE = echo "Built" 
#APPLECXX#TAU_RANLIB      = ranlib  #ENDIF#
#IBMXLCAPPLE#TAU_RANLIB      = ranlib  #ENDIF#
#APPLECXX#TAU_RANLIB_FE      = ranlib  #ENDIF#
#IBMXLCAPPLE#TAU_RANLIB_FE      = ranlib  #ENDIF#
#CRAYXMT#TAU_RANLIB      = ranlib  #ENDIF#
#CRAYXMT#TAU_RANLIB_FE   = /usr/bin/ranlib   #ENDIF#

##############################################
TAU_AR                 = ar             #ENDIF#
#SP1#TAU_AR            = ar -X32        #ENDIF#
#IBM64#TAU_AR          = ar -X64        #ENDIF#
#PPC64#TAU_AR          = ar 		#ENDIF#
#IBM64LINUX#TAU_AR     = ar             #ENDIF#


##############################################
# PDT OPTIONS
# You can specify -pdtcompdir=intel -pdtarchdir=x86_64
# If nothing is specified, PDTARCHDIR uses TAU_ARCH
PDTARCHDIRORIG=$(TAU_ARCH)
PDTARCHITECTURE=
PDTARCHDIRFINAL=$(PDTARCHDIRORIG)
#PDTARCHITECTURE#PDTARCHDIRFINAL=$(PDTARCHITECTURE)#ENDIF#
PDTARCHDIR=$(PDTARCHDIRFINAL)
#PDTARCH#PDTARCHDIR=$(PDTARCHDIRFINAL)/$(PDTCOMPDIR)#ENDIF#


HPCTOOLKIT_LINK=


##############################################
# Extra linker args (e.g. -Wl,-export-dynamic)
##############################################
EXTRA_LINKER_ARGS= -Wl,--export-dynamic
TAU_LINKER_OPT14=$(EXTRA_LINKER_ARGS)


##############################################
# Compiler Instrumentation
##############################################

BFDLINK=
BFDLIBS=-lbfd -liberty

#TAU_BFD#TAU_BFDLIB=$(BFDLINK) $(BFDLIBS) #ENDIF#
#UPCC#UPCC_C_PREFIX=-Wc,#ENDIF#
#UPCC#UPCC_LINK_PREFIX=-Wl,#ENDIF#
#PTHREAD_AVAILABLE#TAU_COMPINST_PTHREAD_OPTIONS= -Dpthread_create=tau_pthread_create -Dpthread_exit=tau_pthread_exit#ENDIF#
#COMPINST_INTEL9#TAU_COMPINST_OPTION=$(UPCC_C_PREFIX)-tcollect #ENDIF#
#COMPINST_INTEL9#TAU_COMPINST_LINKING= #ENDIF#
TAU_COMPINST_OPTION=$(UPCC_PREFIX)-g $(UPCC_C_PREFIX)-finstrument-functions #ENDIF##COMPINST_GNU#
TAU_LINKER_OPT13=$(TAU_BFDLIB) #ENDIF##COMPINST_GNU#
#COMPINST_PGI#TAU_COMPINST_OPTION=$(UPCC_C_PREFIX)-Mprof=func #ENDIF#
#COMPINST_PGI#TAU_COMPINST_LINKING=$(UPCC_LINK_PREFIX)-Mprof=func #ENDIF#
#COMPINST_XL#TAU_COMPINST_OPTION=$(UPCC_C_PREFIX)-qdebug=function_trace #ENDIF#

#COMPINST_PGI#TAU_COMPINST_CRAY_HACK=$(UPCC_LINK_PREFIX)-Mprof=func $(EXTRADIR)/lib/libpgnod_prof.a#ENDIF#
#CRAYCNL#TAU_COMPINST_LINKING=$(TAU_COMPINST_CRAY_HACK) #ENDIF#
#COMPINST_XL#TAU_COMPINST_LINKING=$(UPCC_C_PREFIX)-qdebug=function_trace #ENDIF#
#MRNET#TAU_LINKER_OPT15=$(MRNET_LIBS)#ENDIF#
##############################################



##############################################

PROFILEOPTS = $(PROFILEOPT1)  $(PROFILEOPT2)  $(PROFILEOPT3)  $(PROFILEOPT4)  \
              $(PROFILEOPT5)  $(PROFILEOPT6)  $(PROFILEOPT7)  $(PROFILEOPT8)  \
	      $(PROFILEOPT9)  $(PROFILEOPT10) $(PROFILEOPT11) $(PROFILEOPT12) \
	      $(PROFILEOPT13) $(PROFILEOPT14) $(PROFILEOPT15) $(PROFILEOPT16) \
	      $(PROFILEOPT17) $(PROFILEOPT18) $(PROFILEOPT19) $(PROFILEOPT20) \
	      $(PROFILEOPT21) $(PROFILEOPT22) $(PROFILEOPT23) $(PROFILEOPT24) \
	      $(PROFILEOPT25) $(PROFILEOPT26) $(PROFILEOPT27) $(PROFILEOPT28) \
	      $(PROFILEOPT29) $(PROFILEOPT30) $(PROFILEOPT31) $(PROFILEOPT32) \
	      $(PROFILEOPT33) $(PROFILEOPT34) $(PROFILEOPT35) $(PROFILEOPT36) \
              $(PROFILEOPT37) $(PROFILEOPT38) $(PROFILEOPT39) $(PROFILEOPT40) \
              $(PROFILEOPT41) $(PROFILEOPT42) $(PROFILEOPT43) $(PROFILEOPT44) \
              $(PROFILEOPT45) $(PROFILEOPT46) $(PROFILEOPT47) $(PROFILEOPT48) \
              $(PROFILEOPT49) $(PROFILEOPT50) $(PROFILEOPT51) $(PROFILEOPT52) \
              $(PROFILEOPT53) $(PROFILEOPT54) $(PROFILEOPT55) $(PROFILEOPT56) \
	      $(PROFILEOPT57) $(PROFILEOPT58) $(PROFILEOPT59) $(PROFILEOPT60) \
	      $(PROFILEOPT61) $(PROFILEOPT62) $(PROFILEOPT63) $(PROFILEOPT64) \
	      $(PROFILEOPT65) $(PROFILEOPT66) $(PROFILEOPT67) $(PROFILEOPT68) \
	      $(PROFILEOPT69) $(PROFILEOPT70) $(PROFILEOPT71) $(PROFILEOPT72) \
	      $(PROFILEOPT73) $(PROFILEOPT74) $(PROFILEOPT75) $(PROFILEOPT76) \
	      $(PROFILEOPT77) $(PROFILEOPT78) $(PROFILEOPT79) $(PROFILEOPT80) \
              $(TRACEOPT)


##############################################
# These flags will only be used for the TAU library, not the users's code

# Removed -qpic=large from below, it causes the static XLC to fail with undefined CONSTANT_AREA
#USE_IBMXLC#TAU_BGP_INTERNAL_FLAG1    = -qpic -DTAU_IBM_XLC_BGP #ENDIF#
#USE_IBMXLC#TAU_BGP_INTERNAL_FLAG2    = -DTAU_IBM_XLC_BGP #ENDIF#
#BGP#TAU_INTERNAL_FLAG1    = $(TAU_BGP_INTERNAL_FLAG1) #ENDIF#
#BGPTIMERS#TAU_INTERNAL_FLAG1    = $(TAU_BGP_INTERNAL_FLAG2) #ENDIF#
TAU_INTERNAL_FLAG1             = -fPIC #ENDIF##GNU#
#CRAYXMT#TAU_INTERNAL_FLAG1             = #ENDIF#

#USE_PATHCC#TAU_INTERNAL_FLAG1      = -fPIC #ENDIF#
#USE_INTELCXX#TAU_INTERNAL_FLAG1    = -fPIC #ENDIF#
TAU_INTERNAL_FLAGS = $(TAU_INTERNAL_FLAG1)

##############################################

TAU_LINKER_OPTS = $(TAU_LINKER_OPT1) $(TAU_LINKER_OPT2) $(TAU_LINKER_OPT3) \
                  $(TAU_LINKER_OPT4) $(TAU_LINKER_OPT5) $(TAU_LINKER_OPT6) \
                  $(TAU_LINKER_OPT7) $(TAU_LINKER_OPT8) $(TAU_LINKER_OPT9) \
                  $(TAU_LINKER_OPT10) $(TAU_LINKER_OPT11) $(TAU_LINKER_OPT12) \
		  $(TAU_LINKER_OPT13) $(PERFSUITELINK) $(VAMPIRTRACELIBS) $(SCOREPLIBS) $(HPCTOOLKIT_LINK) \
		  $(TAU_LINKER_OPT14) $(TAU_LINKER_OPT15)

##############################################

############# TAU Fortran ####################
TAU_LINKER=$(TAU_CXX)
#INTEL_FORTRAN##TAU_LINKER=$(TAU_F90) #ENDIF#
#INTEL32_FORTRAN##TAU_LINKER=$(TAU_F90) #ENDIF#
# Intel efc compiler acts as a linker - NO. Let C++ be the linker. 

##############################################
############# TAU Options ####################
TAUDEFS 	= $(PROFILEOPTS) 

TAUINC        	= -I$(TAU_INC_DIR)

TAULIBS		= $(TAUHELPER) -L$(TAU_LIB_DIR) -ltau$(TAU_CONFIG)  $(TAU_LINKER_OPTS)

TAUMPILIBS	= $(TAU_MPI_LIB)

TAUMPIFLIBS	= $(TAU_MPI_FLIB)

### ACL S/W requirement
TAU_DEFS	= $(TAUDEFS)

TAU_INCLUDE 	= -I$(TAU_INC_DIR)
#PERFLIB#TAU_INCLUDE = -I$(PERFINCDIR) #ENDIF#
#PERFLIB#TAU_DEFS = #ENDIF#
#PERFLIB#TAU_COMPILER_EXTRA_OPTIONS=-optTau=-p #ENDIF#

TAU_INCLUDE_MEMORY = -I$(TAU_INC_DIR)/Memory
#IBMXLCAPPLE#TAU_INCLUDE_MEMORY = -I$(TAU_INC_DIR)/MemoryWrapper #ENDIF#
#APPLECXX#TAU_INCLUDE_MEMORY = -I$(TAU_INC_DIR)/MemoryWrapper #ENDIF#

#TAU_LIBS	= $(TAUHELPER) -L$(TAU_LIB_DIR) -ltau$(TAU_CONFIG) $(TAU_LINKER_OPTS) -L/usr/local/packages/sw1.2beta1/x86_64-unknown-linux2.4/lib -lstackwalk -lsymtabAPI -lcommon -L/usr/local/packages/libdwarf-20091230/lib -ldwarf -lelf -liberty -ldlmalloc

TAU_LIBS	= $(TAUHELPER) -L$(TAU_LIB_DIR) -ltau$(TAU_CONFIG) $(TAU_LINKER_OPTS)

#PERFLIB#TAU_LIBS = #ENDIF#

TAU_SHLIBS	= $(TAUHELPER) -L$(TAU_LIB_DIR) -lTAUsh$(TAU_CONFIG) $(TAU_LINKER_OPTS) $(TAU_LINKER_SHOPTS) $(TAU_MPI_LIB) -ldl
#PERFLIB#TAU_SHLIBS = #ENDIF#
TAU_EXLIBS	= $(TAUHELPER) -lTAU $(TAU_LINKER_OPTS) $(TAU_LINKER_SHOPTS) $(TAU_MPI_LIB)

TAU_SHLIBS_NOSHOPTS = $(TAUHELPER) -L$(TAU_LIB_DIR) -lTAUsh$(TAU_CONFIG) $(TAU_LINKER_OPTS) -ldl

TAU_DISABLE	= $(TAUHELPER) -L$(TAU_LIB_DIR) -lTauDisable

TAU_MPI_INCLUDE	= $(TAU_MPI_INC)

TAU_MPI_LIBS	= $(TAU_MPI_LIB)

TAU_MPI_FLIBS	= $(TAU_MPI_FLIB)

## TAU TRACE INPUT LIBRARY (can build a trace converter using TAU TIL)
TAU_TRACE_INPUT_LIB = -L$(TAU_LIB_DIR) -lTAU_traceinput$(TAU_CONFIG)

## Don't include -lpthread or -lsmarts. Let app. do that. 
#############################################
## IBM SPECIFIC CHANGES TO TAU_MPI_LIBS
#SP1#TAU_MPI_LDFLAGS  = $(TAU_IBM_LD_FLAGS) #ENDIF#
#MPI#TAU_LDFLAGS  = $(TAU_MPI_LDFLAGS) #ENDIF#
#SP1#TAU_IBM_MPI_LIBS    = $(TAU_MPI_LIB)  -L$(TAU_MPILIB_DIR)/ip  -lvtd$(TAU_MPI_R_SUFFIX) #ENDIF#
#SP1#TAU_IBM_FMPI_LIBS    = $(TAU_MPI_FLIB)  -L$(TAU_MPILIB_DIR)/ip  -lvtd$(TAU_MPI_R_SUFFIX) #ENDIF#
#SP1#TAU_MPI_LIBS_FLAGS= $(TAU_IBM_MPI_LIBS) #ENDIF#
#SP1#TAU_MPI_FLIBS_FLAGS   = $(TAU_IBM_MPI_FLIBS) #ENDIF#
#MPI#TAU_MPI_LIBS_FLAGS = $(TAU_MPI_LIB) #ENDIF#
#MPI#TAU_MPI_FLIBS_FLAGS  = $(TAU_MPI_FLIB) #ENDIF#
#MPI#TAU_MPI_LIBS = $(TAU_MPI_LIBS_FLAGS) #ENDIF#
#MPI#TAU_MPI_FLIBS  = $(TAU_MPI_FLIBS_FLAGS) #ENDIF#

#SP1#TAUMPILIBS      = $(TAU_MPI_LIBS) 	#ENDIF#
#SP1#TAUMPIFLIBS     = $(TAU_MPI_FLIBS)	#ENDIF#
#############################################
#SHMEM#TAU_SHMEM_OBJS		     = TauShmemCray.o	  #ENDIF#
#SP1#TAU_SHMEM_OBJS		     = TauShmemTurbo.o	  #ENDIF#
#GPSHMEM#TAU_SHMEM_OBJS		     = TauShmemGpshmem.o  #ENDIF#

TAU_CCOMPILER     = $(TAU_CC)
#UPCC#TAU_CCOMPILER     = $(TAU_UPCC)  #ENDIF#


#SHMEM#TAU_SHMEM_INCLUDE	= $(TAU_SHMEM_INC) #ENDIF#

#SHMEM#TAU_SHMEM_LIBS	= -L$(TAU_PREFIX_INSTALL_DIR)/$(CONFIG_ARCH)/ -lTauShmem$(TAU_CONFIG) $(TAU_SHMEM_LIB) #ENDIF#
#############################################
# TAU COMPILER SHELL SCRIPT OPTIONS
TAUCOMPILEROPTS=  -optPdtDir="$(PDTDIR)/${PDTARCHDIR}"\
        -optPdtCOpts="$(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) $(TAU_SHMEM_INCLUDE)"\
        -optPdtCxxOpts="$(TAU_INCLUDE) $(TAU_DEFS) $(TAU_MPI_INCLUDE) $(TAU_SHMEM_INCLUDE)"\
        -optTauInstr="$(TAU_BIN_DIR)/tau_instrumentor" \
        -optNoMpi \
	-optOpariDir="$(OPARIDIR)" -optOpariTool="$(TAU_OPARI_TOOL)" \
	-optTauCC="$(TAU_CCOMPILER)" \
	-optTauIncludes="$(TAU_INCLUDE) $(TAU_MPI_INCLUDE) $(TAU_SHMEM_INCLUDE)" \
	-optTauDefs="$(TAU_DEFS)" $(TAU_IBM_NOCOMPINST) \
        -optTauCompile="$(TAU_INCLUDE) $(TAU_MPI_INCLUDE) $(TAU_DEFS) "\
        -optLinking="$(TAU_MPI_FLIBS) $(TAU_SHMEM_LIBS) $(TAU_LIBS) $(TAU_LDFLAGS) $(TAU_CXXLIBS)"\
        -optSharedLinking="-L$(TAU_LIB_DIR)/shared$(TAU_CONFIG) $(TAU_MPI_FLIBS)  $(TAU_SHMEM_LIBS) $(TAU_EXLIBS) $(TAU_LDFLAGS) $(TAU_CXXLIBS)"\
	$(TAU_COMPILER_EXTRA_OPTIONS) \
        -optIncludeMemory="$(TAU_INCLUDE_MEMORY)"\
	-optCompInstOption="$(TAU_COMPINST_OPTION) $(TAU_COMPINST_PTHREAD_OPTIONS)"\
	-optCompInstLinking="$(TAU_COMPINST_LINKING)"
#############################################

TAU_SHAREDLIBS=$(TAUHELPER) -L$(TAU_LIB_DIR) -lTAU $(TAU_LINKER_OPTS) $(TAU_LINKER_SHOPTS)
SHAREDEXTRAS=
#FORCESHARED#SHAREDEXTRAS=-optSharedLinkReset="$(TAU_LDFLAGS) $(TAU_CXXLIBS) $(TAU_MPI_FLIB) $(TAU_SHAREDLIBS)" -optShared #ENDIF#
TAU_COMPILER=$(TAU_BIN_DIR)/tau_compiler.sh $(TAUCOMPILEROPTS) $(SHAREDEXTRAS)
#############################################
# These options could be included in the application Makefile as 
#CFLAGS        	= $(TAUDEFS) $(TAUINC)
#
#LIBS 	      	= $(TAULIBS)
#
# To run the application without Profiling/Tracing use
#CFLAGS		= $(TAUINC)   
# Don't use TAUDEFS but do include TAUINC
# Also ignore TAULIBS when Profiling/Tracing is not used.
#############################################

##############################################
# For making libTAU.so Dynamic Shared Object
##############################################
TAU_SHLIBX              = .so
#HP#TAU_SHLIBX          = .sl                   #ENDIF#
#APPLECXX#TAU_APPLE_SHLIBX  = .dylib            #ENDIF#
#PYTHON#TAU_APPLE_SHLIBX    = .so               #ENDIF#
#APPLECXX#TAU_SHLIBX    = $(TAU_APPLE_SHLIBX)   #ENDIF#

#############################################

# I had to comment the following out, with IBM make, this becomes the default
# make target, so it will screw up any makefile that includes the TAU stub makefile
#print-%:; @echo $($*)
