Changeset 1892 for trunk/external


Ignore:
Timestamp:
08/24/10 11:55:12 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Makefile for pyrap updated.
It creates libpyrap.so, but not tested this library.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/libpyrap/Makefile

    r1891 r1892  
    99#####
    1010EXTDIR := $(shell pwd)
     11PYRAPROOT := $(EXTDIR)/pyrap-0.3.2/
    1112PYRAPDIR := $(EXTDIR)/pyrap-0.3.2/pyrap/Converters
    1213
     
    1516CASAARCH := $(word 2, $(CASAPATH))
    1617ifeq "$(CASAARCH)" "darwin"
     18   CASADIST := /opt/casa
     19else
    1720   CASADIST := /usr/lib/casapy
    18 else
    19    CASADIST := /opt/casa
    2021endif
    2122
     23TARGET := libpyrap.so
     24INSTDIR := $(CASAROOT)/$(CASAARCH)/lib
    2225
    2326# CASACORE
     27#COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD)
    2428COREINCD := $(CASAROOT)/$(CASAARCH)/include/casacore
    2529CORELIBD := $(CASAROOT)/$(CASAARCH)/lib
     30CORELIB := -L$(CORELIBD) -lcasa_casa
    2631
    27 # boost include directory
    28 BOOSTINCD :=
    29 BOOSTLIBD :=
     32# boost
     33BOOSTROOT := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=BOOSTROOT eval_vars) && echo $$BOOSTROOT)
     34BOOSTINCD := $(BOOSTROOT)/include
     35BOOSTLIBD := $(BOOSTROOT)/lib
     36BOOSTLIB := -L$(BOOSTLIBD) -lboost_python
    3037
    31 # numpy include directory (assume to use numpy in CASA)
     38# numpy (use numpy in CASA)
    3239NUMPYROOT := $(CASADIST)/lib/python2.5/site-packages/numpy
    3340NUMPYINCD := $(NUMPYROOT)/core/include
    3441NUMPYLIBD := $(NUMPYROOT)/core/
     42NUMPYLIB := #-L$(NUMPYLIBD) -lmultiarray
    3543
     44# python
     45PYTHONROOT := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONROOT eval_vars) && echo $$PYTHONROOT)
     46PYTHONINCD := $(PYTHONROOT)/include/python2.5
    3647
     48# the compiler
     49ifndef CXX
     50   CXX      := g++
     51endif
     52
     53# the linker
     54LD := $(CXX)
     55
     56# compiler flags
     57CXXFLAGS := -fPIC -O3 -g
     58CXXFLAGS += -ansi -Wno-long-long -Wall
     59CXXOPTS := -DAIPS_64B -DAIPS_USENUMPY
     60
     61# links to external libraries
     62LIBS := $(CORELIB) $(BOOSTLIB) $(NUMPYLIB)
     63
     64# include directories
     65INCDIRS := -I$(COREINCD) -I$(BOOSTINCD) -I$(NUMPYINCD) \
     66           -I$(PYRAPROOT) -I$(PYTHONINCD)
     67
     68# link option
     69LDFLAGS := -shared
    3770
    3871OBJECTS := $(PYRAPDIR)/PycArray.o \
    3972           $(PYRAPDIR)/PycArrayNP.o \
    4073           $(PYRAPDIR)/PycBasicData.o \
    41            $(PYRAPDIR)/PycExp.o \
     74           $(PYRAPDIR)/PycExcp.o \
    4275           $(PYRAPDIR)/PycRecord.o \
    4376           $(PYRAPDIR)/PycValueHolder.o #\
    4477#           $(PYRAPDIR)/PycArrayNA.o
    4578
    46 all:
     79HEADERS := $(PYRAPDIR)/PycArrayComCC.h \
     80           $(PYRAPDIR)/PycArrayComH.h \
     81           $(PYRAPDIR)/PycArray.h \
     82           $(PYRAPDIR)/PycArrayNP.h \
     83           $(PYRAPDIR)/PycBasicData.h \
     84           $(PYRAPDIR)/PycExcp.h \
     85           $(PYRAPDIR)/PycRecord.h \
     86           $(PYRAPDIR)/PycValueHolder.h #\
     87#          $(PYRAPDIR)/PycArrayNA.h
     88
     89all: $(TARGET)
     90
     91.cc.o:
     92        $(CXX) $(CXXOPTS) -c $(CXXFLAGS) $(INCDIRS) -o $@ $<
     93
     94$(TARGET): $(OBJECTS)
     95        $(LD) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
     96
     97$(OBJECTS): $(HEADERS)
     98
     99clean:
     100        @rm -rf $(OBJECTS) $(TARGET)
     101
     102install:
     103        @cp -f $(TARGET) $(INSTDIR)
Note: See TracChangeset for help on using the changeset viewer.