version 1.58, 2009/09/22 23:45:20
|
version 1.72, 2011/09/12 19:15:30
|
|
|
VPATH = $(SRCDIR) | VPATH = $(SRCDIR) |
STATIC = | STATIC = |
DBNAME = POSTGRESQL |
DBMS = POSTGRESQL |
| |
_JSOCROOT_ = .. |
# 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 |
# This optional file has custom definitions created by the configure script |
# categories (like dbserver). |
-include $(SRCDIR)/custom.mk |
MACHTYPE = $(shell $(SRCDIR)/getmachtype.pl) |
| |
# 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 custom.mk variables |
|
|
COMPILER = icc | COMPILER = icc |
FCOMPILER = ifort | FCOMPILER = ifort |
| |
ifneq ($(JSOC_AUTOCOMPILER),) |
|
COMPILER = $(JSOC_AUTOCOMPILER) |
|
endif |
|
|
|
ifneq ($(JSOC_AUTOFCOMPILER),) |
|
FCOMPILER = $(JSOC_AUTOFCOMPILER) |
|
endif |
|
|
|
# can set through custom.mk or through environment | # can set through custom.mk or through environment |
ifneq ($(JSOC_COMPILER),) | ifneq ($(JSOC_COMPILER),) |
COMPILER = $(JSOC_COMPILER) | COMPILER = $(JSOC_COMPILER) |
Line 39 FCOMPILER = $(JSOC_FCOMPILER) |
|
Line 31 FCOMPILER = $(JSOC_FCOMPILER) |
|
endif | endif |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
|
#***********************************************************************************************# |
|
# This optional file has custom definitions created by the configure script. |
|
# Do this after compiler selection since custom.mk might use $COMPILER or $FCOMPILER. |
|
# custom.mk might also set compiler (through moreconfigure.pl) |
|
-include $(SRCDIR)/$(LOCALIZATIONDIR)/custom.mk |
|
#***********************************************************************************************# |
| |
#***********************************************************************************************# | #***********************************************************************************************# |
# | # |
|
|
# All modules must be able to find libdsds.so. The define DRMS_LIBDIR specifies the path to | # All modules must be able to find libdsds.so. The define DRMS_LIBDIR specifies the path to |
# all libraries. | # all libraries. |
| |
GLOBALSW = -DDRMS_LIBDIR="\"$(CURDIR)/../lib/$(MACH)\"" |
GLOBALSW = -DDRMS_LIBDIR="\"$(WORKINGDIR)/lib/$(MACH)\"" |
# | # |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
|
|
# | # |
LL_ALL = $(SYSLIBS) | LL_ALL = $(SYSLIBS) |
GCC_LF_ALL = $(STATIC) | GCC_LF_ALL = $(STATIC) |
ICC_LF_ALL = $(STATIC) |
ICC_LF_ALL = $(STATIC) -openmp -static-intel -Wl,-export-dynamic |
| |
# Fortran global LINK flags | # Fortran global LINK flags |
F_LF_ALL = -nofor_main -no-ipo |
F_LF_ALL = -nofor-main -openmp -static-intel -Wl,-export-dynamic |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
#***********************************************************************************************# | #***********************************************************************************************# |
Line 196 F_LF_ALL = -nofor_main -no-ipo |
|
Line 194 F_LF_ALL = -nofor_main -no-ipo |
|
# GLOBAL COMPILE FLAGS | # GLOBAL COMPILE FLAGS |
# | # |
GCC_CF_GCCCOMP = -DGCCCOMP | GCC_CF_GCCCOMP = -DGCCCOMP |
ICC_CF_ICCCOMP = -DICCCOMP |
ICC_CF_ICCCOMP = -DICCCOMP -openmp |
|
|
CCFLAGS_OPT := |
|
|
|
ifeq ($(COMPILER), icc) |
|
ifeq ($(JSOC_MACHINE), linux_x86_64) |
|
CCFLAGS_OPT := -xW |
|
endif |
|
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) $(CUSTOMSW) $(GLOBALSW) |
GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -O2 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
# -xW tells the icc compiler to optimize for Pentium 4 | # -xW tells the icc compiler to optimize for Pentium 4 |
ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(CCFLAGS_OPT) $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) |
ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
| |
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) $(CUSTOMSW) $(GLOBALSW) |
GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=opteron $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
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) |
ICC_CF_ALL = -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
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) |
GCC_CF_ALL = -I$(SRCDIR)/base/include -std=gnu99 -O2 -march=i686 $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
endif | endif |
| |
else | else |
|
|
# Fortran global COMPILE flags | # Fortran global COMPILE flags |
ifeq ($(JSOC_MACHINE), linux_x86_64) | ifeq ($(JSOC_MACHINE), linux_x86_64) |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
F_CF_ALL := -mcmodel=medium |
F_CF_ALL := -openmp |
endif | endif |
endif | endif |
| |
# Other compiler-specific Fortran COMPILE flags | # Other compiler-specific Fortran COMPILE flags |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
ifeq ($(JSOC_MACHINE), linux_x86_64) |
|
FCFLAGS_OPT := -xW |
|
endif |
|
FCFLAGS_INIT := -ftrapuv | FCFLAGS_INIT := -ftrapuv |
else | else |
# must be gfortran | # must be gfortran |
FCFLAGS_OPT := |
|
FCFLAGS_INIT := | FCFLAGS_INIT := |
endif | endif |
| |
ifeq ($(DEBUG), 0) | ifeq ($(DEBUG), 0) |
# -xW optimizes ifort compilation for Pentium 4 | # -xW optimizes ifort compilation for Pentium 4 |
# -ftrapuv initializes stack local variables to an unusual value to aid error detection. | # -ftrapuv initializes stack local variables to an unusual value to aid error detection. |
F_CF_ALL := $(F_CF_ALL) $(FCFLAGS_OPT) $(FCOMPILER_WARN) |
F_CF_ALL := $(F_CF_ALL) $(FCOMPILER_WARN) |
else | else |
F_CF_ALL := $(F_CF_ALL) -g $(FCFLAGS_INIT) $(FCOMPILER_WARN) | F_CF_ALL := $(F_CF_ALL) -g $(FCFLAGS_INIT) $(FCOMPILER_WARN) |
endif | endif |
Line 316 ifneq ($(COMPILER), icc) |
|
Line 302 ifneq ($(COMPILER), icc) |
|
else | else |
SYSLIBS = -lz -ldl -lpthread | SYSLIBS = -lz -ldl -lpthread |
endif | endif |
SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBMISC) $(LIBDSTRUCT) |
SRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMS) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) |
FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBMISC) $(LIBDSTRUCT) |
FSRCLIBS = $(LIBTHREADUTIL) $(LIBRICECOMP) $(LIBCMDPARAMSF) $(LIBTIMEIO) $(LIBFITSRW) $(LIBERRLOG) $(LIBEXPDRMS) $(LIBEXPUTL) $(LIBMISC) $(LIBDSTRUCT) |
| |
########## Libraries to link for server executables, ############## | ########## Libraries to link for server executables, ############## |
########## standalone executables and pipeline modules. ############## | ########## standalone executables and pipeline modules. ############## |
Line 345 FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $ |
|
Line 331 FMODLIBS_SOCK = $(LIBJSOC_MAIN_SOCK_F) $ |
|
# PROJECT MAKE RULES | # 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)/$(LOCALIZATIONDIR)/make_basic.mk |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
| |