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

Last change on this file since 689 was 655, checked in by mar637, 19 years ago

various modifiactions after building on different platforms

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