(file) Return to make_basic.mk CVS log (file) (dir) Up to [Development] / JSOC

Diff for /JSOC/make_basic.mk between version 1.78 and 1.83

version 1.78, 2012/09/26 04:50:49 version 1.83, 2015/05/20 20:43:05
Line 1 
Line 1 
   #***********************************************************************************************#
   #
   # INITIALIZATION
   #
   
 VPATH  = $(SRCDIR) VPATH  = $(SRCDIR)
 STATIC = STATIC =
 DBMS = POSTGRESQL DBMS = POSTGRESQL
   CUSTOMSW =
  
 # Run a script to determine the machine on which make is being run. This # Run a script to determine the machine on which make is being run. This
 # MAY return a machine type, if the host found falls into one of several # MAY return a machine type, if the host found falls into one of several
 # categories (like dbserver). # categories (like dbserver).
 MACHTYPE = $(shell $(SRCDIR)/getmachtype.pl)  MACHTYPE = $(shell hostname)
  
 # If MACH was set when the make command was issued (eg., make MACH='N02'), then # If MACH was set when the make command was issued (eg., make MACH='N02'), then
 # use its value for the output/obj directory and use the custom.mk variables  # use its value for the output/obj directory and use the drmsparams.mk variables
 # relevant to its value. Otherwise, use $(JSOC_MACHINE). # relevant to its value. Otherwise, use $(JSOC_MACHINE).
 ifeq ($(MACH),) ifeq ($(MACH),)
 MACH = $(JSOC_MACHINE) MACH = $(JSOC_MACHINE)
Line 23  FCOMPILER = ifort
Line 29  FCOMPILER = ifort
 MPICOMPILER = $(MPI_PATH)/mpicc MPICOMPILER = $(MPI_PATH)/mpicc
 MPIFCOMPILER = $(MPI_PATH)/mpif90 MPIFCOMPILER = $(MPI_PATH)/mpif90
  
 # can set through custom.mk or through environment  # can set through drmsparams.mk or through environment
 ifneq ($(JSOC_COMPILER),) ifneq ($(JSOC_COMPILER),)
 COMPILER = $(JSOC_COMPILER) COMPILER = $(JSOC_COMPILER)
 endif endif
Line 35  endif
Line 41  endif
  
 #***********************************************************************************************# #***********************************************************************************************#
 # This optional file has custom definitions created by the configure script. # This optional file has custom definitions created by the configure script.
 # Do this after compiler selection since custom.mk might use $COMPILER or $FCOMPILER.  # Do this after compiler selection since drmsparams.mk might use $COMPILER or $FCOMPILER.
 # custom.mk might also set compiler (through moreconfigure.pl)  # drmsparams.mk might also set compiler (through moreconfigure.pl)
 -include $(SRCDIR)/$(LOCALIZATIONDIR)/custom.mk  -include $(SRCDIR)/$(LOCALIZATIONDIR)/drmsparams.mk
 #***********************************************************************************************# #***********************************************************************************************#
  
 #***********************************************************************************************# #***********************************************************************************************#
Line 122  FFTWL = -L$(FFTW_LIBS)
Line 128  FFTWL = -L$(FFTW_LIBS)
 FFTW3LIBS = $(FFTWL) -lfftw3 FFTW3LIBS = $(FFTWL) -lfftw3
 FFTW3FLIBS = $(FFTWL) -lfftw3f FFTW3FLIBS = $(FFTWL) -lfftw3f
  
   # TAR
   LIBTARH = -I$(TAR_INCS)
   LIBTARL = -L$(TAR_LIBS) -ltar
   
   # Python
   LIBPYH = -I$(PY_INCS)
   LIBPYL = -L$(PY_LIBS) -l$(PY_LIB)
   PYTHONHOME = "\"$(PY_HOME)\""
   
 #***********************************************************************************************# #***********************************************************************************************#
  
  
Line 130  FFTW3FLIBS = $(FFTWL) -lfftw3f
Line 145  FFTW3FLIBS = $(FFTWL) -lfftw3f
 # CUSTOM BUILDS # CUSTOM BUILDS
 # #
 # Compilation define customizations (eg., for remote DRMS builds) # Compilation define customizations (eg., for remote DRMS builds)
 CUSTOMSW =  
 ifneq ($(DRMS_DEFAULT_RETENTION),) ifneq ($(DRMS_DEFAULT_RETENTION),)
 #       CUSTOMSW = $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION="\"$(DRMS_DEFAULT_RETENTION)\"" #       CUSTOMSW = $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION="\"$(DRMS_DEFAULT_RETENTION)\""
         CUSTOMSW := $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION=$(DRMS_DEFAULT_RETENTION)         CUSTOMSW := $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION=$(DRMS_DEFAULT_RETENTION)
 endif endif
  
 ifneq ($(CUSTOM_DEFINES),)  # Due to legacy code, the name __LOCALIZED_DEFS__ must be used for NetDRMS builds.
 CUSTOMSW := $(CUSTOMSW) -D$(CUSTOM_DEFINES)  # Despite the name, this macro has nothing to do with localized definitions. It means
   # "not Stanford JSOC-SDP" (it essentially means NetDRMS). So, if __LOCALIZED_DEFS__ is set, then
   # the binaries were built for use outside of Stanford.
   # For future use, we also define the NETDRMS_BUILD as a synonym, but with a more appropriate name.
   # __LOCALIZED_DEFS__ is deprecated and should not be used in new code.
   ifeq ($(BUILD_TYPE),NETDRMS)
   CUSTOMSW := $(CUSTOMSW) -DNETDRMS_BUILD -D__LOCALIZED_DEFS__
   endif
   
   # Stanford builds are marked by the JSOC_SDP_BUILD  macro.
   ifeq ($(BUILD_TYPE),JSOC_SDP)
   CUSTOMSW := $(CUSTOMSW) -DJSOC_SDP_BUILD
 endif endif
  
 # #
Line 194  endif
Line 219  endif
 # #
 # Link flags for all targets # Link flags for all targets
 # #
 LL_ALL          = $(SYSLIBS)  LL_ALL          = $(SYSLIBS) -lcurl
 GCC_LF_ALL      = $(STATIC) GCC_LF_ALL      = $(STATIC)
 ICC_LF_ALL      = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic ICC_LF_ALL      = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic
  
Line 213  ICC_CF_ICCCOMP = -DICCCOMP -openmp
Line 238  ICC_CF_ICCCOMP = -DICCCOMP -openmp
  
 # can't figure out how to get stupid make to do if/else if/else # can't figure out how to get stupid make to do if/else if/else
 ifeq ($(DEBUG), 0) ifeq ($(DEBUG), 0)
   GCC_CF_ALL    = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG    GCC_CF_ALL    = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG -DPYTHONHOME=$(PYTHONHOME)
  
   ifeq ($(JSOC_MACHINE), linux_x86_64)   ifeq ($(JSOC_MACHINE), linux_x86_64)
     ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG      ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG -DPYTHONHOME=$(PYTHONHOME)
     GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG      GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DPYTHONHOME=$(PYTHONHOME)
   endif   endif
  
   ifeq ($(JSOC_MACHINE), linux_avx)   ifeq ($(JSOC_MACHINE), linux_avx)
     ICC_CF_ALL = -xavx -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG      ICC_CF_ALL = -xavx -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG -DPYTHONHOME=$(PYTHONHOME)
   endif   endif
  
   ifeq ($(JSOC_MACHINE), linux_ia64)   ifeq ($(JSOC_MACHINE), linux_ia64)
     ICC_CF_ALL  = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG      ICC_CF_ALL  = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG -DPYTHONHOME=$(PYTHONHOME)
   endif   endif
  
   ifeq ($(JSOC_MACHINE), linux_ia32)   ifeq ($(JSOC_MACHINE), linux_ia32)
     GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=i686 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG      GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=i686 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG -DPYTHONHOME=$(PYTHONHOME)
   endif   endif
  
 else else
 # -g tells the icc and gcc compilers to generate full debugging information # -g tells the icc and gcc compilers to generate full debugging information
   GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW)    GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DPYTHONHOME=$(PYTHONHOME)
   ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW)    ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DPYTHONHOME=$(PYTHONHOME)
 endif endif
  
 # Fortran global COMPILE flags # Fortran global COMPILE flags
Line 322  include $(SRCDIR)/Rules.mk
Line 347  include $(SRCDIR)/Rules.mk
  
 # Libraries from src/util linked with all programs. # Libraries from src/util linked with all programs.
 ifneq ($(COMPILER), icc) ifneq ($(COMPILER), icc)
   SYSLIBS = -lz -ldl -lpthread -lm    SYSLIBS = -lz -ldl -lpthread -lm -lutil $(LIBPYL) -Xlinker -export-dynamic
 else else
   SYSLIBS = -lz -ldl -lpthread    SYSLIBS = -lz -ldl -lpthread -lutil $(LIBPYL) -Xlinker -export-dynamic
 endif endif
 SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) $(LIBSTATS) SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) $(LIBSTATS)
 FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) $(LIBSTATS) FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) $(LIBSTATS)


Legend:
Removed from v.1.78  
changed lines
  Added in v.1.83

Karen Tian
Powered by
ViewCVS 0.9.4