#************************************************************************* # Copyright (c) 2002 The University of Chicago, as Operator of Argonne # National Laboratory. # Copyright (c) 2002 The Regents of the University of California, as # Operator of Los Alamos National Laboratory. # This file is distributed subject to a Software License Agreement found # in the file LICENSE that is included with this distribution. #************************************************************************* # # $Log: Makefile.OAG,v $ # Revision 1.27 2012/03/22 19:39:43 soliday # Removed gsl from the link line. I'm not sure why this was a requirement before. # Besides, gsl is no longer being distributed with our code so if it needs to # be readded to the link line in the future, it will have to be done differently. # # Revision 1.26 2010/08/13 21:07:28 ywang25 # Added the gsl lib to user libraries to build static program, as rpnlib requires function definition from gsl. # # Revision 1.25 2009/04/15 17:55:51 soliday # Updated to deal with HDF versions newer than 1.6 # # Revision 1.24 2008/06/11 19:14:58 soliday # Updated so that it would work with solaris-x86 and solaris-x86_64 # # Revision 1.23 2007/09/05 18:50:10 soliday # Updated to fix problem on Solaris. # # Revision 1.22 2006/12/07 16:39:17 soliday # Added the ability to find the HDF system library files on 64bit linux. # # Revision 1.21 2006/01/16 20:52:47 soliday # Update to not build hdf2sdds with gcc on Solaris. # # Revision 1.20 2005/11/14 16:09:55 soliday # Changed to work with linux when HDF is not installed. # # Revision 1.19 2005/11/07 19:27:18 soliday # Updated for Linux. # # Revision 1.18 2005/11/01 15:44:04 soliday # Modified so that it does not build hdf2sdds on gnu solaris builds. # # Revision 1.17 2005/10/28 16:26:12 soliday # Updated to work with solaris-sparc64 # # Revision 1.16 2005/09/28 18:27:51 soliday # Do not link with hdf5 if it does not exist. # # Revision 1.15 2005/09/22 19:48:30 soliday # Added hdf2sdds # # Revision 1.14 2005/07/29 21:14:31 soliday # Updated to build with Blue Gene/L. linux-ppc-bgl-gnu # # Revision 1.13 2005/07/29 19:47:27 soliday # Changed curses to ncurses because some linux distributions only have # ncurses. # # Revision 1.12 2005/02/25 22:55:29 soliday # Fixed last change. # # Revision 1.11 2005/02/25 22:44:30 soliday # Updated so that static builds work on solaris. # # Revision 1.10 2005/01/21 20:30:44 soliday # Updated to support purify on Linux # # Revision 1.9 2004/03/16 16:57:02 soliday # Updated purify, quantify, and purecov build rules # # Revision 1.8 2003/08/28 22:14:24 soliday # Cleaned up the code. # # Revision 1.7 2003/07/25 16:03:02 soliday # Fixed another issue with Linux. # # Revision 1.6 2003/07/23 20:32:20 soliday # Fixed issue with Linux # # Revision 1.5 2003/07/23 19:20:06 soliday # Added change for solaris # # Revision 1.4 2003/07/23 18:10:17 soliday # Fixed for WIN32 # # Revision 1.3 2003/07/23 06:18:19 soliday # Fixed issue with last change # # Revision 1.2 2003/07/23 06:10:50 soliday # Changed PROD_LIBS to USR_LIBS # # Revision 1.1 2003/07/23 02:26:24 soliday # Modified makefiles to work with base versions 3.13 and 3.14 # # CMPLR = ANSI #RATIONAL = purify #RATIONAL = quantify #RATIONAL = purecov ifdef RATIONAL HOST_OPT = NO CC := $(RATIONAL) -best-effort $(CC) CCC := $(RATIONAL) -best-effort $(CCC) endif ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) PROD = editstring replaceText else PROD_HOST = editstring replaceText endif USR_CFLAGS = -DH5_USE_16_API -I$(EPICS_EXTENSIONS_INCLUDE) -DzLib ifeq ($(OS_CLASS),solaris) ACC_DEP_CFLAGS += -KPIC -v CCC_DEP_CFLAGS += -KPIC -v GCC_DEP_CFLAGS += -D__EXTENSIONS__ endif ifdef WIN32 USR_LIBS += mdbcommon SDDS1 mdblib z z_DIR = $(INSTALL_LIB) else USR_LIBS = mdbcommon matlib fftpack SDDS1 rpnlib mdbmth mdblib SYS_PROD_LIBS_DEFAULT += z gsl gslcblas ifeq ($(NCURSES),NO) SYS_PROD_LIBS_Linux += z gsl gslcblas else SYS_PROD_LIBS_Linux += z ncurses gsl gslcblas endif SYS_PROD_LIBS_solaris += curses #Build hdf2sdds on Linux if the HDF5 library is installed. #The HDF5 library should already be installed. #If it is not already installed, it can be easily installed using an RPM. ifeq ($(OS_CLASS),Linux) HDF_LIB_LOCATION = $(wildcard /usr/lib/libhdf5.a /usr/lib/libhdf5.so /usr/lib64/libhdf5.a /usr/lib64/libhdf5.so) ifneq ($(words $(notdir $(HDF_LIB_LOCATION))), 0) ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) PROD += hdf2sdds else PROD_HOST += hdf2sdds endif #ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) SYS_PROD_LIBS_Linux += hdf5 endif #ifneq ($(words $(notdir $(HDF_LIB_LOCATION))), 0) endif #ifeq ($(OS_CLASS),Linux) #If on 32bit Solaris, check if the local HDF5 librarys exists. If they do #then build hdf2sdds ifeq ($(OS_CLASS),solaris) OP_SYS_LDLIBS += -lz -lrt ifneq ($(EPICS_HOST_ARCH),solaris-x86) ifneq ($(EPICS_HOST_ARCH),solaris-x86_64) ifneq ($(EPICS_HOST_ARCH),solaris-sparc64) ifneq ($(EPICS_HOST_ARCH),solaris-sparc-gnu) ifneq ($(ANSI), GCC) HDF_LIB_LOCATION = $(wildcard /home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/hdf/solaris-sparc/lib/libhdf5.a) HDF_INCLUDE_LOCATION = $(wildcard /home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/hdf/solaris-sparc/include/hdf5.h) SZIP_LIB_LOCATION = $(wildcard /home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/szip/solaris-sparc/lib/libsz.a) ifneq ($(words $(notdir $(HDF_LIB_LOCATION))), 0) ifneq ($(words $(notdir $(HDF_INCLUDE_LOCATION))), 0) ifneq ($(words $(notdir $(SZIP_LIB_LOCATION))), 0) ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) PROD += hdf2sdds else PROD_HOST += hdf2sdds endif #ifeq ($(EPICS_VERSION).$(EPICS_REVISION),3.13) SYS_PROD_LIBS_solaris += hdf5 sz SYS_PROD_LIBS_solaris += socket nsl z USR_LDFLAGS += -L/home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/hdf/solaris-sparc/lib -L/home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/szip/solaris-sparc/lib USR_CFLAGS += -I/home/oxygen/SOLIDAY/epics/extensions/src/SDDS/utils/hdf/solaris-sparc/include endif #ifneq ($(words $(notdir $(SZIP_LIB_LOCATION))), 0) endif #ifneq ($(words $(notdir $(HDF_INCLUDE_LOCATION))), 0) endif #ifneq ($(words $(notdir $(HDF_LIB_LOCATION))), 0) endif #ifneq ($(ANSI), GCC) endif #ifneq ($(EPICS_HOST_ARCH),solaris-sparc-gnu) endif #ifneq ($(EPICS_HOST_ARCH),solaris-sparc64) endif #ifneq ($(EPICS_HOST_ARCH),solaris-x86_64) endif #ifneq ($(EPICS_HOST_ARCH),solaris-x86) endif #ifeq ($(OS_CLASS),solaris) endif #ifdef WIN32 mdblib_DIR = $(INSTALL_LIB) mdbcommon_DIR = $(INSTALL_LIB) SDDS1_DIR = $(INSTALL_LIB) matlib_DIR = $(INSTALL_LIB) fftpack_DIR = $(INSTALL_LIB) rpnlib_DIR = $(INSTALL_LIB) mdbmth_DIR = $(INSTALL_LIB)