[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 \
|
---|
[416] | 47 | SDPol.o \
|
---|
[460] | 48 | SDPol2.o \
|
---|
[65] | 49 | SDMemTable.o \
|
---|
| 50 | SDReader.o \
|
---|
| 51 | SDWriter.o \
|
---|
| 52 | SDMath.o \
|
---|
[99] | 53 | SDFitter.o \
|
---|
[65] | 54 | SDTemplates.o \
|
---|
[168] | 55 | SDMathWrapper.o \
|
---|
[193] | 56 | SDFITSImageWriter.o \
|
---|
[201] | 57 | SDAsciiWriter.o \
|
---|
[297] | 58 | SDLineFinder.o \
|
---|
[65] | 59 | python_SDMemTable.o \
|
---|
| 60 | python_SDReader.o \
|
---|
| 61 | python_SDWriter.o \
|
---|
| 62 | python_SDMath.o \
|
---|
[99] | 63 | python_SDFitter.o \
|
---|
[297] | 64 | python_SDLineFinder.o \
|
---|
[65] | 65 | python_SD.o
|
---|
[31] | 66 |
|
---|
[2] | 67 |
|
---|
[216] | 68 | HEADERS := SDDefs.h \
|
---|
[356] | 69 | SDAttr.h \
|
---|
[216] | 70 | SDContainer.h \
|
---|
[65] | 71 | SDMemTable.h \
|
---|
[416] | 72 | SDPol.h \
|
---|
[65] | 73 | SDReader.h \
|
---|
| 74 | SDWriter.h \
|
---|
| 75 | SDMath.h \
|
---|
[99] | 76 | SDFitter.h \
|
---|
[65] | 77 | SDMemTableWrapper.h \
|
---|
| 78 | SDMathWrapper.h \
|
---|
| 79 | SDReaderWrapper.h \
|
---|
| 80 | SDWriterWrapper.h \
|
---|
[193] | 81 | SDFITSImageWriter.h \
|
---|
[201] | 82 | SDAsciiWriter.h \
|
---|
[297] | 83 | SDLineFinder.h \
|
---|
[65] | 84 | python_SD.h
|
---|
[2] | 85 |
|
---|
[193] | 86 |
|
---|
[2] | 87 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
| 88 |
|
---|
| 89 | .cpp.o:
|
---|
[65] | 90 | -@ echo
|
---|
| 91 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 92 |
|
---|
| 93 | .cc.o:
|
---|
[65] | 94 | -@ echo
|
---|
| 95 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 96 |
|
---|
[65] | 97 | .cxx.o:
|
---|
| 98 | -@ echo
|
---|
| 99 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 100 |
|
---|
| 101 | .C.o:
|
---|
[65] | 102 | -@ echo
|
---|
| 103 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
[2] | 104 |
|
---|
| 105 |
|
---|
[65] | 106 | .PHONY : all clean objects realclean relink
|
---|
[2] | 107 |
|
---|
[65] | 108 | all : $(TARGET)
|
---|
| 109 |
|
---|
| 110 | relink : cleanso $(TARGET)
|
---|
| 111 |
|
---|
| 112 | objects : $(OBJECTS)
|
---|
| 113 |
|
---|
| 114 | $(TARGET) : $(OBJECTS)
|
---|
| 115 | -@ echo
|
---|
| 116 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
| 117 |
|
---|
| 118 | $(OBJECTS) : $(HEADERS)
|
---|
| 119 |
|
---|
| 120 | clean :
|
---|
[2] | 121 | -rm -f $(OBJECTS)
|
---|
| 122 |
|
---|
[65] | 123 | cleanso :
|
---|
[2] | 124 | -rm -f $(TARGET)
|
---|
[65] | 125 |
|
---|
| 126 | realclean : clean cleanso
|
---|