source: branches/Release-2-fixes/src/Makefile@ 2432

Last change on this file since 2432 was 698, checked in by mar637, 19 years ago

update to current aips++ system

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1TARGET := _asap.so
2ifndef CXX
3 CXX := g++
4endif
5CXXFLAGS := -O3 -fPIC
6CXXFLAGS += -ansi
7CXXFLAGS += -pedantic -Wno-long-long
8CXXOPTS := -DAIPS_NO_TEMPLATE_SRC
9
10CFITSIOROOT := /usr/local If aips++ is build with LFS you need to have
11# libcfitsio with lfs support
12CFITSIOLIB := /usr/local/lib/libcfitsio_lfs.a
13#CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio
14#CFITSIOLIB := -L$(CFITSIOROOT) -lcfitsio
15
16
17CASAROOT := $(word 1, $(AIPSPATH))
18CASAARCH := $(word 2, $(AIPSPATH))
19CASAINC := -I$(CASAROOT)/code/include -I$(CASAROOT)/code/casa/wcslib
20CASALIB := $(CASAROOT)/$(CASAARCH)/lib
21
22
23# This assumes all casa libs are static only (*.a)
24# if not than there might by symbol resolution errors.
25CASAPPLIB := $(CASALIB)/version.o \
26 -L$(CASALIB) -static \
27 -latnf -limages -lms -lcomponents -lcoordinates \
28 -llattices -lfits -lmeasures -lmeasures_f \
29 -ltables -lscimath -lscimath_f -lcasa \
30 $(CASALIB)/libwcs.a \
31 -lrpfits $(CFITSIOLIB) -dy -llapack -lblas -lg2c
32
33LD := $(CXX)
34LDFLAGS := -shared -Wl$(TARGET) -s
35
36PYVERSION := 2.3
37PYTHONROOT := /usr
38PYTHONINC := -I$(PYTHONROOT)/include/python$(PYVERSION)
39PYTHONLIB := -L$(PYTHONROOT)/lib -lpython$(PYVERSION)
40
41
42BOOSTROOT := /usr
43BOOSTLIB := -L$(BOOSTROOT)/lib -lboost_python
44BOOSTINC := -I$(BOOSTROOT)/include/boost
45
46
47INCDIRS := -I. $(CASAINC) $(BOOSTINC) $(PYTHONINC) $(CFITSIOINC)
48LIBS := $(PYTHONLIB) $(BOOSTLIB) $(CASAPPLIB)
49
50CCOBJECTS := MathUtils.o \
51 MathUtils2.o \
52 SDAttr.o \
53 SDContainer.o \
54 SDFitTable.o \
55 SDPol.o \
56 SDPol2.o \
57 SDMemTable.o \
58 SDReader.o \
59 SDWriter.o \
60 SDMath.o \
61 SDFitter.o \
62 SDTemplates.o \
63 SDMathWrapper.o \
64 SDFITSImageWriter.o \
65 SDAsciiWriter.o \
66 SDLineFinder.o
67PYOBJECTS := python_SDMemTable.o \
68 python_SDReader.o \
69 python_SDWriter.o \
70 python_SDMath.o \
71 python_SDFitter.o \
72 python_SDFitTable.o \
73 python_SDLineFinder.o \
74 python_SD.o
75
76OBJECTS := $(CCOBJECTS) $(PYOBJECTS)
77
78HEADERS := SDDefs.h \
79 SDAttr.h \
80 SDContainer.h \
81 SDFitTable.h \
82 SDMemTable.h \
83 SDPol.h \
84 SDReader.h \
85 SDWriter.h \
86 SDMath.h \
87 SDFitter.h \
88 SDMemTableWrapper.h \
89 SDMathWrapper.h \
90 SDReaderWrapper.h \
91 SDWriterWrapper.h \
92 SDFITSImageWriter.h \
93 SDAsciiWriter.h \
94 SDLineFinder.h \
95 python_SD.h
96
97STATICCCLIB := libasap.a
98MEMBERS := $(patsubst %,$(STATICCCLIB)(%),$(CCOBJECTS))
99
100.SUFFIXES: .c .o .cpp .cc .cxx .C
101
102.cpp.o:
103 -@ echo
104 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
105
106.cc.o:
107 -@ echo
108 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
109
110.cxx.o:
111 -@ echo
112 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
113
114.C.o:
115 -@ echo
116 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
117
118
119.PHONY : all clean objects realclean relink
120
121all : $(TARGET)
122
123relink : cleanso $(TARGET)
124
125objects : $(OBJECTS)
126
127$(TARGET) : $(OBJECTS)
128 -@ echo
129 $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
130
131$(OBJECTS) : $(HEADERS)
132
133staticlib: $(MEMBERS)
134
135clean :
136 -rm -f $(OBJECTS)
137
138cleanso :
139 -rm -f $(TARGET)
140
141realclean : clean cleanso
Note: See TracBrowser for help on using the repository browser.