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