[1159] | 1 | ##############################################################################
|
---|
| 2 | ## Compilers
|
---|
| 3 | ##############################################################################
|
---|
| 4 |
|
---|
| 5 | C++ROOT := /usr
|
---|
| 6 | C++ := $(C++ROOT)/bin/g++ -Wno-deprecated -Wno-long-double
|
---|
| 7 | C++OPTLVL := -O2 -falign-loops=32
|
---|
| 8 | C++STD += -fexceptions -pipe -Wall -Wno-non-template-friend -Woverloaded-virtual -Wcast-align -Wno-comment
|
---|
| 9 |
|
---|
| 10 | ## -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
---|
| 11 |
|
---|
| 12 | CC := $(C++ROOT)/bin/gcc
|
---|
| 13 | CSTD := -DAIPS_DARWIN -Wall -fexceptions
|
---|
| 14 | COPTLVL := -O2 -fno-strength-reduce -falign-loops=32
|
---|
| 15 |
|
---|
| 16 | ## -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
|
---|
| 17 |
|
---|
| 18 | F77ROOT := /usr/local
|
---|
| 19 | FC := $(F77ROOT)/bin/g77
|
---|
| 20 | FCOPTLVL := -O2 -falign-loops=32
|
---|
| 21 | FCOPT += -fPIC
|
---|
| 22 | F77LIB := -lg2c
|
---|
| 23 |
|
---|
| 24 | ##############################################################################
|
---|
| 25 | ## General external libraries.
|
---|
| 26 | ##############################################################################
|
---|
| 27 |
|
---|
| 28 | PGPLOTROOT := /opt/local
|
---|
| 29 |
|
---|
| 30 | TCLROOT := /opt/local
|
---|
| 31 | TCLLIB := -ltk -ltcl -ldl
|
---|
| 32 |
|
---|
| 33 | X11ROOT := /usr/X11R6
|
---|
| 34 |
|
---|
| 35 | MotifROOT := /usr/X11R6
|
---|
| 36 |
|
---|
| 37 | XPMROOT := $(X11ROOT)
|
---|
| 38 |
|
---|
| 39 | LAPACKLIBD :=
|
---|
| 40 | LAPACKLIB := -framework vecLib
|
---|
| 41 |
|
---|
| 42 | # Platform-specific libraries - always added.
|
---|
| 43 | ARCHLIBS := -lm
|
---|
| 44 |
|
---|
| 45 | ##############################################################################
|
---|
| 46 | ## External libraries required by particular AIPS++ packages.
|
---|
| 47 | ##############################################################################
|
---|
| 48 |
|
---|
| 49 | # RPFITS (required by ATNF).
|
---|
| 50 | RPFITSROOT := /usr/local
|
---|
| 51 | RPFITSDEFS :=
|
---|
| 52 | RPFITSINCD = $(RPFITSROOT)/include
|
---|
| 53 | RPFITSLIBD = $(RPFITSROOT)/lib
|
---|
| 54 | RPFITSLIB := -lrpfits
|
---|
| 55 |
|
---|
| 56 | CFITSIOROOT := /usr/local
|
---|
| 57 | CFITSIODEFS :=
|
---|
| 58 | CFITSIOINCD = $(CFITSIOROOT)/include/cfitsio
|
---|
| 59 | CFITSIOLIBD = $(CFITSIOROOT)/lib
|
---|
| 60 | CFITSIOLIB := -lcfitsio
|
---|
| 61 |
|
---|
| 62 | WCSLIBLIB := $(WCSLIBLIBD)/libwcs.a
|
---|
| 63 | MIRLIBLIB := $(MIRLIBLIBD)/libmir.a
|
---|
| 64 |
|
---|
| 65 | ##############################################################################
|
---|
| 66 | ## Compilation and linkage variables
|
---|
| 67 | ##############################################################################
|
---|
| 68 |
|
---|
| 69 | EXT_GLISH_DIR := /opt/local
|
---|
| 70 | GLISHLOLIB :=
|
---|
| 71 |
|
---|
| 72 | # Preprocessor flags for system debug/optimized compilations.
|
---|
| 73 | CPPSTD := -DAIPS_STDLIB -DAIPS_DARWIN -DAIPS_BIG_ENDIAN -D_GLIBCPP_DEPRECATED -DAIPS_NO_LEA_MALLOC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DAIPS_AUTO_STL
|
---|
| 74 | CPPSTD += -DNEED_FORTRAN_UNDERSCORES=1
|
---|
| 75 |
|
---|
| 76 | # Use do-it-yourself template instantiation.
|
---|
| 77 | TEMPLATES := diy
|
---|
| 78 |
|
---|
| 79 | # Link flags for system debug/optimized compilations; these are passed to
|
---|
| 80 | # the C++ compiler.
|
---|
| 81 | LDDBG := -Xlinker -multiply_defined -Xlinker suppress -Xlinker -bind_at_load \
|
---|
| 82 | -L/opt/local/lib
|
---|
| 83 | LDOPT := $(LDDBG)
|
---|
| 84 |
|
---|
| 85 | RANLIB := /usr/bin/ranlib
|
---|
| 86 |
|
---|
| 87 | SFXSHAR := dylib
|
---|
| 88 | LDSOPTS := -dynamiclib -single_module
|
---|
| 89 |
|
---|
| 90 | PERL4 := /usr/bin/perl
|
---|
| 91 | PERL5 := /usr/bin/perl
|
---|
| 92 |
|
---|
| 93 | # C++ C FORTRAN
|
---|
| 94 | # dbg opt dbg opt dbg opt
|
---|
| 95 | # ------------- ------------- -------------
|
---|
| 96 | LIBcasa := defeat static defeat defeat defeat defeat
|
---|
| 97 | LIBscimath := defeat static defeat defeat defeat static
|
---|
| 98 | LIBtables := defeat static defeat defeat defeat defeat
|
---|
| 99 | LIBmeasures := defeat static defeat defeat defeat static
|
---|
| 100 | LIBfits := defeat static defeat defeat defeat defeat
|
---|
| 101 | LIBgraphics := defeat static defeat defeat defeat defeat
|
---|
| 102 | LIBlattices := defeat static defeat defeat defeat defeat
|
---|
| 103 | LIBcoordinates := defeat static defeat defeat defeat defeat
|
---|
| 104 | LIBcomponents := defeat static defeat defeat defeat defeat
|
---|
| 105 | LIBimages := defeat static defeat defeat defeat defeat
|
---|
| 106 | LIBms := defeat static defeat defeat defeat defeat
|
---|
| 107 | LIBmsvis := defeat static defeat defeat defeat defeat
|
---|
| 108 | LIBcalibration := defeat static defeat defeat defeat defeat
|
---|
| 109 | LIBionosphere := defeat static defeat defeat defeat static
|
---|
| 110 | LIBflagging := defeat static defeat defeat defeat defeat
|
---|
| 111 | LIBdish := defeat static defeat defeat defeat defeat
|
---|
| 112 | LIBsimulators := defeat static defeat defeat defeat defeat
|
---|
| 113 | LIBsynthesis := defeat static defeat defeat defeat static
|
---|
| 114 | LIBtasking := defeat static defeat defeat defeat defeat
|
---|
| 115 | LIBtrialdisplay := defeat static defeat defeat defeat defeat
|
---|
| 116 | LIBnrao := defeat static defeat defeat defeat defeat
|
---|
| 117 | LIBnpoi := defeat defeat defeat defeat defeat defeat
|
---|
| 118 | LIBalma := defeat static defeat defeat defeat defeat
|
---|
| 119 | LIBatnf := defeat static defeat defeat defeat defeat
|
---|
| 120 | LIBnfra := defeat static defeat defeat defeat defeat
|
---|
| 121 |
|
---|
| 122 |
|
---|
| 123 | # TeX, dvips, and MetaFont paths.
|
---|
| 124 | #--------------------------------
|
---|
| 125 | TEXROOT := /usr/lib/texmf/texmf
|
---|
| 126 | TEXFONTS := $(TEXROOT)/fonts/tfm//
|
---|
| 127 | TEXFORMATS := $(TEXROOT)/web2c
|
---|
| 128 | TEXINPUTS := $(TEXROOT)/tex//
|
---|
| 129 | TEXPOOL := $(TEXROOT)/web2c
|
---|
| 130 | TEXPKS := $(TEXROOT)/fonts/pk//
|
---|
| 131 | MFBASES := $(TEXROOT)/web2c
|
---|
| 132 | MFINPUTS := $(TEXROOT)/metafont//:$(TEXROOT)/fonts/source//
|
---|
| 133 | MFPOOL := $(TEXROOT)/web2c
|
---|
| 134 | LATEX2HTML := /usr/local/bin/latex2html -init_file $(AIPSROOT)/code/install/docutils/latex2html-init
|
---|
| 135 |
|
---|
| 136 | # Set these variables to get local icons in the html files generated by
|
---|
| 137 | # latex2html
|
---|
| 138 | ICONSERVER := http://www.nrao.edu/icons/latex2html
|
---|
| 139 | ICONS2LOCAL := $(AIPSARCH)/bin/redoicons.sh
|
---|
| 140 |
|
---|
| 141 | # Variables which tell the makefiles what to do and how to do it
|
---|
| 142 | #-----------------------------------------------------------------------------
|
---|
| 143 | # Command for benchmarking the rebuild (usually 'adate -l').
|
---|
| 144 | TIMER := adate -l
|
---|
| 145 |
|
---|
| 146 | # Unset this to defeat document compilation.
|
---|
| 147 | DOCSYS :=
|
---|
| 148 |
|
---|
| 149 | # Unset this to defeat document extraction from C++ sources.
|
---|
| 150 | DOCEXTR :=
|
---|
| 151 |
|
---|
| 152 | # What consortium packages to build (atnf bima hia nfra nral nrao tifr).
|
---|
| 153 | CONSORTIA := atnf
|
---|
| 154 |
|
---|
| 155 | #-----------------------------------------------------------------------------
|
---|
| 156 | # The remaining definitions are programmer variables for code development.
|
---|
| 157 | # These are not required for production-line systems.
|
---|
| 158 | #-----------------------------------------------------------------------------
|
---|
| 159 | ifeq "$(MAKEMODE)" "programmer"
|
---|
| 160 | # Alternate definitions for CPPFLAGS.
|
---|
| 161 | ifeq "$(CPPFLAGS)" "alt1"
|
---|
| 162 | override CPPFLAGS := $(CPPOPT) $(EXTRA_CPPFLAGS)
|
---|
| 163 | endif
|
---|
| 164 |
|
---|
| 165 | # C++ compiler flags for programmer compilations.
|
---|
| 166 | ifdef OPT
|
---|
| 167 | C++FLAGS := $(C++OPT) -Wall
|
---|
| 168 | else
|
---|
| 169 | C++FLAGS := $(C++DBG) -Wall
|
---|
| 170 | endif
|
---|
| 171 |
|
---|
| 172 | # Where to put binaries for programmer compilations.
|
---|
| 173 | ifdef OPT
|
---|
| 174 | PGMRLIBD := $(wildcard $(PGMRARCH)/lib)
|
---|
| 175 | PGMRBIND := $(wildcard $(PGMRARCH)/bin)
|
---|
| 176 | else
|
---|
| 177 | PGMRLIBD := $(wildcard $(PGMRARCH)/libdbg)
|
---|
| 178 | PGMRBIND := $(wildcard $(PGMRARCH)/bindbg)
|
---|
| 179 | endif
|
---|
| 180 |
|
---|
| 181 | # Alternate definitions for C++FLAGS.
|
---|
| 182 | ifeq "$(C++FLAGS)" "alt1"
|
---|
| 183 | override CPPFLAGS := $(CPPOPT) $(EXTRA_CPPFLAGS)
|
---|
| 184 | PGMRBIND := $(wildcard $(PGMRARCH)/bin)
|
---|
| 185 | PGMRLIBD := $(wildcard $(PGMRARCH)/lib)
|
---|
| 186 | override C++FLAGS := $(C++OPT) -Wall
|
---|
| 187 | endif
|
---|
| 188 |
|
---|
| 189 | # Extra compiler flags.
|
---|
| 190 | C++FLAGS += $(EXTRA_C++FLAGS)
|
---|
| 191 | endif
|
---|