source: trunk/src/Makefile@ 650

Last change on this file since 650 was 635, checked in by mar637, 20 years ago

update to reflect /usr instead of /usr/local as default lib/incdir

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