source: branches/alma/src/Makefile@ 1702

Last change on this file since 1702 was 1700, checked in by WataruKawasaki, 15 years ago

New Development: Yes

JIRA Issue: Yes (CAS-1800 + CAS-1807)

Ready to Release: Yes

Interface Changes: Yes

What Interface Changed: added parameters fitfunc for sdfit and clip, clipmaxmin, clipoutside for sdflag

Test Programs:

Put in Release Notes: No

Module(s): sdfit, sdflag

Description: Added a parameter for enabling Lorentzian line fitting with sdfit, and parameters for y-axis clipping with sdflag. Also 4 files for Lorentzian function class are (Lorentzian1D*) added.


File size: 6.1 KB
Line 
1### Notice:
2### This Makefile assumes CASA+CASACore enviroment.
3### For who wants to build ASAP with older CASA without CASACore,
4### 1. Replace $(CASAPATH) with $(AIPSPATH).
5### 2. CASAINC should be
6### '-I$(CASAROOT)/code/include -I$(CASAROOT)/code/casa'
7### 3. Replase library names in G2CARCH '-lcasa_*' with '-l*'.
8### 4. Comment-IN the definition of 'CXXOPTS'.
9TARGET := /tmp/_asap.so
10
11# the casa environment AIPSPATH has to be defined
12CASAROOT := $(word 1, $(CASAPATH))
13CASAARCH := $(word 2, $(CASAPATH))
14
15COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD)
16CORELIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CORELIB eval_vars) && echo $$CORELIB)
17WCSLIBLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=WCSLIBLIBD eval_vars) && echo $$WCSLIBLIBD)
18WCSLIBLIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=WCSLIBLIB eval_vars) && echo $$WCSLIBLIB)
19PYTHONLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONLIBD eval_vars) && echo $$PYTHONLIBD)
20PYTHONINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONINCD eval_vars) && echo $$PYTHONINCD)
21PYTHONLIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONLIB eval_vars) && echo $$PYTHONLIB)
22BOOSTROOT := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=BOOSTROOT eval_vars) && echo $$BOOSTROOT)
23
24CASAINC := -I$(CASAROOT)/code/include -I$(COREINCD) -I$(CASAROOT)/$(CASAARCH)/include
25CASALIB := $(CASAROOT)/$(CASAARCH)/lib
26USELIB := lib64
27
28# the compiler
29ifndef CXX
30 CXX := g++
31endif
32
33# compiler flags
34CXXFLAGS := -fPIC -O3 -g
35CXXFLAGS += -ansi -Wno-long-long -Wall
36CXXOPTS := -DAIPS_64B
37
38# darwin specific flags
39ifeq "$(CASAARCH)" "darwin"
40 CXXFLAGS +=-DAIPS_DARWIN
41 CXXFLAGS += -Wno-long-double
42endif
43
44# cfitsio
45CFITSIOROOT := /usr
46CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio
47CFITSIOLIB := -lcfitsio
48
49#rpfits
50RPFITSROOT := /usr
51RPFITSLIB := -lrpfits
52
53G2CROOT := /usr
54G2CLIB := -lgfortran
55
56# This assumes all casa libs are static only (*.a)
57# if not than there might by symbol resolution errors.
58CASAPPLIB := -L$(CASALIB) -latnf $(CORELIB) \
59 /usr/lib64/libwcs.so \
60 $(RPFITSLIB) $(CFITSIOLIB) $(G2CLIB) -lstdc++
61# -L$(WCSLIBLIBD) $(WCSLIBLIB) \
62
63# darwin specific CASA flags
64ifeq "$(CASAARCH)" "darwin"
65 CASAPPLIB += -framework vecLib
66else
67 CASAPPLIB += -llapack -lblas
68endif
69
70# python
71PYTHONINC := $(addprefix -I,$(PYTHONINCD))
72PYTHONLIB := -L$(PYTHONLIBD) $(PYTHONLIB)
73
74# use python universal build
75ifeq "$(CASAARCH)" "darwin"
76 PYVERSION := 2.5
77 PYTHONROOT := /Library/Frameworks/Python.framework/Versions/$(PYVERSION)
78 PYTHONINC := -I$(PYTHONROOT)/include/python$(PYVERSION)
79 PYTHONLIB := -L$(PYTHONROOT)/lib -framework Python
80endif
81
82# the linker
83LD := $(CXX)
84
85# has to be build with same g++ version as casa
86BOOSTLIB := -L$(BOOSTROOT)/lib -lboost_python
87BOOSTINC := -I$(BOOSTROOT)/include/boost -I$(BOOSTROOT)/include
88
89LDFLAGS := -shared -Wl$(TARGET) -s -Xlinker -rpath -Xlinker $(BOOSTROOT)/lib:$(PYTHONROOT)/lib:$(CASALIB)
90ifeq "$(CASAARCH)" "darwin"
91 LDFLAGS := -bundle
92endif
93
94
95# DO NOT MODIFY AFTER THIS
96INCDIRS := -I. $(CASAINC) $(CFITSIOINC) $(BOOSTINC) $(PYTHONINC)
97LIBS := $(PYTHONLIB) $(BOOSTLIB) $(CASAPPLIB)
98
99CCOBJECTS := MathUtils.o \
100 RowAccumulator.o \
101 Logger.o \
102 LineCatalog.o \
103 STAttr.o \
104 STHeader.o \
105 STFiller.o \
106 STMath.o \
107 STSubTable.o \
108 STMolecules.o \
109 STTcal.o \
110 STFocus.o \
111 STWeather.o \
112 STFrequencies.o \
113 STHistory.o \
114 STSelector.o \
115 STLineFinder.o \
116 STFitter.o \
117 STFitEntry.o \
118 STFit.o \
119 STPol.o \
120 STPolLinear.o \
121 STPolCircular.o \
122 STPolStokes.o \
123 STWriter.o \
124 STAsciiWriter.o \
125 STFITSImageWriter.o \
126 Scantable.o \
127 Templates.o
128PYOBJECTS := python_Scantable.o \
129 python_STFiller.o \
130 python_STSelector.o \
131 python_STMath.o \
132 python_Fitter.o \
133 python_Logger.o \
134 python_STLineFinder.o \
135 python_STFitEntry.o \
136 python_STWriter.o \
137 python_LineCatalog.o \
138 python_SrcType.o \
139 python_asap.o
140
141OBJECTS := $(CCOBJECTS) $(PYOBJECTS)
142
143HEADERS := MathUtils.h \
144 Lorentzian1D.h \
145 Lorentzian1DParam.h \
146 Logger.h \
147 STAttr.h \
148 STHeader.h \
149 Scantable.h \
150 STFiller.h \
151 STMath.h \
152 RowAccumulator.h \
153 STSubTable.h \
154 STMolecules.h \
155 STTcal.h \
156 STFocus.h \
157 STWeather.h \
158 STHistory.h \
159 STFrequencies.h \
160 STDefs.h \
161 STWriter.h \
162 STSelector.h \
163 STFitter.h \
164 STFit.h \
165 STFitEntry.h \
166 STLineFinder.h \
167 Factory.h \
168 FactoryBase.h \
169 STPol.h \
170 STPolStokes.h \
171 STPolCircular.h \
172 STPolLinear.h \
173 STWriter.h \
174 STAsciiWriter.h \
175 STFITSImageWriter.h
176
177STATICCCLIB := libasap.a
178MEMBERS := $(patsubst %,$(STATICCCLIB)(%),$(CCOBJECTS))
179
180.SUFFIXES: .c .o .cpp .cc .cxx .C
181
182.cpp.o:
183 -@ echo
184 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
185
186.cc.o:
187 -@ echo
188 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
189
190.cxx.o:
191 -@ echo
192 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
193
194.C.o:
195 -@ echo
196 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
197
198
199.PHONY : all clean objects realclean relink
200
201all : $(TARGET)
202
203relink : cleanso $(TARGET)
204
205objects : $(OBJECTS)
206
207$(TARGET) : $(OBJECTS)
208 -@ echo
209 $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
210
211$(OBJECTS) : $(HEADERS)
212
213staticlib: $(MEMBERS)
214
215clean :
216 -rm -f $(OBJECTS)
217
218cleanso :
219 -rm -f $(TARGET)
220
221realclean : clean cleanso
222
223test: objects tasap2.o
224 -@ echo
225 $(LD) -g -o /tmp/tasap2 $(OBJECTS) $(LIBS) tasap2.o
Note: See TracBrowser for help on using the repository browser.