#************************************************************************* # 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.16 2012/03/22 19:35:19 soliday # Modified because gsl has a GPL license and cannot be distributed # with our software. We can still link against a system library version of gsl. # # Revision 1.15 2009/04/27 17:18:22 soliday # Updated to link to gsl when building the rpnlib library. # # Revision 1.14 2009/04/27 15:58:36 soliday # Updated to compile with the gsl header files. # # Revision 1.13 2009/04/27 14:21:45 borland # Use GSL functions for modified bessel functions. # # Revision 1.12 2005/07/29 21:14:31 soliday # Updated to build with Blue Gene/L. linux-ppc-bgl-gnu # # Revision 1.11 2005/01/21 20:30:44 soliday # Updated to support purify on Linux # # Revision 1.10 2004/03/16 16:57:06 soliday # Updated purify, quantify, and purecov build rules # # Revision 1.9 2003/10/30 21:21:14 soliday # Changed the purify information. # # Revision 1.8 2003/08/28 21:58:47 soliday # Use PROD for EPICS version 3.13 and PROD_HOST for newer versions. # # Revision 1.7 2003/08/28 20:49:10 soliday # Cleaned up the code. # # Revision 1.6 2003/07/25 15:46:16 soliday # Simplified Makefile. # # Revision 1.5 2003/07/23 20:26:04 soliday # Fixed issue on solaris. # # Revision 1.4 2003/07/23 19:17:56 soliday # Added change for solaris # # Revision 1.3 2003/07/23 16:39:54 soliday # Fixed for WIN32 # # Revision 1.2 2003/07/23 05:44:32 soliday # Changed PROD_LIBS to USR_LIBS # # Revision 1.1 2003/07/22 23:29:46 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 = rpn rpnl if2pf #else #PROD_HOST = rpn rpnl if2pf #endif LIBRARY = rpnlib USR_CFLAGS = -I../../../include ifeq ($(OS_CLASS),solaris) ACC_DEP_CFLAGS += -KPIC -v CCC_DEP_CFLAGS += -KPIC -v GCC_DEP_CFLAGS += -D__EXTENSIONS__ endif ifdef KYLIX LDFLAGS += -w-dup endif LIBSRCS = array.c conditional.c execute.c \ get_token_rpn.c infixtopostfix.c logical.c \ math.c memory.c pcode.c \ pop_push.c prompt.c rpn_csh.c \ rpn_data.c rpn_draw.c rpn_error.c \ rpn_io.c rpn_sub.c stack.c \ udf.c rpn_sub_CFLAGS = -DEXPORT_RPNLIB array_CFLAGS = -DEXPORT_RPNLIB conditional_CFLAGS = -DEXPORT_RPNLIB execute_CFLAGS = -DEXPORT_RPNLIB get_token_rpn_CFLAGS = -DEXPORT_RPNLIB logical_CFLAGS = -DEXPORT_RPNLIB math_CFLAGS = -DEXPORT_RPNLIB memory_CFLAGS = -DEXPORT_RPNLIB pcode_CFLAGS = -DEXPORT_RPNLIB pop_push_CFLAGS = -DEXPORT_RPNLIB prompt_CFLAGS = -DEXPORT_RPNLIB stack_CFLAGS = -DEXPORT_RPNLIB udf_CFLAGS = -DEXPORT_RPNLIB rpn_io_CFLAGS = -DEXPORT_RPNLIB rpn_csh_CFLAGS = -DEXPORT_RPNLIB rpn_draw_CFLAGS = -DEXPORT_RPNLIB rpn_error_CFLAGS = -DEXPORT_RPNLIB rpn_data_CFLAGS = -DEXPORT_RPNLIB infixtopostfix_CFLAGS = -DEXPORT_RPNLIB ifeq ($(findstring orland, $(HOST_ARCH) $(EPICS_HOST_ARCH)),orland) memory_CFLAGS += -DDefineBinaryInsert udf_CFLAGS += -DDefineBinaryInsert endif #Look for private version of GSL used here at APS GSL = $(words $(wildcard ../../../gsl)) ifeq ($(GSL), 1) USR_CFLAGS += -I../../../gsl -DUSE_GSL GSLLIB = gsl SYS_GSLLIB = else #Look for system version of GSL SYSGSL = $(words $(notdir $(wildcard \ /usr/lib/libgsl.a \ /usr/lib/libgsl.so \ /usr/lib64/libgsl.a \ /usr/lib64/libgsl.so \ /lib/libgsl.a \ /lib/libgsl.so \ /lib64/libgsl.a \ /lib64/libgsl.so \ /sw/lib/libgsl.a \ /sw/lib/libgsl.dylib \ /usr/sfw/lib/libgsl.a \ /usr/sfw/lib/libgsl.so ))) ifneq ($(SYSGSL), 0) USR_CFLAGS += -DUSE_GSL GSLLIB = SYS_GSLLIB = gsl gslcblas else #No GSL library found. Build without it. USR_CFLAGS += -DUSE_GSL GSLLIB = SYS_GSLLIB = endif endif ifdef WIN32 PROD_LIBS += rpnlib mdbmth mdblib fdlibm $(GSLLIB) DLL_LIBS += mdbmth mdblib fdlibm $(GSLLIB) else PROD_LIBS = rpnlib $(GSLLIB) USR_LIBS = mdbmth mdblib $(GSLLIB) SYS_PROD_LIBS_DEFAULT = z $(SYS_GSLLIB) ifeq ($(NCURSES),NO) SYS_PROD_LIBS_Linux = z $(SYS_GSLLIB) else SYS_PROD_LIBS_Linux = z ncurses $(SYS_GSLLIB) endif SYS_PROD_LIBS_solaris = z curses $(SYS_GSLLIB) endif mdblib_DIR = $(INSTALL_LIB) mdbmth_DIR = $(INSTALL_LIB) fdlibm_DIR = $(INSTALL_LIB) rpnlib_DIR = .