source: branches/Release12/src/Makefile@ 780

Last change on this file since 780 was 717, checked in by mar637, 19 years ago

implemented use of SDLog

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.4 KB
Line 
1TARGET := /tmp/_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 SDLog.o \
53 SDAttr.o \
54 SDContainer.o \
55 SDFitTable.o \
56 SDPol.o \
57 SDPol2.o \
58 SDMemTable.o \
59 SDReader.o \
60 SDWriter.o \
61 SDMath.o \
62 SDFitter.o \
63 SDTemplates.o \
64 SDMathWrapper.o \
65 SDFITSImageWriter.o \
66 SDAsciiWriter.o \
67 SDLineFinder.o
68PYOBJECTS := python_SDMemTable.o \
69 python_SDReader.o \
70 python_SDWriter.o \
71 python_SDMath.o \
72 python_SDFitter.o \
73 python_SDFitTable.o \
74 python_SDLineFinder.o \
75 python_SDLog.o \
76 python_SD.o
77
78OBJECTS := $(CCOBJECTS) $(PYOBJECTS)
79
80HEADERS := SDDefs.h \
81 SDAttr.h \
82 SDContainer.h \
83 SDFitTable.h \
84 SDMemTable.h \
85 SDPol.h \
86 SDReader.h \
87 SDWriter.h \
88 SDMath.h \
89 SDFitter.h \
90 SDMemTableWrapper.h \
91 SDMathWrapper.h \
92 SDReaderWrapper.h \
93 SDWriterWrapper.h \
94 SDFITSImageWriter.h \
95 SDAsciiWriter.h \
96 SDLineFinder.h \
97 SDLog.h \
98 python_SD.h
99
100STATICCCLIB := libasap.a
101MEMBERS := $(patsubst %,$(STATICCCLIB)(%),$(CCOBJECTS))
102
103.SUFFIXES: .c .o .cpp .cc .cxx .C
104
105.cpp.o:
106 -@ echo
107 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
108
109.cc.o:
110 -@ echo
111 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
112
113.cxx.o:
114 -@ echo
115 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
116
117.C.o:
118 -@ echo
119 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
120
121
122.PHONY : all clean objects realclean relink
123
124all : $(TARGET)
125
126relink : cleanso $(TARGET)
127
128objects : $(OBJECTS)
129
130$(TARGET) : $(OBJECTS)
131 -@ echo
132 $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
133
134$(OBJECTS) : $(HEADERS)
135
136staticlib: $(MEMBERS)
137
138clean :
139 -rm -f $(OBJECTS)
140
141cleanso :
142 -rm -f $(TARGET)
143
144realclean : clean cleanso
Note: See TracBrowser for help on using the repository browser.