1 | TARGET := ../lib/_asap.so
|
---|
2 |
|
---|
3 | ifdef NARRABRI_ASAP
|
---|
4 | CXX := /usr/bin/g++
|
---|
5 | else
|
---|
6 | CXX := g++-3.2.3
|
---|
7 | endif
|
---|
8 |
|
---|
9 | CXXFLAGS := -O -fPIC
|
---|
10 |
|
---|
11 | #CXXFLAGS += -ansi
|
---|
12 | CXXFLAGS += -pedantic -Wno-long-long
|
---|
13 | #CXXFLAGS += -Wall -Wno-parentheses
|
---|
14 |
|
---|
15 | CFITSIOLIB := /usr/local/lib/libcfitsio_lfs.a #-lcfitsio
|
---|
16 | CFITSIOINC := -I/usr/local/include/cfitsio
|
---|
17 |
|
---|
18 | CASAROOT := $(word 1, $(AIPSPATH))
|
---|
19 | CASAINC := -I$(CASAROOT)/code/include
|
---|
20 | CASALIB := $(CASAROOT)/linux_gnu/lib
|
---|
21 | CASAPPLIB := $(CASALIB)/version.o \
|
---|
22 | -L$(CASALIB) \
|
---|
23 | -latnf -limages -lms -lcomponents -lcoordinates \
|
---|
24 | -llattices -lfits -lmeasures -lmeasures_f \
|
---|
25 | -ltables -lscimath -lscimath_f -lcasa \
|
---|
26 | $(CASALIB)/libwcs.a -lmir \
|
---|
27 | -lrpfits $(CFITSIOLIB) -llapack -lblas -lg2c
|
---|
28 |
|
---|
29 | LD := g++-3.2.3
|
---|
30 | LDFLAGS := -shared -Wl,--soname=$(TARGET)
|
---|
31 | LDFLAGS += -s
|
---|
32 |
|
---|
33 | BOOSTLIB := /nfs/atapplic/boost/linux/lib/libboost_python2.3-gcc-mt.a
|
---|
34 | BOOSTINC := -I/usr/local/include/boost
|
---|
35 |
|
---|
36 |
|
---|
37 | PYTHONINC := -I/usr/local/include/python2.3
|
---|
38 | PYTHONLIB := -lpython2.3
|
---|
39 |
|
---|
40 | INCDIRS := -I. $(CASAINC) $(BOOSTINC) $(PYTHONINC) $(CFITSIOINC)
|
---|
41 | LIBS := $(BOOSTLIB) $(PYTHONLIB) $(CASAPPLIB)
|
---|
42 |
|
---|
43 | OBJECTS := MathUtils.o \
|
---|
44 | MathUtils2.o \
|
---|
45 | SDAttr.o \
|
---|
46 | SDContainer.o \
|
---|
47 | SDMemTable.o \
|
---|
48 | SDReader.o \
|
---|
49 | SDWriter.o \
|
---|
50 | SDMath.o \
|
---|
51 | SDFitter.o \
|
---|
52 | SDTemplates.o \
|
---|
53 | SDMathWrapper.o \
|
---|
54 | SDFITSImageWriter.o \
|
---|
55 | SDAsciiWriter.o \
|
---|
56 | SDLineFinder.o \
|
---|
57 | python_SDMemTable.o \
|
---|
58 | python_SDReader.o \
|
---|
59 | python_SDWriter.o \
|
---|
60 | python_SDMath.o \
|
---|
61 | python_SDFitter.o \
|
---|
62 | python_SDLineFinder.o \
|
---|
63 | python_SD.o
|
---|
64 |
|
---|
65 |
|
---|
66 | HEADERS := SDDefs.h \
|
---|
67 | SDAttr.h \
|
---|
68 | SDContainer.h \
|
---|
69 | SDMemTable.h \
|
---|
70 | SDReader.h \
|
---|
71 | SDWriter.h \
|
---|
72 | SDMath.h \
|
---|
73 | SDFitter.h \
|
---|
74 | SDMemTableWrapper.h \
|
---|
75 | SDMathWrapper.h \
|
---|
76 | SDReaderWrapper.h \
|
---|
77 | SDWriterWrapper.h \
|
---|
78 | SDFITSImageWriter.h \
|
---|
79 | SDAsciiWriter.h \
|
---|
80 | SDLineFinder.h \
|
---|
81 | python_SD.h
|
---|
82 |
|
---|
83 |
|
---|
84 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
85 |
|
---|
86 | .cpp.o:
|
---|
87 | -@ echo
|
---|
88 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
89 |
|
---|
90 | .cc.o:
|
---|
91 | -@ echo
|
---|
92 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
93 |
|
---|
94 | .cxx.o:
|
---|
95 | -@ echo
|
---|
96 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
97 |
|
---|
98 | .C.o:
|
---|
99 | -@ echo
|
---|
100 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
101 |
|
---|
102 |
|
---|
103 | .PHONY : all clean objects realclean relink
|
---|
104 |
|
---|
105 | all : $(TARGET)
|
---|
106 |
|
---|
107 | relink : cleanso $(TARGET)
|
---|
108 |
|
---|
109 | objects : $(OBJECTS)
|
---|
110 |
|
---|
111 | $(TARGET) : $(OBJECTS)
|
---|
112 | -@ echo
|
---|
113 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
114 |
|
---|
115 | $(OBJECTS) : $(HEADERS)
|
---|
116 |
|
---|
117 | clean :
|
---|
118 | -rm -f $(OBJECTS)
|
---|
119 |
|
---|
120 | cleanso :
|
---|
121 | -rm -f $(TARGET)
|
---|
122 |
|
---|
123 | realclean : clean cleanso
|
---|