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