ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/JSOC/proj/globalhs/apps/Rules.mk
Revision: 1.42
Committed: Tue Jan 17 18:43:40 2017 UTC (6 years, 8 months ago) by tplarson
Branch: MAIN
CVS Tags: globalhs_version_16, globalhs_version_15, Ver_9-0
Changes since 1.41: +6 -3 lines
Log Message:
update compilation and version tracking for inv2d

File Contents

# User Rev Content
1 tplarson 1.42 # $Header: /home/cvsuser/cvsroot/JSOC/proj/globalhs/apps/Rules.mk,v 1.41 2016/12/15 20:41:37 arta Exp $
2 tplarson 1.29
3 tplarson 1.1 # Standard things
4     sp := $(sp).x
5     dirstack_$(sp) := $(d)
6     d := $(dir)
7    
8 tplarson 1.28 # all checks for icc being the compiler are removed; this condition is already checked in localization/Rules.mk
9     # if the compiler is other than icc, this make file will not be included.
10 tplarson 1.29
11 tplarson 1.33 # GLOBALHS_TAG is defined in Rules.mk in the parent directory,
12     # its definition is repeated here for ease of reading
13 tplarson 1.34 #GLOBALHS_TAG := $(shell $(SRCDIR)/proj/globalhs/scripts/checkglobalhstags $(SRCDIR))
14 tplarson 1.29
15 tplarson 1.28 # Local variables
16    
17 tplarson 1.29 MODEXE_$(d) := $(addprefix $(d)/, jretile jrebinsmooth undistortmdi jtsslice mkylms)
18 tplarson 1.28 MODEXE := $(MODEXE) $(MODEXE_$(d))
19    
20 tplarson 1.35 MODEXE_USEF_$(d) := $(addprefix $(d)/, jv2ts jtsfiddle jpkbgn jpkbgn360d)
21 tplarson 1.28 MODEXE_USEF := $(MODEXE_USEF) $(MODEXE_USEF_$(d))
22 arta 1.9
23 tplarson 1.28 MODEXE_SOCK_$(d) := $(MODEXE_$(d):%=%_sock)
24     MODEXE_SOCK := $(MODEXE_SOCK) $(MODEXE_SOCK_$(d))
25 tplarson 1.19
26 tplarson 1.28 MODEXE_USEF_SOCK_$(d) := $(MODEXE_USEF_$(d):%=%_sock)
27     MODEXE_USEF_SOCK := $(MODEXE_USEF_SOCK) $(MODEXE_USEF_SOCK_$(d))
28 arta 1.3
29 tplarson 1.29 JV2TS := $(addprefix $(d)/, jv2ts jv2ts_sock)
30 arta 1.3 JRETILE := $(addprefix $(d)/, jretile jretile_sock)
31 tplarson 1.29 JTSFIDDLE := $(addprefix $(d)/, jtsfiddle jtsfiddle_sock)
32     JTSSLICE := $(addprefix $(d)/, jtsslice jtsslice_sock)
33 arta 1.3 JPKBGN := $(addprefix $(d)/, jpkbgn jpkbgn_sock)
34 tplarson 1.35 JPKBGN360D := $(addprefix $(d)/, jpkbgn360d jpkbgn360d_sock)
35 tplarson 1.22 JREBINSMOOTH := $(addprefix $(d)/, jrebinsmooth jrebinsmooth_sock)
36 tplarson 1.29 UNDISTORTMDI := $(addprefix $(d)/, undistortmdi undistortmdi_sock)
37     MKYLMS := $(addprefix $(d)/, mkylms mkylms_sock)
38 tplarson 1.14 DURCON := $(d)/durcon
39 tplarson 1.36 INV2D := $(d)/inv2d.x
40     INV2DOBJ := $(d)/inv2d.o
41 arta 1.3
42 tplarson 1.35 JPKBGNSRC := $(SRCDIR)/$(d)/jpkbgn.c
43    
44 arta 1.3 EXE_$(d) := $(MODEXE_$(d)) $(MODEXE_USEF_$(d))
45 tplarson 1.1 OBJ_$(d) := $(EXE_$(d):%=%.o)
46 tplarson 1.22 DEP_$(d) := $(OBJ_$(d):%=%.d)
47 tplarson 1.1 CLEAN := $(CLEAN) \
48     $(OBJ_$(d)) \
49     $(EXE_$(d)) \
50 arta 1.3 $(MODEXE_SOCK_$(d)) \
51     $(MODEXE_USEF_SOCK_$(d)) \
52     $(DEP_$(d)) \
53 tplarson 1.36 $(DURCON) \
54     $(INV2D) $(INV2DOBJ)
55    
56 tplarson 1.1
57 arta 1.40 # Remove globalhs from 'default make'. To do a release, run 'make; make globalhs'.
58     # TGT_BIN := $(TGT_BIN) $(EXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_SOCK_$(d)) $(DURCON) $(INV2D)
59 tplarson 1.1
60 tplarson 1.36 S_$(d) := $(notdir $(EXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_SOCK_$(d)) $(DURCON) $(INV2D))
61 tplarson 1.1
62     # Local rules
63 tplarson 1.22 $(OBJ_$(d)): $(SRCDIR)/$(d)/Rules.mk
64 arta 1.41 $(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
65     $(OBJ_$(d)): CF_TGT := $(CF_TGT) -DCDIR="\"$(SRCDIR)/$(d)\"" -DCVSTAG="\"$(GLOBALHS_TAG)\""
66 tplarson 1.42 #$(INV2DOBJ): FF_TGT := $(FF_TGT) -I$(SRCDIR)/$(d)/../libs/inv2d
67 tplarson 1.36 $(INV2D): LL_TGT := $(LL_TGT) -lmkl_em64t
68 arta 1.7
69 tplarson 1.29 $(JV2TS) : $(LIBPROJECTION)
70     $(JREBINSMOOTH) $(MKYLMS) : $(LIBINTERP)
71     $(JTSFIDDLE) : $(LIBDTGF)
72     $(JPKBGN) : $(LIBPKBGN)
73 tplarson 1.35 $(JPKBGN360D) : $(LIBPKBGN360D)
74     $(JPKBGN360D:%=%.o) : $(JPKBGNSRC)
75     $(COMP)
76 tplarson 1.29
77 tplarson 1.42 # the following include file makes use of the -mcmodel compiler flag
78     # DO NOT COPY THIS FILE WITHOUT A THOROUGH UNDERSTANDING OF THIS FLAG
79     include $(SRCDIR)/$(d)/invobj.mk
80    
81 tplarson 1.36 $(INV2D) : $(LIBINV2D)
82     $(INV2D) : $(INV2DOBJ)
83     $(FLINK)
84     $(SLBIN)
85    
86 tplarson 1.39 ifeq ($(GLOBALHSTAGOVERRIDE),)
87 tplarson 1.29 .PHONY: force_globalhsapps
88 tplarson 1.37 $(OBJ_$(d)) $(INV2DOBJ): force_globalhsapps
89 tplarson 1.32 force_globalhsapps:
90     [[ $(GLOBALHS_TAG) =~ globalhs ]]
91 tplarson 1.39 endif
92 tplarson 1.28
93     NOIPO_$(d) :=
94     MKL := -lmkl
95    
96     ifeq ($(JSOC_MACHINE), linux_avx)
97     MKL := $(NOIPO_$(d)) -lmkl_em64t
98 arta 1.8 endif
99    
100 tplarson 1.28 ifeq ($(JSOC_MACHINE), linux_x86_64)
101     MKL := $(NOIPO_$(d)) -lmkl_em64t
102     endif
103 arta 1.3
104 tplarson 1.28 ifeq ($(JSOC_MACHINE), linux_ia32)
105     MKL := $(NOIPO_$(d)) -lmkl_lapack -lmkl_ia32
106 arta 1.8 endif
107    
108     SVML_$(d) :=
109     GUIDE_$(d) :=
110    
111 tplarson 1.22 ALL_$(d) := $(MODEXE_$(d)) $(MODEXE_SOCK_$(d)) $(MODEXE_USEF_$(d)) $(MODEXE_USEF_SOCK_$(d))
112 tplarson 1.29 $(ALL_$(d)) : LL_TGT := $(LL_TGT) $(GSLLIBS) $(CFITSIOLIBS) $(FFTW3FLIBS) $(MKL) $(SVML_$(d)) $(GUIDE_$(d))
113 tplarson 1.22
114 tplarson 1.33 $(DURCON) : $(SRCDIR)/$(d)/durcon.c $(SRCDIR)/$(d)/Rules.mk
115 tplarson 1.14 cc -o $@ $<
116     $(SLBIN)
117    
118 tplarson 1.1 # Shortcuts
119 arta 1.3 .PHONY: $(S_$(d)) globalhs
120 tplarson 1.1 $(S_$(d)): %: $(d)/%
121 tplarson 1.38 globalhs : $(ALL_$(d)) $(DURCON) $(INV2D)
122 tplarson 1.1
123 arta 1.9
124 tplarson 1.1 # Standard things
125     -include $(DEP_$(d))
126    
127     d := $(dirstack_$(sp))
128     sp := $(basename $(sp))