Changeset 1894
- Timestamp:
- 08/24/10 16:11:34 (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r1879 r1894 7 7 #for linux 8 8 PREFIX := $(word 1, $(CASAPATH))/$(word 2,$(CASAPATH)) 9 PYDIR := $(PREFIX)/python/2.5 9 PYTHONVER := $(shell $(shell make -s -f $(PREFIX)/makedefs VARS=PYTHONVER eval_vars) && echo $$PYTHONVER) 10 PYDIR := $(PREFIX)/python/$(PYTHONVER) 10 11 11 12 ifndef ASAPROOT … … 51 52 clean: 52 53 @cd $(ASAPROOT)/src; make clean 53 @cd $(ASAPROOT)/doc; make clean54 # @cd $(ASAPROOT)/doc; make clean 54 55 @cd $(ASAPROOT)/$(ATNFD); make realclean 56 @cd $(ASAPROOT)/apps; make clean 55 57 56 58 datadist: -
trunk/external-alma/Makefile
r1879 r1894 10 10 CASAARCH := $(word 2, $(CASAPATH)) 11 11 12 CXXFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CXXFLAGS eval_vars) && echo $$CXXFLAGS) 13 CXXOPTS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COPTFLAGS eval_vars) && echo $$COPTFLAGS) 14 LDFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=LD_FLAGS eval_vars) && echo $$LD_FLAGS) 12 15 COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD) 16 CORELIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CORELIB eval_vars) && echo $$CORELIB) 17 WCSLIBLIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=WCSLIBLIB eval_vars) && echo $$WCSLIBLIB) 18 CFITSIOLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOLIBD eval_vars) && echo $$CFITSIOLIBD) 19 CFITSIOINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOINCD eval_vars) && echo $$CFITSIOINCD) 20 RPFITSLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=RPFITSLIBD eval_vars) && echo $$RPFITSLIBD) 21 22 CASAINC := -I$(CASAROOT)/code/include -I$(COREINCD) -I$(CASAROOT)/$(CASAARCH)/include 13 23 CASALIB := $(CASAROOT)/$(CASAARCH)/lib 14 USELIB := lib6415 24 16 TARGETLIB := libatnf.so 17 ifeq "$(CASAARCH)" "darwin" 25 CASALIB := $(CASAROOT)/$(CASAARCH)/lib 26 #USELIB := lib64 27 28 ifeq ("",$(findstring "darwin", "$(CASAARCH)")) 18 29 TARGETLIB := libatnf.dylib 30 else 31 TARGETLIB := libatnf.so 19 32 endif 20 33 … … 25 38 26 39 # 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 40 CXXFLAGS += -fPIC 46 41 47 42 # casacore library dependencies … … 49 44 50 45 # cfitsio 51 CFITSIOROOT := /usr52 CFITSIOINC := -I$(CFITSIOROOT)/include/cfitsio53 46 CFITSIOLIB := -lcfitsio 54 47 55 48 #rpfits 56 RPFITSROOT := /usr57 49 RPFITSLIB := -lrpfits 58 50 … … 60 52 LD := $(CXX) 61 53 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 54 LDFLAGS += -shared 55 ifeq ("", $(findstring "darwin", "$(CASAARCH)")) 56 LDFLAGS += -headerpad_max_install_names -install_name $(CASAROOT)/$(CASAARCH)/lib/$(TARGETLIB) 57 endif 66 58 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) 59 INCDIRS := -I$(COREINCD) -I$(CFITSIOINCD) -I$(EXTDIR) 60 LIBS := -L$(CFITSIOLIBD) $(CFITSIOLIB) -L$(RPFITSLIBD) $(RPFITSLIB) -L$(CASALIB) $(CORELIBS) -lgfortran 73 61 74 62 OBJECTS := $(ATNFDIR)/pks/pks_maths.o \ … … 94 82 $(ATNFDIR)/PKSIO/SDFITSreader.o \ 95 83 $(ATNFDIR)/PKSIO/SDFITSwriter.o #\ 96 # $(ATNFDIR)/PKSIO/PKSmsg. cc84 # $(ATNFDIR)/PKSIO/PKSmsg.o 97 85 98 86 HEADERS := $(ATNFDIR)/pks/pks_maths.h \ -
trunk/src/Makefile
r1879 r1894 18 18 CASAARCH := $(word 2, $(CASAPATH)) 19 19 20 CXXFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CXXFLAGS eval_vars) && echo $$CXXFLAGS) 21 CXXOPTS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COPTFLAGS eval_vars) && echo $$COPTFLAGS) 22 LDFLAGS := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=LD_FLAGS eval_vars) && echo $$LD_FLAGS) 23 20 24 COREINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=COREINCD eval_vars) && echo $$COREINCD) 21 25 CORELIB := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CORELIB eval_vars) && echo $$CORELIB) … … 26 30 PYTHONINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=PYTHONINCD eval_vars) && echo $$PYTHONINCD) 27 31 PYTHONLIB := $(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)29 32 BOOSTROOT := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=BOOSTROOT eval_vars) && echo $$BOOSTROOT) 30 33 RPFITSLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=RPFITSLIBD eval_vars) && echo $$RPFITSLIBD) 34 CFITSIOLIBD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOLIBD eval_vars) && echo $$CFITSIOLIBD) 35 CFITSIOINCD := $(shell $(shell make -s -f $(CASAROOT)/$(CASAARCH)/makedefs VARS=CFITSIOINCD eval_vars) && echo $$CFITSIOINCD) 31 36 32 37 CASAINC := -I$(CASAROOT)/code/include -I$(COREINCD) -I$(CASAROOT)/$(CASAARCH)/include 33 38 CASALIB := $(CASAROOT)/$(CASAARCH)/lib 34 USELIB := lib6435 39 36 40 # the compiler … … 40 44 41 45 # 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 46 CXXFLAGS += -fPIC 47 56 48 CFITSIOLIB := -lcfitsio 57 49 58 50 #rpfits 59 RPFITSROOT := /usr60 51 RPFITSLIB := -lrpfits 61 52 … … 69 60 70 61 # darwin specific CASA flags 71 if eq "$(CASAARCH)" "darwin"62 ifneq (,$(findstring $(CASAARCH)", "darwin")) 72 63 CASAPPLIB += -framework vecLib 73 64 else … … 75 66 endif 76 67 77 # python78 PYTHONINC := $(addprefix -I,$(PYTHONINCD))79 PYTHONLIB := -L$(PYTHONLIBD) $(PYTHONLIB)80 81 # the linker82 68 LD := $(CXX) 83 69 … … 86 72 BOOSTINC := -I$(BOOSTROOT)/include/boost -I$(BOOSTROOT)/include 87 73 88 LDFLAGS := -shared -Wl$(TARGET) -s -Xlinker -rpath -Xlinker $(BOOSTROOT)/lib:$(PYTHONROOT)/lib:$(CASALIB) 89 ifeq "$(CASAARCH)" "darwin" 90 LDFLAGS := -bundle 91 endif 74 LDFLAGS += -shared 92 75 93 76 94 77 # DO NOT MODIFY AFTER THIS 95 INCDIRS := -I. $(CASAINC) $(CFITSIOINC) $(BOOSTINC) $(PYTHONINC) -I$(ASAPROOT)/$(ATNFD)78 INCDIRS := -I. $(CASAINC) -I$(CFITSIOINCD) $(BOOSTINC) -I$(PYTHONINCD) -I$(ASAPROOT)/$(ATNFD) 96 79 LIBS := $(PYTHONLIB) $(BOOSTLIB) $(CASAPPLIB) 97 80
Note:
See TracChangeset
for help on using the changeset viewer.