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

Diff for /JSOC/make_basic.mk between version 1.44 and 1.47

version 1.44, 2009/04/21 00:45:16 version 1.47, 2009/07/24 14:13:48
Line 2  VPATH = $(SRCDIR)
Line 2  VPATH = $(SRCDIR)
 STATIC = STATIC =
 DBNAME = POSTGRESQL DBNAME = POSTGRESQL
  
   # This optional file has custom definitions created by the configure script
   -include $(SRCDIR)/custom.mk
   
 PGIPATH = /usr/include/pgsql PGIPATH = /usr/include/pgsql
  
   _JSOCROOT_ = ..
   
   #***********************************************************************************************#
   #
   # COMPILER SELECTION
   #
 COMPILER = icc COMPILER = icc
 F77 = ifort  FCOMPILER = ifort
  
 # This optional file has custom definitions created by the configure script  ifneq ($(JSOC_AUTOCOMPILER),)
 -include $(SRCDIR)/custom.mk  COMPILER = $(JSOC_AUTOCOMPILER)
   endif
   
   ifneq ($(JSOC_AUTOFCOMPILER),)
   FCOMPILER = $(JSOC_AUTOFCOMPILER)
   endif
  
 # ifeq ($(JSOC_MACHINE), mac_osx_ppc)  # can set through custom.mk or through environment
 # COMPILER = gcc  ifneq ($(JSOC_COMPILER),)
 # F77 = f77  COMPILER = $(JSOC_COMPILER)
 # endif  endif
 # ifeq ($(JSOC_MACHINE), mac_osx_ia32)  
 # COMPILER = gcc  ifneq ($(JSOC_FCOMPILER),)
 # F77 = f77  FCOMPILER = $(JSOC_FCOMPILER)
 # endif  endif
   #***********************************************************************************************#
  
   
   #***********************************************************************************************#
   #
   # DEBUGGING
   #
 # 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
 #   modify the following line so that DEBUG = 1.  The environment variable takes precedence. #   modify the following line so that DEBUG = 1.  The environment variable takes precedence.
   #
 DEBUG = 0 DEBUG = 0
  
 ifdef JSOC_DEBUG ifdef JSOC_DEBUG
Line 31  else
Line 52  else
 DEBUG = 0 DEBUG = 0
 endif endif
 endif endif
   #***********************************************************************************************#
  
   
   #***********************************************************************************************#
   #
   # WARNINGS
   #
 # 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). # Builder can request warnings via environment variable (setenv JSOC_WARN 1).
Line 49  endif
Line 77  endif
 ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
 WARN = 1 WARN = 1
 endif endif
   #***********************************************************************************************#
  
 _JSOCROOT_ = ..  
   
 # if fortran compiler  
 D_GCC_FORT =  
 ifeq ($(F77), ifort)  
   D_GCC_FORT = -DINTEL_FORTRAN  
 endif  
   
 ifeq ($(JSOC_MACHINE), linux_x86_64)  
   ifeq ($(F77), ifort)  
     F77 = ifort -mcmodel=medium  
   endif  
 endif  
  
 #***********************************************************************************************# #***********************************************************************************************#
 # #
   # THIRD-PARTY LIBRARIES
   #
 # This section contains make variables that hold the paths to and names of third-party libraries. # 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 # 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 # for the library headers, variables that end in 'L' contain the -L link flags that
Line 127  GSLLIBS = $(GSLL) -lgsl -lgslcblas
Line 145  GSLLIBS = $(GSLL) -lgsl -lgslcblas
 #***********************************************************************************************# #***********************************************************************************************#
  
  
   #***********************************************************************************************#
   #
   # CUSTOM BUILDS
   #
 # Compilation define customizations (eg., for remote DRMS builds) # Compilation define customizations (eg., for remote DRMS builds)
 CUSTOMSW = CUSTOMSW =
 ifneq ($(DRMS_DEFAULT_RETENTION),) ifneq ($(DRMS_DEFAULT_RETENTION),)
Line 138  ifneq ($(CUSTOM_DEFINES),)
Line 160  ifneq ($(CUSTOM_DEFINES),)
 CUSTOMSW := $(CUSTOMSW) -D$(CUSTOM_DEFINES) CUSTOMSW := $(CUSTOMSW) -D$(CUSTOM_DEFINES)
 endif endif
  
 ### Build flags for all targets  
 # #
 LL_ALL          = $(SYSLIBS)  #***********************************************************************************************#
   
 GCC_LF_ALL      = $(STATIC) -g  
 ifeq ($(JSOC_MACHINE), linux_ia64)  
   ICC_LF_ALL    = $(STATIC)  
 else  
   ICC_LF_ALL    = $(STATIC) -xW  
 endif  
  
 GCC_CF_GCCCOMP  = -DGCCCOMP $(D_GCC_FORT)  
 ICC_CF_ICCCOMP  = -DICCCOMP $(D_GCC_FORT)  
  
   #***********************************************************************************************#
   #
   # WARNINGS
   #
 # Disable several warnings/remarks when compiling with icc - icc's Wall is a bit picky, it # Disable several warnings/remarks when compiling with icc - icc's Wall is a bit picky, it
 # complains about extern declarations in .c files. # complains about extern declarations in .c files.
 #   1418 (remark) - external function definition with no prior declaration #   1418 (remark) - external function definition with no prior declaration
Line 163  ifeq ($(WARN), 1)
Line 179  ifeq ($(WARN), 1)
 # Show warnings (always true for a debug build). # Show warnings (always true for a debug build).
 ICC_WARN = -Winline -Wall -wd1418 -wd1419 -wd310 -wd279 -wd981 -Wno-comment ICC_WARN = -Winline -Wall -wd1418 -wd1419 -wd310 -wd279 -wd981 -Wno-comment
 GCC_WARN = -Winline -Wall -Wno-comment GCC_WARN = -Winline -Wall -Wno-comment
 F77_WARN =  FCOMPILER_WARN =
 else else
 # Don't show warnings. # Don't show warnings.
 ICC_WARN = -w0 -vec-report0 -Wno-comment ICC_WARN = -w0 -vec-report0 -Wno-comment
 GCC_WARN = -Wno-comment GCC_WARN = -Wno-comment
 F77_WARN = -vec-report0  ifeq ($(FCOMPILER), ifort)
   FCOMPILER_WARN = -vec-report0
   else
   FCOMPILER_WARN =
 endif endif
   endif
   #***********************************************************************************************#
   
   
   #***********************************************************************************************#
   #
   # GLOBAL LINK FLAGS
   #
   # Link flags for all targets
   #
   LL_ALL          = $(SYSLIBS)
   GCC_LF_ALL      = $(STATIC)
   ICC_LF_ALL      = $(STATIC)
   
   # Fortran global LINK flags
   F_LF_ALL        = -nofor_main -no-ipo
   #***********************************************************************************************#
   
   #***********************************************************************************************#
   #
   # GLOBAL COMPILE FLAGS
   #
   GCC_CF_GCCCOMP  = -DGCCCOMP
   ICC_CF_ICCCOMP  = -DICCCOMP
  
 # 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)   GCC_CF_ALL    = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW)
   # -xW tells the icc compiler to optimize for Pentium 4
   ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -xW $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)   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)
Line 189  ifeq ($(DEBUG), 0)
Line 233  ifeq ($(DEBUG), 0)
   endif   endif
  
 else else
   # -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)   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 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)   ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE -g $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW)
   endif
  
   # Fortran global COMPILE flags
   ifeq ($(JSOC_MACHINE), linux_x86_64)
     ifeq ($(FCOMPILER), ifort)
       F_CF_ALL := -mcmodel=medium
     endif
 endif endif
  
 # Fortran global LINK flags  # Other compiler-specific Fortran COMPILE flags
 F_LF_ALL        = -nofor_main -no-ipo  ifeq ($(FCOMPILER), ifort)
     ifeq ($(JSOC_MACHINE), linux_x86_64)
       FCFLAGS_OPT := -xW
     endif
     FCLFAGS_INIT := -ftrapuv
   else
     # must be gfortran
     FCFLAGS_OPT   := -g
     FCLFAGS_INIT  :=
   endif
  
 # Fortran global COMPILE flags  
 ifeq ($(DEBUG), 0) ifeq ($(DEBUG), 0)
 FF_ALL          = -xW -ftrapuv $(F77_WARN)  # -xW optimizes ifort compilation for Pentium 4
   # -ftrapuv initializes stack local variables to an unusual value to aid error detection.
     F_CF_ALL      := $(F_CF_ALL) $(FCFLAGS_OPT) $(FCLFAGS_INIT) $(FCOMPILER_WARN)
 else else
 FF_ALL          = -ftrapuv $(F77_WARN)    F_CF_ALL      := $(F_CF_ALL) $(FCLFAGS_INIT) $(FCOMPILER_WARN)
 endif endif
   #***********************************************************************************************#
   
  
 ### Build tools  #***********************************************************************************************#
   #
   # BUILD TOOLS
 # #
 # The C compiler named here must output full (header) dependencies in $(@).d. # The C compiler named here must output full (header) dependencies in $(@).d.
 # It may be necessary to create a script similar to ccd-gcc for your compiler. # It may be necessary to create a script similar to ccd-gcc for your compiler.
Line 236  else
Line 300  else
   COMPLINK      = $(ICC_COMPLINK)   COMPLINK      = $(ICC_COMPLINK)
 endif endif
  
 FCOMP           = $(F77) $(FF_ALL) $(FF_TGT) -o $@ -c $<  FCOMP           = $(FCOMPILER) $(F_CF_ALL) $(FF_TGT) -o $@ -c $<
 FLINK           = $(F77) $(F_LF_ALL) $(LF_TGT) -o $@ $^ $(LL_TGT) $(LL_ALL)  FLINK           = $(FCOMPILER) $(F_LF_ALL) $(LF_TGT) -o $@ $^ $(LL_TGT) $(LL_ALL)
  
 SLBIN           = ln -sf ../../_$(JSOC_MACHINE)/$@ ../bin/$(JSOC_MACHINE)/ SLBIN           = ln -sf ../../_$(JSOC_MACHINE)/$@ ../bin/$(JSOC_MACHINE)/
 SLLIB           = ln -sf ../../_$(JSOC_MACHINE)/$@ ../lib/$(JSOC_MACHINE)/ SLLIB           = ln -sf ../../_$(JSOC_MACHINE)/$@ ../lib/$(JSOC_MACHINE)/
   #***********************************************************************************************#
  
   
   #***********************************************************************************************#
   #
   # LIBRARY COLLECTIONS
   #
 ALL_LIBS_FPIC = $(LIBDRMSCLIENT_FPIC) $(LIBDBCLIENT_FPIC) $(LIBCMDPARAMS_FPIC) $(LIBTHREADUTIL_FPIC) $(LIBRICECOMP_FPIC) $(LIBDEFS_FPIC) $(LIBMISC_FPIC) $(LIBDSTRUCT_FPIC) $(LIBTIMEIO_FPIC) $(LIBFITSRW_FPIC) ALL_LIBS_FPIC = $(LIBDRMSCLIENT_FPIC) $(LIBDBCLIENT_FPIC) $(LIBCMDPARAMS_FPIC) $(LIBTHREADUTIL_FPIC) $(LIBRICECOMP_FPIC) $(LIBDEFS_FPIC) $(LIBMISC_FPIC) $(LIBDSTRUCT_FPIC) $(LIBTIMEIO_FPIC) $(LIBFITSRW_FPIC)
  
 ### Standard parts ### Standard parts
Line 275  MODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK) $(LI
Line 345  MODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK) $(LI
  
 # FMODLIBS: Libraries linked with DRMS Fortran modules # FMODLIBS: Libraries linked with DRMS Fortran modules
 FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $(LIBINTHANDLESF) $(LIBDRMSCLIENT) $(LIBDEFSCLIENT) $(LIBDBCLIENT) $(FSRCLIBS) FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $(LIBINTHANDLESF) $(LIBDRMSCLIENT) $(LIBDEFSCLIENT) $(LIBDBCLIENT) $(FSRCLIBS)
   #***********************************************************************************************#
   
  
   #***********************************************************************************************#
   #
   # PROJECT MAKE RULES
   #
 # Make rules that apply to all projects outside of the base DRMS/SUMS system # Make rules that apply to all projects outside of the base DRMS/SUMS system
 -include $(SRCDIR)/proj/make_basic.mk -include $(SRCDIR)/proj/make_basic.mk
   #***********************************************************************************************#
   
  
   #***********************************************************************************************#
   #
   # MODULE TYPES
   #
 # Make rules that apply to all projects, inside and outside of the base DRMS/SUMS system # Make rules that apply to all projects, inside and outside of the base DRMS/SUMS system
 $(CEXE):        %:      %.o $(EXELIBS) $(CEXE):        %:      %.o $(EXELIBS)
                 $(LINK)                 $(LINK)
Line 320  $(MODEXE_USEF_SOCK): LL_TGT := $(LL_TGT)
Line 402  $(MODEXE_USEF_SOCK): LL_TGT := $(LL_TGT)
 $(MODEXE_USEF_SOCK): %_sock: %.o $(MODLIBS_SOCK) $(MODEXE_USEF_SOCK): %_sock: %.o $(MODLIBS_SOCK)
                         $(FLINK)                         $(FLINK)
                         $(SLBIN)                         $(SLBIN)
   #***********************************************************************************************#


Legend:
Removed from v.1.44  
changed lines
  Added in v.1.47

Karen Tian
Powered by
ViewCVS 0.9.4