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