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 | #CXXFLAGS += -fpermissive # This should be removed.
|
---|
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 | SDContainer.o \
|
---|
46 | SDMemTable.o \
|
---|
47 | SDReader.o \
|
---|
48 | SDWriter.o \
|
---|
49 | SDMath.o \
|
---|
50 | SDFitter.o \
|
---|
51 | SDTemplates.o \
|
---|
52 | SDMathWrapper.o \
|
---|
53 | SDFITSImageWriter.o \
|
---|
54 | SDAsciiWriter.o \
|
---|
55 | python_SDMemTable.o \
|
---|
56 | python_SDReader.o \
|
---|
57 | python_SDWriter.o \
|
---|
58 | python_SDMath.o \
|
---|
59 | python_SDFitter.o \
|
---|
60 | python_SD.o
|
---|
61 |
|
---|
62 |
|
---|
63 | HEADERS := SDDefs.h \
|
---|
64 | SDContainer.h \
|
---|
65 | SDMemTable.h \
|
---|
66 | SDReader.h \
|
---|
67 | SDWriter.h \
|
---|
68 | SDMath.h \
|
---|
69 | SDFitter.h \
|
---|
70 | SDMemTableWrapper.h \
|
---|
71 | SDMathWrapper.h \
|
---|
72 | SDReaderWrapper.h \
|
---|
73 | SDWriterWrapper.h \
|
---|
74 | SDFITSImageWriter.h \
|
---|
75 | SDAsciiWriter.h \
|
---|
76 | python_SD.h
|
---|
77 |
|
---|
78 |
|
---|
79 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
80 |
|
---|
81 | .cpp.o:
|
---|
82 | -@ echo
|
---|
83 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
84 |
|
---|
85 | .cc.o:
|
---|
86 | -@ echo
|
---|
87 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
88 |
|
---|
89 | .cxx.o:
|
---|
90 | -@ echo
|
---|
91 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
92 |
|
---|
93 | .C.o:
|
---|
94 | -@ echo
|
---|
95 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
96 |
|
---|
97 |
|
---|
98 | .PHONY : all clean objects realclean relink
|
---|
99 |
|
---|
100 | all : $(TARGET)
|
---|
101 |
|
---|
102 | relink : cleanso $(TARGET)
|
---|
103 |
|
---|
104 | objects : $(OBJECTS)
|
---|
105 |
|
---|
106 | $(TARGET) : $(OBJECTS)
|
---|
107 | -@ echo
|
---|
108 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
109 |
|
---|
110 | $(OBJECTS) : $(HEADERS)
|
---|
111 |
|
---|
112 | clean :
|
---|
113 | -rm -f $(OBJECTS)
|
---|
114 |
|
---|
115 | cleanso :
|
---|
116 | -rm -f $(TARGET)
|
---|
117 |
|
---|
118 | realclean : clean cleanso
|
---|