(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.45, Thu Jun 22 14:07:57 2017 UTC (6 months, 3 weeks ago) by arta
Branch: MAIN
CVS Tags: globalhs_version_19, globalhs_version_18, Ver_LATEST, Ver_9-1, HEAD
Changes since 1.44: +2 -5 lines
remove superfluous module jv2ts4mdi

# $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/apps/Rules.mk,v 1.45 2017/06/22 15:07:57 arta 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)
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)
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)

# 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)

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