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