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.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 -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 | SDContainer.o \
|
---|
39 | SDMemTable.o \
|
---|
40 | SDReader.o \
|
---|
41 | SDWriter.o \
|
---|
42 | SDMath.o \
|
---|
43 | SDFitter.o \
|
---|
44 | SDTemplates.o \
|
---|
45 | python_SDMemTable.o \
|
---|
46 | python_SDReader.o \
|
---|
47 | python_SDWriter.o \
|
---|
48 | python_SDMath.o \
|
---|
49 | python_SDFitter.o \
|
---|
50 | python_SD.o
|
---|
51 |
|
---|
52 |
|
---|
53 | HEADERS := SDContainer.h \
|
---|
54 | SDMemTable.h \
|
---|
55 | SDReader.h \
|
---|
56 | SDWriter.h \
|
---|
57 | SDMath.h \
|
---|
58 | SDFitter.h \
|
---|
59 | SDMemTableWrapper.h \
|
---|
60 | SDMathWrapper.h \
|
---|
61 | SDReaderWrapper.h \
|
---|
62 | SDWriterWrapper.h \
|
---|
63 | python_SD.h
|
---|
64 |
|
---|
65 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
66 |
|
---|
67 | .cpp.o:
|
---|
68 | -@ echo
|
---|
69 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
70 |
|
---|
71 | .cc.o:
|
---|
72 | -@ echo
|
---|
73 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
74 |
|
---|
75 | .cxx.o:
|
---|
76 | -@ echo
|
---|
77 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
78 |
|
---|
79 | .C.o:
|
---|
80 | -@ echo
|
---|
81 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
82 |
|
---|
83 |
|
---|
84 | .PHONY : all clean objects realclean relink
|
---|
85 |
|
---|
86 | all : $(TARGET)
|
---|
87 |
|
---|
88 | relink : cleanso $(TARGET)
|
---|
89 |
|
---|
90 | objects : $(OBJECTS)
|
---|
91 |
|
---|
92 | $(TARGET) : $(OBJECTS)
|
---|
93 | -@ echo
|
---|
94 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
95 |
|
---|
96 | $(OBJECTS) : $(HEADERS)
|
---|
97 |
|
---|
98 | clean :
|
---|
99 | -rm -f $(OBJECTS)
|
---|
100 |
|
---|
101 | cleanso :
|
---|
102 | -rm -f $(TARGET)
|
---|
103 |
|
---|
104 | realclean : clean cleanso
|
---|