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

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