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