source: trunk/src/Makefile@ 663

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