[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 |
|
---|
[193] | 10 | CFITSIOLIB := /usr/local/lib/libcfitsio_lfs.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) \
|
---|
[193] | 18 | -latnf -limages -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
|
---|
[216] | 29 | BOOSTINC := -I/usr/local/include/boost
|
---|
[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 \
|
---|
[193] | 47 | SDFITSImageWriter.o \
|
---|
[201] | 48 | SDAsciiWriter.o \
|
---|
[65] | 49 | python_SDMemTable.o \
|
---|
| 50 | python_SDReader.o \
|
---|
| 51 | python_SDWriter.o \
|
---|
| 52 | python_SDMath.o \
|
---|
[99] | 53 | python_SDFitter.o \
|
---|
[65] | 54 | python_SD.o
|
---|
[31] | 55 |
|
---|
[2] | 56 |
|
---|
[216] | 57 | HEADERS := SDDefs.h \
|
---|
| 58 | SDContainer.h \
|
---|
[65] | 59 | SDMemTable.h \
|
---|
| 60 | SDReader.h \
|
---|
| 61 | SDWriter.h \
|
---|
| 62 | SDMath.h \
|
---|
[99] | 63 | SDFitter.h \
|
---|
[65] | 64 | SDMemTableWrapper.h \
|
---|
| 65 | SDMathWrapper.h \
|
---|
| 66 | SDReaderWrapper.h \
|
---|
| 67 | SDWriterWrapper.h \
|
---|
[193] | 68 | SDFITSImageWriter.h \
|
---|
[201] | 69 | SDAsciiWriter.h \
|
---|
[65] | 70 | python_SD.h
|
---|
[2] | 71 |
|
---|
[193] | 72 |
|
---|
[2] | 73 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
| 74 |
|
---|
| 75 | .cpp.o:
|
---|
[65] | 76 | -@ echo
|
---|
| 77 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 78 |
|
---|
| 79 | .cc.o:
|
---|
[65] | 80 | -@ echo
|
---|
| 81 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 82 |
|
---|
[65] | 83 | .cxx.o:
|
---|
| 84 | -@ echo
|
---|
| 85 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 86 |
|
---|
| 87 | .C.o:
|
---|
[65] | 88 | -@ echo
|
---|
| 89 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 90 |
|
---|
| 91 |
|
---|
[65] | 92 | .PHONY : all clean objects realclean relink
|
---|
[2] | 93 |
|
---|
[65] | 94 | all : $(TARGET)
|
---|
| 95 |
|
---|
| 96 | relink : cleanso $(TARGET)
|
---|
| 97 |
|
---|
| 98 | objects : $(OBJECTS)
|
---|
| 99 |
|
---|
| 100 | $(TARGET) : $(OBJECTS)
|
---|
| 101 | -@ echo
|
---|
| 102 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
| 103 |
|
---|
| 104 | $(OBJECTS) : $(HEADERS)
|
---|
| 105 |
|
---|
| 106 | clean :
|
---|
[2] | 107 | -rm -f $(OBJECTS)
|
---|
| 108 |
|
---|
[65] | 109 | cleanso :
|
---|
[2] | 110 | -rm -f $(TARGET)
|
---|
[65] | 111 |
|
---|
| 112 | realclean : clean cleanso
|
---|