[99] | 1 | TARGET := ../lib/_asap.so
|
---|
[2] | 2 |
|
---|
[260] | 3 | ifdef NARRABRI_ASAP
|
---|
| 4 | CXX := /usr/bin/g++
|
---|
| 5 | else
|
---|
[65] | 6 | CXX := g++-3.2.3
|
---|
[260] | 7 | endif
|
---|
| 8 |
|
---|
[65] | 9 | CXXFLAGS := -O -fPIC
|
---|
[414] | 10 |
|
---|
[65] | 11 | #CXXFLAGS += -ansi
|
---|
[82] | 12 | CXXFLAGS += -pedantic -Wno-long-long
|
---|
[65] | 13 | #CXXFLAGS += -Wall -Wno-parentheses
|
---|
[2] | 14 |
|
---|
[193] | 15 | CFITSIOLIB := /usr/local/lib/libcfitsio_lfs.a #-lcfitsio
|
---|
[72] | 16 | CFITSIOINC := -I/usr/local/include/cfitsio
|
---|
[71] | 17 |
|
---|
[82] | 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) \
|
---|
[193] | 23 | -latnf -limages -lms -lcomponents -lcoordinates \
|
---|
[82] | 24 | -llattices -lfits -lmeasures -lmeasures_f \
|
---|
| 25 | -ltables -lscimath -lscimath_f -lcasa \
|
---|
| 26 | $(CASALIB)/libwcs.a -lmir \
|
---|
[71] | 27 | -lrpfits $(CFITSIOLIB) -llapack -lblas -lg2c
|
---|
[2] | 28 |
|
---|
[65] | 29 | LD := g++-3.2.3
|
---|
| 30 | LDFLAGS := -shared -Wl,--soname=$(TARGET)
|
---|
| 31 | LDFLAGS += -s
|
---|
[2] | 32 |
|
---|
[77] | 33 | BOOSTLIB := /nfs/atapplic/boost/linux/lib/libboost_python2.3-gcc-mt.a
|
---|
[216] | 34 | BOOSTINC := -I/usr/local/include/boost
|
---|
[2] | 35 |
|
---|
[260] | 36 |
|
---|
[77] | 37 | PYTHONINC := -I/usr/local/include/python2.3
|
---|
| 38 | PYTHONLIB := -lpython2.3
|
---|
[2] | 39 |
|
---|
[82] | 40 | INCDIRS := -I. $(CASAINC) $(BOOSTINC) $(PYTHONINC) $(CFITSIOINC)
|
---|
| 41 | LIBS := $(BOOSTLIB) $(PYTHONLIB) $(CASAPPLIB)
|
---|
[2] | 42 |
|
---|
[65] | 43 | OBJECTS := MathUtils.o \
|
---|
[137] | 44 | MathUtils2.o \
|
---|
[356] | 45 | SDAttr.o \
|
---|
[65] | 46 | SDContainer.o \
|
---|
[465] | 47 | SDFitTable.o \
|
---|
[416] | 48 | SDPol.o \
|
---|
[460] | 49 | SDPol2.o \
|
---|
[65] | 50 | SDMemTable.o \
|
---|
| 51 | SDReader.o \
|
---|
| 52 | SDWriter.o \
|
---|
| 53 | SDMath.o \
|
---|
[99] | 54 | SDFitter.o \
|
---|
[65] | 55 | SDTemplates.o \
|
---|
[168] | 56 | SDMathWrapper.o \
|
---|
[193] | 57 | SDFITSImageWriter.o \
|
---|
[201] | 58 | SDAsciiWriter.o \
|
---|
[297] | 59 | SDLineFinder.o \
|
---|
[65] | 60 | python_SDMemTable.o \
|
---|
| 61 | python_SDReader.o \
|
---|
| 62 | python_SDWriter.o \
|
---|
| 63 | python_SDMath.o \
|
---|
[99] | 64 | python_SDFitter.o \
|
---|
[465] | 65 | python_SDFitTable.o \
|
---|
[297] | 66 | python_SDLineFinder.o \
|
---|
[65] | 67 | python_SD.o
|
---|
[31] | 68 |
|
---|
[2] | 69 |
|
---|
[216] | 70 | HEADERS := SDDefs.h \
|
---|
[356] | 71 | SDAttr.h \
|
---|
[216] | 72 | SDContainer.h \
|
---|
[465] | 73 | SDFitTable.h \
|
---|
[65] | 74 | SDMemTable.h \
|
---|
[416] | 75 | SDPol.h \
|
---|
[65] | 76 | SDReader.h \
|
---|
| 77 | SDWriter.h \
|
---|
| 78 | SDMath.h \
|
---|
[99] | 79 | SDFitter.h \
|
---|
[65] | 80 | SDMemTableWrapper.h \
|
---|
| 81 | SDMathWrapper.h \
|
---|
| 82 | SDReaderWrapper.h \
|
---|
| 83 | SDWriterWrapper.h \
|
---|
[193] | 84 | SDFITSImageWriter.h \
|
---|
[201] | 85 | SDAsciiWriter.h \
|
---|
[297] | 86 | SDLineFinder.h \
|
---|
[65] | 87 | python_SD.h
|
---|
[2] | 88 |
|
---|
[193] | 89 |
|
---|
[2] | 90 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
| 91 |
|
---|
| 92 | .cpp.o:
|
---|
[65] | 93 | -@ echo
|
---|
| 94 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 95 |
|
---|
| 96 | .cc.o:
|
---|
[65] | 97 | -@ echo
|
---|
| 98 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 99 |
|
---|
[65] | 100 | .cxx.o:
|
---|
| 101 | -@ echo
|
---|
| 102 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 103 |
|
---|
| 104 | .C.o:
|
---|
[65] | 105 | -@ echo
|
---|
| 106 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 107 |
|
---|
| 108 |
|
---|
[65] | 109 | .PHONY : all clean objects realclean relink
|
---|
[2] | 110 |
|
---|
[65] | 111 | all : $(TARGET)
|
---|
| 112 |
|
---|
| 113 | relink : cleanso $(TARGET)
|
---|
| 114 |
|
---|
| 115 | objects : $(OBJECTS)
|
---|
| 116 |
|
---|
| 117 | $(TARGET) : $(OBJECTS)
|
---|
| 118 | -@ echo
|
---|
| 119 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
| 120 |
|
---|
| 121 | $(OBJECTS) : $(HEADERS)
|
---|
| 122 |
|
---|
| 123 | clean :
|
---|
[2] | 124 | -rm -f $(OBJECTS)
|
---|
| 125 |
|
---|
[65] | 126 | cleanso :
|
---|
[2] | 127 | -rm -f $(TARGET)
|
---|
[65] | 128 |
|
---|
| 129 | realclean : clean cleanso
|
---|