source: trunk/src/Makefile@ 791

Last change on this file since 791 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
RevLine 
[684]1TARGET := /tmp/_asap.so
[635]2ifndef CXX
3 CXX := g++
[260]4endif
[635]5CXXFLAGS := -O3 -fPIC
6CXXFLAGS += -ansi
[82]7CXXFLAGS += -pedantic -Wno-long-long
[684]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
[684]12CFITSIOLIB := /usr/local/lib/libcfitsio_lfs.a
13#CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio
14#CFITSIOLIB := -L$(CFITSIOROOT) -lcfitsio
[71]15
[684]16
[82]17CASAROOT := $(word 1, $(AIPSPATH))
[655]18CASAARCH := $(word 2, $(AIPSPATH))
[684]19CASAINC := -I$(CASAROOT)/code/include -I$(CASAROOT)/code/casa/wcslib
[655]20CASALIB := $(CASAROOT)/$(CASAARCH)/lib
[684]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 \
[684]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
[684]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 \
[717]52 SDLog.o \
[356]53 SDAttr.o \
[65]54 SDContainer.o \
[465]55 SDFitTable.o \
[416]56 SDPol.o \
[460]57 SDPol2.o \
[65]58 SDMemTable.o \
59 SDReader.o \
60 SDWriter.o \
61 SDMath.o \
[99]62 SDFitter.o \
[65]63 SDTemplates.o \
[168]64 SDMathWrapper.o \
[193]65 SDFITSImageWriter.o \
[201]66 SDAsciiWriter.o \
[655]67 SDLineFinder.o
68PYOBJECTS := python_SDMemTable.o \
[65]69 python_SDReader.o \
70 python_SDWriter.o \
71 python_SDMath.o \
[99]72 python_SDFitter.o \
[465]73 python_SDFitTable.o \
[297]74 python_SDLineFinder.o \
[717]75 python_SDLog.o \
[65]76 python_SD.o
[31]77
[655]78OBJECTS := $(CCOBJECTS) $(PYOBJECTS)
[2]79
[216]80HEADERS := SDDefs.h \
[356]81 SDAttr.h \
[216]82 SDContainer.h \
[465]83 SDFitTable.h \
[65]84 SDMemTable.h \
[416]85 SDPol.h \
[65]86 SDReader.h \
87 SDWriter.h \
88 SDMath.h \
[99]89 SDFitter.h \
[65]90 SDMemTableWrapper.h \
91 SDMathWrapper.h \
92 SDReaderWrapper.h \
93 SDWriterWrapper.h \
[193]94 SDFITSImageWriter.h \
[201]95 SDAsciiWriter.h \
[297]96 SDLineFinder.h \
[717]97 SDLog.h \
[65]98 python_SD.h
[2]99
[655]100STATICCCLIB := libasap.a
101MEMBERS := $(patsubst %,$(STATICCCLIB)(%),$(CCOBJECTS))
[193]102
[2]103.SUFFIXES: .c .o .cpp .cc .cxx .C
104
105.cpp.o:
[65]106 -@ echo
[684]107 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]108
109.cc.o:
[65]110 -@ echo
[684]111 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]112
[65]113.cxx.o:
114 -@ echo
[684]115 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]116
117.C.o:
[65]118 -@ echo
[684]119 $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]120
121
[65]122.PHONY : all clean objects realclean relink
[2]123
[65]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
[655]136staticlib: $(MEMBERS)
137
[65]138clean :
[2]139 -rm -f $(OBJECTS)
140
[65]141cleanso :
[2]142 -rm -f $(TARGET)
[65]143
144realclean : clean cleanso
Note: See TracBrowser for help on using the repository browser.