version 1.89, 2017/08/16 19:15:49
|
version 1.93, 2022/11/20 00:47:00
|
|
|
# | # |
COMPILER = icc | COMPILER = icc |
FCOMPILER = ifort | FCOMPILER = ifort |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
MPICOMPILER = mpiicc |
|
MPIFCOMPILER = mpiifort |
|
else |
MPICOMPILER = $(MPI_PATH)/mpicc | MPICOMPILER = $(MPI_PATH)/mpicc |
MPIFCOMPILER = $(MPI_PATH)/mpif90 | MPIFCOMPILER = $(MPI_PATH)/mpif90 |
|
endif |
| |
# can set through drmsparams.mk or through environment | # can set through drmsparams.mk or through environment |
ifneq ($(JSOC_COMPILER),) | ifneq ($(JSOC_COMPILER),) |
|
|
PGH = -I$(POSTGRES_INCS) | PGH = -I$(POSTGRES_INCS) |
| |
# For use of dynamic library | # For use of dynamic library |
PGL = -L$(POSTGRES_LIBS) |
|
PGLIBS = $(POSTGRES_LIBS)/lib$(POSTGRES_LIB).so | PGLIBS = $(POSTGRES_LIBS)/lib$(POSTGRES_LIB).so |
| |
# CFITSIO | # CFITSIO |
CFITSIOH = -I$(CFITSIO_INCS) | CFITSIOH = -I$(CFITSIO_INCS) |
CFITSIOL = -L$(CFITSIO_LIBS) | CFITSIOL = -L$(CFITSIO_LIBS) |
CFITSIOLIBNAME = $(CFITSIO_LIB) | CFITSIOLIBNAME = $(CFITSIO_LIB) |
CFITSIOLIBS = $(CFITSIOL) -l$(CFITSIOLIBNAME) |
# make sure to use static library so we don't have to deal with locating the dynamic one at run time |
|
# set back to dynamic (the default) for the other libraries that could follow cfitsio |
|
CFITSIOLIBS = $(CFITSIOL) -Wl,-Bstatic -l$(CFITSIOLIBNAME) -Wl,-Bdynamic |
|
# end CFITSIO |
| |
# GSL | # GSL |
GSLH = -I$(GSL_INCS) | GSLH = -I$(GSL_INCS) |
Line 124 GSLL = -L$(GSL_LIBS) |
|
Line 131 GSLL = -L$(GSL_LIBS) |
|
GSLLIBS = $(GSLL) -lgsl | GSLLIBS = $(GSLL) -lgsl |
| |
# FFTW | # FFTW |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
FFTWH = |
|
FFTWL = |
|
FFTW3LIBS = |
|
FFTW3FLIBS = |
|
else |
FFTWH = -I$(FFTW_INCS) | FFTWH = -I$(FFTW_INCS) |
FFTWL = -L$(FFTW_LIBS) | FFTWL = -L$(FFTW_LIBS) |
FFTW3LIBS = $(FFTWL) -lfftw3 | FFTW3LIBS = $(FFTWL) -lfftw3 |
FFTW3FLIBS = $(FFTWL) -lfftw3f | FFTW3FLIBS = $(FFTWL) -lfftw3f |
|
endif |
| |
# TAR | # TAR |
LIBTARH = -I$(TAR_INCS) | LIBTARH = -I$(TAR_INCS) |
|
|
# 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_ARCH="\"$(MACH)\"" |
GLOBALSW = -DDRMS_ARCH="\"$(MACH)\"" -DDRMS_MAKE_ROOT_DIRECTORY="\"$(SRCDIR)\"" |
# | # |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
|
|
# | # |
# Link flags for all targets | # Link flags for all targets |
# | # |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
LL_ALL = $(SYSLIBS) -lcurl -ltirpc |
|
else |
LL_ALL = $(SYSLIBS) -lcurl | LL_ALL = $(SYSLIBS) -lcurl |
|
endif |
| |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
ifeq ($(JSOC_MACHINE), linux_avx) |
GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries |
|
ICC_LF_ALL = $(STATIC) -qopenmp -Wl,-export-dynamic -Wl,--copy-dt-needed-entries |
|
else ifeq ($(JSOC_MACHINE), linux_avx) |
GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries | GCC_LF_ALL = $(STATIC) -Wl,--copy-dt-needed-entries |
ICC_LF_ALL = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic -Wl,--copy-dt-needed-entries | ICC_LF_ALL = -diag-disable 10237 $(STATIC) -openmp -static-intel -Wl,-export-dynamic -Wl,--copy-dt-needed-entries |
else | else |
|
|
| |
# Fortran global LINK flags | # Fortran global LINK flags |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
F_LF_ALL = -nofor-main -qopenmp -Wl,-export-dynamic |
|
else |
F_LF_ALL = -diag-disable 10237 -nofor-main -openmp -static-intel -Wl,-export-dynamic | F_LF_ALL = -diag-disable 10237 -nofor-main -openmp -static-intel -Wl,-export-dynamic |
endif | endif |
|
endif |
#***********************************************************************************************# | #***********************************************************************************************# |
| |
#***********************************************************************************************# | #***********************************************************************************************# |
|
|
# GLOBAL COMPILE FLAGS | # GLOBAL COMPILE FLAGS |
# | # |
GCC_CF_GCCCOMP = -DGCCCOMP | GCC_CF_GCCCOMP = -DGCCCOMP |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ICC_CF_ICCCOMP = -DICCCOMP -qopenmp |
|
else |
ICC_CF_ICCCOMP = -DICCCOMP -openmp | ICC_CF_ICCCOMP = -DICCCOMP -openmp |
|
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) |
Line 253 ifeq ($(DEBUG), 0) |
|
Line 281 ifeq ($(DEBUG), 0) |
|
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) |
endif | endif |
| |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ICC_CF_ALL = -diag-disable=cpu-dispatch,warn,10441 -axcore-avx512,core-avx2 -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=c99 -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) -DNDEBUG |
|
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 |
endif | endif |
Line 267 ifeq ($(DEBUG), 0) |
|
Line 299 ifeq ($(DEBUG), 0) |
|
| |
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 |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
GCC_CF_ALL = -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=gnu99 -g $(GCC_WARN) $(GCC_CF_GCCCOMP) $(CUSTOMSW) $(GLOBALSW) |
|
ICC_CF_ALL = -I/usr/include/tirpc -I$(SRCDIR)/base/include -std=c99 -g -D_GNU_SOURCE $(ICC_WARN) $(ICC_CF_ICCCOMP) $(CUSTOMSW) $(GLOBALSW) |
|
else |
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) |
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) |
endif | endif |
|
endif |
| |
# Fortran global COMPILE flags | # Fortran global COMPILE flags |
|
ifeq ($(JSOC_MACHINE), linux_avx2) |
|
ifeq ($(FCOMPILER), ifort) |
|
F_CF_ALL := -diag-disable=cpu-dispatch,warn -axcore-avx512,core-avx2 -qopenmp |
|
endif |
|
endif |
|
|
ifeq ($(JSOC_MACHINE), linux_avx) | ifeq ($(JSOC_MACHINE), linux_avx) |
ifeq ($(FCOMPILER), ifort) | ifeq ($(FCOMPILER), ifort) |
F_CF_ALL := -xavx -openmp | F_CF_ALL := -xavx -openmp |
Line 348 SLLIB = ln -sf ../../_$(MACH)/$@ ../lib |
|
Line 391 SLLIB = ln -sf ../../_$(MACH)/$@ ../lib |
|
# LIBRARY COLLECTIONS | # 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) |
|
ALL_LIBS_PY_FPIC = $(LIBDRMS_SERVER_FPIC) $(LIBDB_SERVER_FPIC) $(LIBCMDPARAMS_FPIC) $(LIBTHREADUTIL_FPIC) $(LIBRICECOMP_FPIC) $(LIBDEFS_FPIC) $(LIBMISC_FPIC) $(LIBDSTRUCT_FPIC) $(LIBTIMEIO_FPIC) $(LIBFITSRW_FPIC) |
| |
### Standard parts | ### Standard parts |
# | # |