Changeset 1894


Ignore:
Timestamp:
08/24/10 16:11:34 (14 years ago)
Author:
Kana Sugimoto
Message:

New Development: No

JIRA Issue: No (related to merge)

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs: try make

Put in Release Notes: No

Module(s): asap

Description: merged Wes's developments in NRAO repository.

Library and include pathes and build options are copied from casa build.


Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    r1879 r1894  
    77#for linux
    88PREFIX := $(word 1, $(CASAPATH))/$(word 2,$(CASAPATH))
    9 PYDIR := $(PREFIX)/python/2.5
     9PYTHONVER := $(shell $(shell make -s -f $(PREFIX)/makedefs VARS=PYTHONVER eval_vars) && echo $$PYTHONVER)
     10PYDIR := $(PREFIX)/python/$(PYTHONVER)
    1011
    1112ifndef ASAPROOT
     
    5152clean:
    5253        @cd $(ASAPROOT)/src; make clean
    53         @cd $(ASAPROOT)/doc; make clean
     54#       @cd $(ASAPROOT)/doc; make clean
    5455        @cd $(ASAPROOT)/$(ATNFD); make realclean
     56        @cd $(ASAPROOT)/apps; make clean
    5557
    5658datadist:
  • trunk/external-alma/Makefile

    r1879 r1894  
    1010CASAARCH  := $(word 2, $(CASAPATH))
    1111
     12CXXFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CXXFLAGS eval_vars) && echo $$CXXFLAGS)
     13CXXOPTS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COPTFLAGS eval_vars) && echo $$COPTFLAGS)
     14LDFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=LD_FLAGS eval_vars) && echo $$LD_FLAGS)
    1215COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD)
     16CORELIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CORELIB eval_vars) && echo $$CORELIB)
     17WCSLIBLIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=WCSLIBLIB eval_vars) && echo $$WCSLIBLIB)
     18CFITSIOLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOLIBD eval_vars) && echo $$CFITSIOLIBD)
     19CFITSIOINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOINCD eval_vars) && echo $$CFITSIOINCD)
     20RPFITSLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=RPFITSLIBD eval_vars) && echo $$RPFITSLIBD)
     21
     22CASAINC   := -I$(CASAROOT)/code/include -I$(COREINCD) -I$(CASAROOT)/$(CASAARCH)/include
    1323CASALIB   := $(CASAROOT)/$(CASAARCH)/lib
    14 USELIB := lib64
    1524
    16 TARGETLIB   := libatnf.so
    17 ifeq "$(CASAARCH)" "darwin"
     25CASALIB   := $(CASAROOT)/$(CASAARCH)/lib
     26#USELIB := lib64
     27
     28ifeq ("",$(findstring "darwin", "$(CASAARCH)"))
    1829        TARGETLIB   := libatnf.dylib
     30else
     31        TARGETLIB   := libatnf.so
    1932endif
    2033
     
    2538
    2639# compiler flags
    27 CXXFLAGS := -fPIC -O2 -g -fno-omit-frame-pointer -pipe
    28 CXXFLAGS += -Wall -Wextra -Wcast-align -Wno-comment
    29 # passing flags to codes for casacore
    30 CXXOPTS := -DCASA_USECASAPATH -DCASACORE_NEEDS_RETHROW -DAIPS_STDLIB \
    31         -DAIPS_AUTO_STL -D_GNU_SOURCE
    32 # for little endian cpu (casacore + atnf flag)
    33 CXXOPTS += -DAIPS_LITTLE_ENDIAN
    34 # for 64-bit platforms
    35 CXXOPTS += -DAIPS_64B
    36 ifeq "$(CASAARCH)" "darwin"
    37         CXXFLAGS += -mmacosx-version-min=10.5 -dynamic -mtune=nocona \
    38                 -mfpmath=sse -ftree-vectorize -ffast-math -fasm-blocks
    39         CXXOPTS += -DAIPS_DARWIN
    40 else # so far CASAARCH is either darwin, linux_gnu, or linux_64b (Aug.2010)
    41         CXXFLAGS += -ansi
    42         CXXOPTS += -DAIPS_LINUX
    43 # platform dependent casacore flags
    44         CXXOPTS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
    45 endif
     40CXXFLAGS += -fPIC
    4641
    4742# casacore library dependencies
     
    4944
    5045# cfitsio
    51 CFITSIOROOT := /usr
    52 CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio
    5346CFITSIOLIB := -lcfitsio
    5447
    5548#rpfits
    56 RPFITSROOT := /usr
    5749RPFITSLIB := -lrpfits
    5850
     
    6052LD        := $(CXX)
    6153
    62 LDFLAGS   := -Wl,--no-undefined -shared -Wl,-soname,$(TARGETLIB) -s -Xlinker -rpath -Xlinker $(CASALIB)
    63 ifeq "$(CASAARCH)" "darwin"
    64    LDFLAGS   := -dynamiclib -Wl,-undefined -Wl,error -install_name $(CASALIB)/$(TARGETLIB) -Xlinker -rpath -Xlinker $(CASALIB)
    65 endif
     54LDFLAGS   += -shared
     55ifeq ("", $(findstring "darwin", "$(CASAARCH)"))
     56           LDFLAGS += -headerpad_max_install_names -install_name $(CASAROOT)/$(CASAARCH)/lib/$(TARGETLIB)
     57endif 
    6658
    67 # resoleve dependencies on external package
    68 # pks: -lcasa_casa, atnf/pks/pks_math.h
    69 # PKSIO: -lcfitsio, -lrpfits, atnf/pks/pks_maths.h, atnf/PKSIO/****.h
    70 #     -lcasa_casa, -lcasa_measures, -lcasa_scimath, -lcasa_ms, -lcasa_tables
    71 INCDIRS   := -I$(COREINCD) $(CFITSIOINC) -I$(EXTDIR)
    72 LIBS      := $(CFITSIOLIB) $(RPFITSLIB) -L$(CASALIB) $(CORELIBS)
     59INCDIRS   := -I$(COREINCD) -I$(CFITSIOINCD) -I$(EXTDIR)
     60LIBS      := -L$(CFITSIOLIBD) $(CFITSIOLIB) -L$(RPFITSLIBD) $(RPFITSLIB) -L$(CASALIB) $(CORELIBS) -lgfortran
    7361
    7462OBJECTS := $(ATNFDIR)/pks/pks_maths.o \
     
    9482        $(ATNFDIR)/PKSIO/SDFITSreader.o \
    9583        $(ATNFDIR)/PKSIO/SDFITSwriter.o #\
    96 #       $(ATNFDIR)/PKSIO/PKSmsg.cc
     84#       $(ATNFDIR)/PKSIO/PKSmsg.o
    9785
    9886HEADERS := $(ATNFDIR)/pks/pks_maths.h \
  • trunk/src/Makefile

    r1879 r1894  
    1818CASAARCH  := $(word 2, $(CASAPATH))
    1919
     20CXXFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CXXFLAGS eval_vars) && echo $$CXXFLAGS)
     21CXXOPTS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COPTFLAGS eval_vars) && echo $$COPTFLAGS)
     22LDFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=LD_FLAGS eval_vars) && echo $$LD_FLAGS)
     23
    2024COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD)
    2125CORELIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CORELIB eval_vars) && echo $$CORELIB)
     
    2630PYTHONINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONINCD eval_vars) && echo $$PYTHONINCD)
    2731PYTHONLIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONLIB eval_vars) && echo $$PYTHONLIB)
    28 #PYTHONVER := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONVER eval_vars) && echo $$PYTHONVER)
    2932BOOSTROOT := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=BOOSTROOT eval_vars) && echo $$BOOSTROOT)
    3033RPFITSLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=RPFITSLIBD eval_vars) && echo $$RPFITSLIBD)
     34CFITSIOLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOLIBD eval_vars) && echo $$CFITSIOLIBD)
     35CFITSIOINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOINCD eval_vars) && echo $$CFITSIOINCD)
    3136
    3237CASAINC   := -I$(CASAROOT)/code/include -I$(COREINCD) -I$(CASAROOT)/$(CASAARCH)/include
    3338CASALIB   := $(CASAROOT)/$(CASAARCH)/lib
    34 USELIB := lib64
    3539
    3640# the compiler
     
    4044
    4145# compiler flags
    42 CXXFLAGS := -fPIC -O3 -g
    43 CXXFLAGS += -ansi -Wno-long-long -Wall
    44 CXXOPTS := -DAIPS_64B
    45 
    46 # darwin specific flags
    47 ifeq "$(CASAARCH)" "darwin"
    48    #CXXFLAGS +=-DAIPS_DARWIN -arch i386 #For 10.6
    49    CXXFLAGS +=-DAIPS_DARWIN
    50    #CXXFLAGS += -Wno-long-double
    51 endif
    52 
    53 # cfitsio
    54 CFITSIOROOT := /usr
    55 CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio
     46CXXFLAGS += -fPIC
     47
    5648CFITSIOLIB := -lcfitsio
    5749
    5850#rpfits
    59 RPFITSROOT := /usr
    6051RPFITSLIB := -lrpfits
    6152
     
    6960
    7061# darwin specific CASA flags
    71 ifeq "$(CASAARCH)" "darwin"
     62ifneq (,$(findstring $(CASAARCH)", "darwin"))
    7263   CASAPPLIB += -framework vecLib
    7364else
     
    7566endif
    7667
    77 # python
    78 PYTHONINC := $(addprefix -I,$(PYTHONINCD))
    79 PYTHONLIB := -L$(PYTHONLIBD) $(PYTHONLIB)
    80 
    81 # the linker
    8268LD        := $(CXX)
    8369
     
    8672BOOSTINC  := -I$(BOOSTROOT)/include/boost -I$(BOOSTROOT)/include
    8773
    88 LDFLAGS   := -shared -Wl$(TARGET) -s -Xlinker -rpath -Xlinker $(BOOSTROOT)/lib:$(PYTHONROOT)/lib:$(CASALIB)
    89 ifeq "$(CASAARCH)" "darwin"
    90    LDFLAGS   := -bundle
    91 endif
     74LDFLAGS   += -shared
    9275
    9376
    9477# DO NOT MODIFY AFTER THIS
    95 INCDIRS   := -I. $(CASAINC)  $(CFITSIOINC) $(BOOSTINC) $(PYTHONINC) -I$(ASAPROOT)/$(ATNFD)
     78INCDIRS   := -I. $(CASAINC)  -I$(CFITSIOINCD) $(BOOSTINC) -I$(PYTHONINCD) -I$(ASAPROOT)/$(ATNFD)
    9679LIBS      := $(PYTHONLIB)  $(BOOSTLIB) $(CASAPPLIB)
    9780
Note: See TracChangeset for help on using the changeset viewer.