source: trunk/src/Makefile@ 649

Last change on this file since 649 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
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
[635]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
[71]14
[82]15CASAROOT := $(word 1, $(AIPSPATH))
16CASAINC := -I$(CASAROOT)/code/include
17CASALIB := $(CASAROOT)/linux_gnu/lib
18CASAPPLIB := $(CASALIB)/version.o \
19 -L$(CASALIB) \
[193]20 -latnf -limages -lms -lcomponents -lcoordinates \
[82]21 -llattices -lfits -lmeasures -lmeasures_f \
22 -ltables -lscimath -lscimath_f -lcasa \
[635]23 $(CASALIB)/libwcs.a \
[71]24 -lrpfits $(CFITSIOLIB) -llapack -lblas -lg2c
[2]25
[635]26LD := $(CXX)
[65]27LDFLAGS := -shared -Wl,--soname=$(TARGET)
28LDFLAGS += -s
[2]29
[635]30BOOSTROOT := /usr
31BOOSTLIB := -L$(BOOSTROOT)/lib -lboost_python2.3
32BOOSTINC := -I$(BOOSTROOT)/include/boost
[2]33
[635]34PYTHONROOT := /usr
35PYTHONINC := -I$(PYTHONROOT)/include/python2.3
36PYTHONLIB := -L$(PYTHONROOT)/lib -lpython2.3
[260]37
[82]38INCDIRS := -I. $(CASAINC) $(BOOSTINC) $(PYTHONINC) $(CFITSIOINC)
39LIBS := $(BOOSTLIB) $(PYTHONLIB) $(CASAPPLIB)
[2]40
[65]41OBJECTS := MathUtils.o \
[137]42 MathUtils2.o \
[356]43 SDAttr.o \
[65]44 SDContainer.o \
[465]45 SDFitTable.o \
[416]46 SDPol.o \
[460]47 SDPol2.o \
[65]48 SDMemTable.o \
49 SDReader.o \
50 SDWriter.o \
51 SDMath.o \
[99]52 SDFitter.o \
[65]53 SDTemplates.o \
[168]54 SDMathWrapper.o \
[193]55 SDFITSImageWriter.o \
[201]56 SDAsciiWriter.o \
[297]57 SDLineFinder.o \
[65]58 python_SDMemTable.o \
59 python_SDReader.o \
60 python_SDWriter.o \
61 python_SDMath.o \
[99]62 python_SDFitter.o \
[465]63 python_SDFitTable.o \
[297]64 python_SDLineFinder.o \
[65]65 python_SD.o
[31]66
[2]67
[216]68HEADERS := SDDefs.h \
[356]69 SDAttr.h \
[216]70 SDContainer.h \
[465]71 SDFitTable.h \
[65]72 SDMemTable.h \
[416]73 SDPol.h \
[65]74 SDReader.h \
75 SDWriter.h \
76 SDMath.h \
[99]77 SDFitter.h \
[65]78 SDMemTableWrapper.h \
79 SDMathWrapper.h \
80 SDReaderWrapper.h \
81 SDWriterWrapper.h \
[193]82 SDFITSImageWriter.h \
[201]83 SDAsciiWriter.h \
[297]84 SDLineFinder.h \
[65]85 python_SD.h
[2]86
[193]87
[2]88.SUFFIXES: .c .o .cpp .cc .cxx .C
89
90.cpp.o:
[65]91 -@ echo
92 $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]93
94.cc.o:
[65]95 -@ echo
96 $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]97
[65]98.cxx.o:
99 -@ echo
100 $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]101
102.C.o:
[65]103 -@ echo
104 $(CXX) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
[2]105
106
[65]107.PHONY : all clean objects realclean relink
[2]108
[65]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 :
[2]122 -rm -f $(OBJECTS)
123
[65]124cleanso :
[2]125 -rm -f $(TARGET)
[65]126
127realclean : clean cleanso
Note: See TracBrowser for help on using the repository browser.