(file) Return to Rules.mk CVS log (file) (dir) Up to [Development] / JSOC / proj / globalhs / apps

File: [Development] / JSOC / proj / globalhs / apps / Rules.mk (download)
Revision: 1.47, Wed Sep 14 20:54:57 2022 UTC (2 months, 3 weeks ago) by tplarson
Branch: MAIN
CVS Tags: globalhs_version_23, globalhs_version_22
Changes since 1.46: +11 -9 lines
accommodate mcmodel=medium for jpkpbgn2600d and jpkbgn5200d

# $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/apps/Rules.mk,v 1.47 2022/09/14 21:54:57 tplarson Exp $

# Standard things
sp 		:= $(sp).x
dirstack_$(sp)	:= $(d)
d		:= $(dir)

# all checks for icc being the compiler are removed; this condition is already checked in localization/Rules.mk
# if the compiler is other than icc, this make file will not be included.

# GLOBALHS_TAG is defined in Rules.mk in the parent directory,
# its definition is repeated here for ease of reading
#GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))

# Local variables

MODEXE_$(d) := $(addprefix $(d)/, jretile jrebinsmooth undistortmdi jtsslice mkylms)
MODEXE      := $(MODEXE) $(MODEXE_$(d))

MODEXE_USEF_$(d) := $(addprefix $(d)/, jv2ts jtsfiddle jpkbgn jpkbgn360d jpkbgn2600d jpkbgn5200d)
MODEXE_USEF      := $(MODEXE_USEF) $(MODEXE_USEF_$(d))

MODEXE_SOCK_$(d) := $(MODEXE_$(d):%=%_sock)
MODEXE_SOCK      := $(MODEXE_SOCK) $(MODEXE_SOCK_$(d))

MODEXE_USEF_SOCK_$(d) := $(MODEXE_USEF_$(d):%=%_sock)
MODEXE_USEF_SOCK      := $(MODEXE_USEF_SOCK) $(MODEXE_USEF_SOCK_$(d))

JV2TS		:= $(addprefix $(d)/, jv2ts jv2ts_sock)
JRETILE		:= $(addprefix $(d)/, jretile jretile_sock)
JTSFIDDLE	:= $(addprefix $(d)/, jtsfiddle jtsfiddle_sock)
JTSSLICE	:= $(addprefix $(d)/, jtsslice jtsslice_sock)
JPKBGN		:= $(addprefix $(d)/, jpkbgn jpkbgn_sock)
JPKBGN360D	:= $(addprefix $(d)/, jpkbgn360d jpkbgn360d_sock)
JPKBGN2600D	:= $(addprefix $(d)/, jpkbgn2600d jpkbgn2600d_sock)
JPKBGN5200D	:= $(addprefix $(d)/, jpkbgn5200d jpkbgn5200d_sock)
JREBINSMOOTH	:= $(addprefix $(d)/, jrebinsmooth jrebinsmooth_sock)
UNDISTORTMDI	:= $(addprefix $(d)/, undistortmdi undistortmdi_sock)
MKYLMS		:= $(addprefix $(d)/, mkylms mkylms_sock)
DURCON		:= $(d)/durcon
ifeq ($(JSOC_MACHINE), linux_avx) 
INV2D		:= $(d)/inv2d.x
INV2DOBJ	:= $(d)/inv2d.o
endif

JPKBGNSRC	:= $(SRCDIR)/$(d)/jpkbgn.c

EXE_$(d)	:= $(MODEXE_$(d)) $(MODEXE_USEF_$(d))
OBJ_$(d)	:= $(EXE_$(d):%=%.o) 
DEP_$(d)	:= $(OBJ_$(d):%=%.d)
CLEAN		:= $(CLEAN) \
		   $(OBJ_$(d)) \
		   $(EXE_$(d)) \
		   $(MODEXE_SOCK_$(d)) \
		   $(MODEXE_USEF_SOCK_$(d)) \
		   $(DEP_$(d)) \
		   $(DURCON) \
		   $(INV2D) $(INV2DOBJ)


# Remove globalhs from 'default make'. To do a release, run 'make; make globalhs'.
# TGT_BIN	        := $(TGT_BIN) $(EXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_SOCK_$(d)) $(DURCON) $(INV2D)

S_$(d)		:= $(notdir $(EXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_SOCK_$(d)) $(DURCON) $(INV2D))

# Local rules
$(OBJ_$(d)):	$(SRCDIR)/$(d)/Rules.mk
$(OBJ_$(d)):	CF_TGT := $(CFITSIOH) $(GSLH) $(FFTWH) -I$(SRCDIR)/$(d)/../../libs/stats -I$(SRCDIR)/$(d)/../../libs/interpolate -I$(SRCDIR)/$(d)/../libs/projection -I$(SRCDIR)/$(d)/../libs/pkbgn
$(OBJ_$(d)):	CF_TGT := $(CF_TGT) -DCDIR="\"$(SRCDIR)/$(d)\"" -DCVSTAG="\"$(GLOBALHS_TAG)\"" 

$(JV2TS)			: $(LIBPROJECTION)
$(JREBINSMOOTH)	$(MKYLMS)	: $(LIBINTERP)
$(JTSFIDDLE)			: $(LIBDTGF)
$(JPKBGN)			: $(LIBPKBGN)
$(JPKBGN360D)			: $(LIBPKBGN360D)
$(JPKBGN360D:%=%.o) : $(JPKBGNSRC)
	$(COMP)
$(JPKBGN2600D)			: $(LIBPKBGN2600D)
$(JPKBGN2600D:%=%.o) : $(JPKBGNSRC)
	$(COMP) -lmkl_em64t_sequential -mcmodel=medium
$(JPKBGN5200D)			: $(LIBPKBGN5200D)
$(JPKBGN5200D:%=%.o) : $(JPKBGNSRC)
	$(COMP) -lmkl_em64t_sequential -mcmodel=medium

# the following include file makes use of the -mcmodel compiler flag
# DO NOT COPY THIS FILE WITHOUT A THOROUGH UNDERSTANDING OF THIS FLAG
include $(SRCDIR)/$(d)/invobj.mk

$(INV2D) : LL_TGT := $(LL_TGT) -lmkl_em64t
$(INV2D) : $(LIBINV2D)
$(INV2D) : $(INV2DOBJ)
	$(FLINK)
	$(SLBIN)

# force recompile to ensure consistency, now deemed unnecessary
#ifeq ($(GLOBALHSTAGOVERRIDE),)
#.PHONY: force_globalhsapps
#$(OBJ_$(d)) $(INV2DOBJ): force_globalhsapps
#force_globalhsapps:
#	[[ $(GLOBALHS_TAG) =~ globalhs ]]
#endif

NOIPO_$(d) :=
MKL := -lmkl

ifeq ($(JSOC_MACHINE), linux_avx) 
  MKL     := $(NOIPO_$(d)) -lmkl_em64t
endif

ifeq ($(JSOC_MACHINE), linux_x86_64) 
  MKL     := $(NOIPO_$(d)) -lmkl_em64t
endif

ifeq ($(JSOC_MACHINE), linux_ia32) 
  MKL     := $(NOIPO_$(d)) -lmkl_lapack -lmkl_ia32
endif

SVML_$(d) 	:=
GUIDE_$(d)	:=

ALL_$(d)	:= $(MODEXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_$(d)) $(MODEXE_USEF_SOCK_$(d))
$(ALL_$(d)) 	: LL_TGT := $(LL_TGT) $(GSLLIBS) $(CFITSIOLIBS) $(FFTW3FLIBS) $(MKL) $(SVML_$(d)) $(GUIDE_$(d))

$(DURCON) : $(SRCDIR)/$(d)/durcon.c $(SRCDIR)/$(d)/Rules.mk
	cc -o $@ $<
	$(SLBIN)

# Shortcuts
.PHONY:	$(S_$(d)) globalhs
$(S_$(d)):	%:	$(d)/%
globalhs : $(ALL_$(d)) $(DURCON) $(INV2D)


# Standard things
-include	$(DEP_$(d))

d		:= $(dirstack_$(sp))
sp		:= $(basename $(sp))

Karen Tian
Powered by
ViewCVS 0.9.4