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

Diff for /JSOC/make_basic.mk between version 1.22 and 1.40

version 1.22, 2008/07/14 21:06:04 version 1.40, 2009/04/10 20:19:49
Line 2  VPATH = $(SRCDIR)
Line 2  VPATH = $(SRCDIR)
 STATIC = STATIC =
 DBNAME = POSTGRESQL DBNAME = POSTGRESQL
  
 # USED BY NEITHER linux_x86_64 nor linux_ia32  # This optional file has custom definitions created by the configure script
 PGIPATH = /usr/include/pgsql  -include $(SRCDIR)/custom.mk
  
   PGIPATH = /usr/include/pgsql
  
 COMPILER = icc COMPILER = icc
   ifeq ($(JSOC_MACHINE), mac_osx_ppc)
   COMPILER = gcc
   endif
   ifeq ($(JSOC_MACHINE), mac_osx_ia32)
   COMPILER = gcc
   endif
  
 # Check for debug vs. release build - release is default. # Check for debug vs. release build - release is default.
 #   To do a debug build, either set the environment variable JSOC_DEBUG to 1, OR #   To do a debug build, either set the environment variable JSOC_DEBUG to 1, OR
Line 24  endif
Line 31  endif
 # No warnings are displayed, by default, for a release build. # No warnings are displayed, by default, for a release build.
 WARN = 0 WARN = 0
  
 # Builder can request warnings via environment variable (setenv JSOC_WARN 1).  The  # Builder can request warnings via environment variable (setenv JSOC_WARN 1).
 #   environment variable takes precedence.  #   The environment variable takes precedence.
 ifdef JSOC_WARN ifdef JSOC_WARN
 ifeq ($(JSOC_WARN), 1) ifeq ($(JSOC_WARN), 1)
 WARN = 1 WARN = 1
Line 41  endif
Line 48  endif
  
 _JSOCROOT_ = .. _JSOCROOT_ = ..
  
   ifeq ($(JSOC_MACHINE), mac_osx)
   F77 = f77
   else
 F77 = ifort F77 = ifort
   endif
   
 # if fortran compiler # if fortran compiler
 D_GCC_FORT = D_GCC_FORT =
 ifeq ($(F77), ifort) ifeq ($(F77), ifort)
Line 52  ifeq ($(JSOC_MACHINE), linux_x86_64)
Line 64  ifeq ($(JSOC_MACHINE), linux_x86_64)
   F77 = ifort -mcmodel=medium   F77 = ifort -mcmodel=medium
 endif endif
  
   #***********************************************************************************************#
   #
   # This section contains make variables that hold the paths to and names of third-party libraries.
   # Variables that end in 'H' contain the -I link flags that contain the include paths
   # for the library headers, variables that end in 'L' contain the -L link flags that
   # contain the paths to the library binaries, and variables
   # that end in "LIBS" contain the full link cmd (the -L flag plus the -l flag)
   #
 # Path to 3rd-party library headers # Path to 3rd-party library headers
 FMATHLIBSH = -I$(_JSOCROOT_)/lib_third_party/include FMATHLIBSH = -I$(_JSOCROOT_)/lib_third_party/include
 CFITSIOH = -I$(_JSOCROOT_)/lib_third_party/include CFITSIOH = -I$(_JSOCROOT_)/lib_third_party/include
Line 73  ifeq ($(JSOC_MACHINE), linux_ia32)
Line 93  ifeq ($(JSOC_MACHINE), linux_ia32)
   GSLL = -L$(_JSOCROOT_)/lib_third_party/lib/linux_ia32/   GSLL = -L$(_JSOCROOT_)/lib_third_party/lib/linux_ia32/
   ECPGL = -L$(_JSOCROOT_)/lib_third_party/lib/linux_ia32/   ECPGL = -L$(_JSOCROOT_)/lib_third_party/lib/linux_ia32/
 endif endif
 ifeq ($(JSOC_MACHINE), mac_osx)  ifeq ($(JSOC_MACHINE), mac_osx_ppc)
 #    FMATHLIBS = -lmkl_lapack -lmkl -L$(_JSOCROOT_)/lib_third_party/lib/linux-ia32/ -lfftw3f -lcfitsio #    FMATHLIBS = -lmkl_lapack -lmkl -L$(_JSOCROOT_)/lib_third_party/lib/linux-ia32/ -lfftw3f -lcfitsio
   # Path to 32-bit 3rd-party libraries    # Path to appropriate 3rd-party libraries
   FMATHLIBSL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx/    FMATHLIBSL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ppc/
   CFITSIOL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx/    CFITSIOL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ppc/
   GSLL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx/    GSLL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ppc/
   ECPGL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx/    ECPGL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ppc/
   endif
   ifeq ($(JSOC_MACHINE), mac_osx_ia32)
   #    FMATHLIBS = -lmkl_lapack -lmkl -L$(_JSOCROOT_)/lib_third_party/lib/linux-ia32/ -lfftw3f -lcfitsio
     # Path to appropriate 3rd-party libraries
     FMATHLIBSL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ia32/
     CFITSIOL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ia32/
     GSLL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ia32/
     ECPGL = -L$(_JSOCROOT_)/lib_third_party/lib/mac_osx_ia32/
 endif endif
  
 # All 3rd-party math libraries - local rules can define a subset # All 3rd-party math libraries - local rules can define a subset
 FMATHLIBS = $(FMATHLIBSL) -lfftw3f -lcfitsio  FMATHLIBS = $(FMATHLIBSL) -lfftw3f
 CFITSIOLIBS = $(CFITSIOL) -lcfitsio CFITSIOLIBS = $(CFITSIOL) -lcfitsio
   
   ifeq ($(COMPILER), gcc)
           ifeq ($(JSOC_MACHINE), linux_x86_64)
                   ifneq ($(CFITSIOFNAME_GCC_X86_64),)
                           FMATHLIBS = $(FMATHLIBSL) -lfftw3f -l$(CFITSIOFNAME_GCC_X86_64)
                           CFITSIOLIBS = $(CFITSIOL) -l$(CFITSIOFNAME_GCC_X86_64)
                   endif
           endif
   endif
   
 GSLLIBS = $(GSLL) -lgsl -lgslcblas GSLLIBS = $(GSLL) -lgsl -lgslcblas
   #***********************************************************************************************#
   
   
   # Compilation define customizations (eg., for remote DRMS builds)
   CUSTOMSW =
   ifneq ($(DRMS_DEFAULT_RETENTION),)
   #       CUSTOMSW = $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION="\"$(DRMS_DEFAULT_RETENTION)\""
           CUSTOMSW := $(CUSTOMSW) -DDRMS_DEFAULT_RETENTION=$(DRMS_DEFAULT_RETENTION)
   endif
   
   ifneq ($(CUSTOM_DEFINES),)
   CUSTOMSW := $(CUSTOMSW) -D$(CUSTOM_DEFINES)
   endif
  
 ### Build flags for all targets ### Build flags for all targets
 # #
Line 122  endif
Line 173  endif
  
 # 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)    GCC_CF_ALL    = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW)
   ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -xW $(ICC_WARN) $(ICC_CF_ICCCOMP)    ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -xW $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)
  
   ifeq ($(JSOC_MACHINE), linux_x86_64)   ifeq ($(JSOC_MACHINE), linux_x86_64)
     GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP)      GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW)
   endif   endif
  
   ifeq ($(JSOC_MACHINE), linux_ia64)   ifeq ($(JSOC_MACHINE), linux_ia64)
     GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP)      ICC_CF_ALL  = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)
     ICC_CF_ALL  = -I$(SRCDIR)/base/include -std=c99 $(ICC_WARN) $(ICC_CF_ICCCOMP)  
   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)      GCC_CF_ALL  = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=i686 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW)
   endif   endif
  
 else else
  
   GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP)    GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW)
   ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -g $(ICC_WARN) $(ICC_CF_ICCCOMP)    ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)
  
 endif endif
  
Line 204  ifneq ($(COMPILER), icc)
Line 254  ifneq ($(COMPILER), icc)
 else else
   SYSLIBS = -lz -ldl -lpthread   SYSLIBS = -lz -ldl -lpthread
 endif endif
 SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBMISC) $(LIBDEFS) $(LIBDSTRUCT) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG)  SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBDSTRUCT) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBMISC)
 FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBMISC) $(LIBDEFS) $(LIBDSTRUCT) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG)  FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBDSTRUCT) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBMISC)
  
 ########## Libraries to link for server executables,    ############## ########## Libraries to link for server executables,    ##############
 ########## standalone executables and pipeline modules. ############## ########## standalone executables and pipeline modules. ##############
  
 # SERVERLIBS: Libraries linked with "server" programs that # SERVERLIBS: Libraries linked with "server" programs that
 # need direct access to the DRMS databases. # need direct access to the DRMS databases.
 SERVERLIBS = $(LIBDRMS) $(LIBDB) $(LIBSUMSAPI) $(SRCLIBS)  SERVERLIBS = $(LIBDRMS) $(LIBDEFSSERVER) $(LIBDB) $(LIBSUMSAPI) $(SRCLIBS)
  
 # EXELIBS: Libraries linked with standalone executables. # EXELIBS: Libraries linked with standalone executables.
 EXELIBS = $(LIBDRMSCLIENT) $(LIBDBCLIENT) $(SRCLIBS)  EXELIBS = $(LIBDRMSCLIENT) $(LIBDEFSCLIENT) $(LIBDBCLIENT) $(SRCLIBS)
  
 # MODLIBS: Libraries linked with DRMS modules. # MODLIBS: Libraries linked with DRMS modules.
 MODLIBS = $(LIBJSOC_MAIN) $(SERVERLIBS) MODLIBS = $(LIBJSOC_MAIN) $(SERVERLIBS)
  
 # MODLIBS_SOCK: Libraries linked with DRMS modules with socket connection to a drms_server # MODLIBS_SOCK: Libraries linked with DRMS modules with socket connection to a drms_server
 MODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK) $(LIBDRMSCLIENT) $(LIBDBCLIENT) $(SRCLIBS)  MODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK) $(LIBDRMSCLIENT) $(LIBDEFSCLIENT) $(LIBDBCLIENT) $(LIBSUMSAPI) $(SRCLIBS)
  
 # FMODLIBS: Libraries linked with DRMS Fortran modules # FMODLIBS: Libraries linked with DRMS Fortran modules
 FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $(LIBINTHANDLESF) $(LIBDRMSCLIENT) $(LIBDBCLIENT) $(FSRCLIBS)  FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $(LIBINTHANDLESF) $(LIBDRMSCLIENT) $(LIBDEFSCLIENT) $(LIBDBCLIENT) $(FSRCLIBS)
  
 MATHLIBS =  $(LIBLSQR) $(LIBBLAS) $(LIBLAPACK) MATHLIBS =  $(LIBLSQR) $(LIBBLAS) $(LIBLAPACK)
  
Line 254  $(MODEXE_SOCK): LL_TGT := $(LL_TGT) $(CF
Line 304  $(MODEXE_SOCK): LL_TGT := $(LL_TGT) $(CF
 $(MODEXE_SOCK): %_sock: %.o $(MODLIBS_SOCK) $(MODEXE_SOCK): %_sock: %.o $(MODLIBS_SOCK)
                         $(LINK)                         $(LINK)
                         $(SLBIN)                         $(SLBIN)
   # FMODEXE contains all Fortran modules - the DoIt() function is defined inside a .f file.
 $(FMODEXE):     LL_TGT := $(LL_TGT) $(CFITSIOLIBS)  # These are socket-connect modules only. Assume they use third-party Fortran libraries
   # (although this may not be the case).
   $(FMODEXE):     LL_TGT := $(LL_TGT) $(CFITSIOLIBS) $(FMATHLIBS)
 $(FMODEXE):     %_sock: %.o $(FMODLIBS_SOCK) $(FMODEXE):     %_sock: %.o $(FMODLIBS_SOCK)
                         $(FLINK)                         $(FLINK)
                         $(SLBIN)                         $(SLBIN)
  
 $(MODEXE_USEF): LL_TGT := $(LL_TGT) -lpq $(CFITSIOLIBS)  # MODEXE_USEF contains all C direct-connect modules that use third-party Fortran libraries.
   $(MODEXE_USEF): LL_TGT := $(LL_TGT) -lpq $(CFITSIOLIBS) $(FMATHLIBS)
 $(MODEXE_USEF):     %:  %.o $(MODLIBS) $(MODEXE_USEF):     %:  %.o $(MODLIBS)
                         $(FLINK)                         $(FLINK)
                         $(SLBIN)                         $(SLBIN)
   # MODEXE_USEF contains all C socket-connect modules that use third-party Fortran libraries.
 $(MODEXE_USEF_SOCK):    LL_TGT := $(LL_TGT) $(CFITSIOLIBS)  $(MODEXE_USEF_SOCK):    LL_TGT := $(LL_TGT) $(CFITSIOLIBS) $(FMATHLIBS)
 $(MODEXE_USEF_SOCK): %_sock: %.o $(MODLIBS_SOCK) $(MODEXE_USEF_SOCK): %_sock: %.o $(MODLIBS_SOCK)
                         $(FLINK)                         $(FLINK)
                         $(SLBIN)                         $(SLBIN)


Legend:
Removed from v.1.22  
changed lines
  Added in v.1.40

Karen Tian
Powered by
ViewCVS 0.9.4