1 | TARGET := ../lib/atnf_sd.so
|
---|
2 |
|
---|
3 | CXX := g++-3.2.3
|
---|
4 | CXXFLAGS := -O -fPIC
|
---|
5 | CXXFLAGS += -fpermissive # This should be removed.
|
---|
6 | #CXXFLAGS += -ansi
|
---|
7 | #CXXFLAGS += -pedantic -Wno-long-long
|
---|
8 | #CXXFLAGS += -Wall -Wno-parentheses
|
---|
9 |
|
---|
10 | CFITSIOLIB := /usr/local/lib/libcfitsio.a #-lcfitsio
|
---|
11 | CFITSIOINC := -I/usr/local/include/cfitsio
|
---|
12 |
|
---|
13 | AIPSROOT := $(word 1, $(AIPSPATH))
|
---|
14 | AIPSINC := -I$(AIPSROOT)/code/include
|
---|
15 | AIPSLIB := $(AIPSROOT)/linux_gnu/lib
|
---|
16 | AIPSPPLIB := $(AIPSLIB)/version.o \
|
---|
17 | -L$(AIPSLIB) -latnf -ltrial -laips -laips_f \
|
---|
18 | $(AIPSLIB)/libwcs.a \
|
---|
19 | -lrpfits $(CFITSIOLIB) -llapack -lblas -lg2c
|
---|
20 |
|
---|
21 | LD := g++-3.2.3
|
---|
22 | LDFLAGS := -shared -Wl,--soname=$(TARGET)
|
---|
23 | LDFLAGS += -s
|
---|
24 |
|
---|
25 | BOOSTLIB := /nfs/atapplic/boost/linux/lib/libboost_python2.3-gcc-mt.a
|
---|
26 | BOOSTINC :=
|
---|
27 |
|
---|
28 | PYTHONINC := -I/usr/local/include/python2.3
|
---|
29 | PYTHONLIB := -lpython2.3
|
---|
30 |
|
---|
31 | INCDIRS := -I. $(AIPSINC) $(BOOSTINC) $(PYTHONINC) $(CFITSIOINC)
|
---|
32 | LIBS := $(BOOSTLIB) $(PYTHONLIB) $(AIPSPPLIB)
|
---|
33 |
|
---|
34 | OBJECTS := MathUtils.o \
|
---|
35 | SDContainer.o \
|
---|
36 | SDMemTable.o \
|
---|
37 | SDReader.o \
|
---|
38 | SDWriter.o \
|
---|
39 | SDMath.o \
|
---|
40 | SDTemplates.o \
|
---|
41 | python_SDMemTable.o \
|
---|
42 | python_SDReader.o \
|
---|
43 | python_SDWriter.o \
|
---|
44 | python_SDMath.o \
|
---|
45 | python_SD.o
|
---|
46 |
|
---|
47 |
|
---|
48 | HEADERS := SDContainer.h \
|
---|
49 | SDMemTable.h \
|
---|
50 | SDReader.h \
|
---|
51 | SDWriter.h \
|
---|
52 | SDMath.h \
|
---|
53 | SDMemTableWrapper.h \
|
---|
54 | SDMathWrapper.h \
|
---|
55 | SDReaderWrapper.h \
|
---|
56 | SDWriterWrapper.h \
|
---|
57 | python_SD.h
|
---|
58 |
|
---|
59 | .SUFFIXES: .c .o .cpp .cc .cxx .C
|
---|
60 |
|
---|
61 | .cpp.o:
|
---|
62 | -@ echo
|
---|
63 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
64 |
|
---|
65 | .cc.o:
|
---|
66 | -@ echo
|
---|
67 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
68 |
|
---|
69 | .cxx.o:
|
---|
70 | -@ echo
|
---|
71 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
72 |
|
---|
73 | .C.o:
|
---|
74 | -@ echo
|
---|
75 | $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
|
---|
76 |
|
---|
77 |
|
---|
78 | .PHONY : all clean objects realclean relink
|
---|
79 |
|
---|
80 | all : $(TARGET)
|
---|
81 |
|
---|
82 | relink : cleanso $(TARGET)
|
---|
83 |
|
---|
84 | objects : $(OBJECTS)
|
---|
85 |
|
---|
86 | $(TARGET) : $(OBJECTS)
|
---|
87 | -@ echo
|
---|
88 | $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
|
---|
89 |
|
---|
90 | $(OBJECTS) : $(HEADERS)
|
---|
91 |
|
---|
92 | clean :
|
---|
93 | -rm -f $(OBJECTS)
|
---|
94 |
|
---|
95 | cleanso :
|
---|
96 | -rm -f $(TARGET)
|
---|
97 |
|
---|
98 | realclean : clean cleanso
|
---|