| 1 | #  -*- makefile -*-
 | 
|---|
| 2 | # #########################  Sophya ############################# 
 | 
|---|
| 3 | # ##### LAL (Orsay) / IN2P3-CNRS  DAPNIA/SPP (Saclay) / CEA #####
 | 
|---|
| 4 | # ############################################################### 
 | 
|---|
| 5 | # General setup GNU Makefile for Sopyha/Planck. To be included in all makefiles.  
 | 
|---|
| 6 | # Define  makefile variables according to CPU 
 | 
|---|
| 7 | # MACHEROSD = `uname | sed 's/-//'`   i.e. { AIX HPUX OSF1 Linux ... }
 | 
|---|
| 8 | # and compilers {g++, cxx, KCC, xlC, aCC, ...}
 | 
|---|
| 9 | # 
 | 
|---|
| 10 | # Makefile variables set are:
 | 
|---|
| 11 | # - Path to Exec, Include, Libs, Obj directories (from DPCDEVREP env. var.)
 | 
|---|
| 12 | #     i.e. variables LIB, OBJ, EXE, INC 
 | 
|---|
| 13 | #---------------------------------------------------------------------------
 | 
|---|
| 14 | 
 | 
|---|
| 15 | # define MACHEROS from uname
 | 
|---|
| 16 | MACHEROS := $(shell echo `uname`)
 | 
|---|
| 17 | # define the -D option
 | 
|---|
| 18 | MACHEROSD := $(shell echo `uname | sed 's/-//'`)
 | 
|---|
| 19 | # Le sous-repertoire des objets specifique machine-compilo
 | 
|---|
| 20 | #   OSF1 : Alpha avec gcc
 | 
|---|
| 21 | #   OSF1-cxx : Alpha avec cxx
 | 
|---|
| 22 | 
 | 
|---|
| 23 | #### C++
 | 
|---|
| 24 | ifdef EROSCXX
 | 
|---|
| 25 |   CXX := $(EROSCXX)
 | 
|---|
| 26 | endif
 | 
|---|
| 27 | 
 | 
|---|
| 28 | ifeq ($(CXX),gcc)
 | 
|---|
| 29 |   override CXX := g++
 | 
|---|
| 30 | endif
 | 
|---|
| 31 | 
 | 
|---|
| 32 | ifeq ($(EROSCXX),egcs++)
 | 
|---|
| 33 |   # en fait de compilo de egcs++ s'appelle g++ !
 | 
|---|
| 34 |   # comme il faut bien differentier ln -s /usr/bin/g++ /usr/bin/egcs++
 | 
|---|
| 35 |   override CXX := egcs++
 | 
|---|
| 36 | endif
 | 
|---|
| 37 | 
 | 
|---|
| 38 | ifeq ($(CC),xlC)
 | 
|---|
| 39 |   override CXX := xlC
 | 
|---|
| 40 | endif
 | 
|---|
| 41 | 
 | 
|---|
| 42 | #### C
 | 
|---|
| 43 | ifeq ($(CXX), xlC)
 | 
|---|
| 44 |   override CC := xlC
 | 
|---|
| 45 | endif
 | 
|---|
| 46 | 
 | 
|---|
| 47 | ifeq ($(CXX), g++)
 | 
|---|
| 48 |   CC := gcc
 | 
|---|
| 49 | endif
 | 
|---|
| 50 | 
 | 
|---|
| 51 | ifeq ($(EROSCXX), egcs++)
 | 
|---|
| 52 |   CC := egcs
 | 
|---|
| 53 | endif
 | 
|---|
| 54 | 
 | 
|---|
| 55 | #### Fortran (tout ce qui est lie au Fortran est defini ici #############
 | 
|---|
| 56 | FC = f77
 | 
|---|
| 57 | ifeq (${MACHEROS},Linux)
 | 
|---|
| 58 | #  override FC := f77
 | 
|---|
| 59 |   override FC := g77
 | 
|---|
| 60 | endif
 | 
|---|
| 61 | 
 | 
|---|
| 62 | ifeq (${MACHEROS},OSF1)
 | 
|---|
| 63 |   LIBFORT = -lfor -lFutil -lots -lUfor
 | 
|---|
| 64 | endif
 | 
|---|
| 65 | ifeq (${MACHEROS},Linux)
 | 
|---|
| 66 |   #LIBFORT = -lf2c
 | 
|---|
| 67 |   LIBFORT = -lg2c
 | 
|---|
| 68 | endif
 | 
|---|
| 69 | #########################################################################
 | 
|---|
| 70 | 
 | 
|---|
| 71 | 
 | 
|---|
| 72 | MACHDIR := $(MACHEROS)-$(CXX)
 | 
|---|
| 73 | 
 | 
|---|
| 74 | 
 | 
|---|
| 75 | #-
 | 
|---|
| 76 | #-   Define Makefile paths
 | 
|---|
| 77 | #-  (NE PAS TOUCHER CES LIGNES: generation automatique de MakefileUser.h)
 | 
|---|
| 78 | #-  
 | 
|---|
| 79 | PP  := ${DPCDEVREP}/${MACHDIR}/
 | 
|---|
| 80 | LIB := ${PP}/Libs/
 | 
|---|
| 81 | SLB := ${PP}/ShLibs/
 | 
|---|
| 82 | OBJ := ${PP}/Objs/
 | 
|---|
| 83 | EXE := ${PP}/Exec/
 | 
|---|
| 84 | INC := ${DPCDEVREP}/Include/
 | 
|---|
| 85 | GLB := /usr/local/lib/
 | 
|---|
| 86 | #--
 | 
|---|
| 87 | 
 | 
|---|
| 88 | #-   Flag for optimisation/ debug
 | 
|---|
| 89 | # Pour forcer sans debug, DBGFLAG = -g0
 | 
|---|
| 90 | ifndef OPTFLAG
 | 
|---|
| 91 |   OPTFLAG  := -O
 | 
|---|
| 92 | endif
 | 
|---|
| 93 | 
 | 
|---|
| 94 | ifndef DBGFLAG
 | 
|---|
| 95 |   DBGFLAG  := -g
 | 
|---|
| 96 | #  Probleme sur DEC/OSF1 -g avec g++/egcs pose probleme a l'assembleur
 | 
|---|
| 97 | #                    Reza 09/99 - On met -gcoff
 | 
|---|
| 98 |   ifeq (${MACHEROS},OSF1)
 | 
|---|
| 99 |     ifeq ($(CXX), g++)
 | 
|---|
| 100 |       override DBGFLAG := -gcoff
 | 
|---|
| 101 |     endif
 | 
|---|
| 102 |   endif
 | 
|---|
| 103 | endif
 | 
|---|
| 104 | 
 | 
|---|
| 105 | # DBGFLAG a -g0 veut dire pas de debug. Tout le monde a ca par defaut...
 | 
|---|
| 106 | ifeq ($(DBGFLAG), -g0)
 | 
|---|
| 107 |   override DBGFLAG :=
 | 
|---|
| 108 | endif
 | 
|---|
| 109 | 
 | 
|---|
| 110 | # xlC ne connait pas -O0, par defaut il n'optimise pas.
 | 
|---|
| 111 | ifeq ($(OPTFLAG), -O0)
 | 
|---|
| 112 |   ifeq ($(CC), xlC)
 | 
|---|
| 113 |     override OPTFLAG :=
 | 
|---|
| 114 |   endif
 | 
|---|
| 115 | endif
 | 
|---|
| 116 | 
 | 
|---|
| 117 | AR       := ar
 | 
|---|
| 118 | ARFLAGS  := -rcs
 | 
|---|
| 119 | ARARGS   := ?
 | 
|---|
| 120 | 
 | 
|---|
| 121 | # le gnu ar ne fonctionne pas bien sur OSF...
 | 
|---|
| 122 | ifeq (${MACHEROS},OSF1)
 | 
|---|
| 123 | AR       := /usr/bin/ar
 | 
|---|
| 124 | endif
 | 
|---|
| 125 | # et sur AIX il nous sort des tas de warnings inutiles
 | 
|---|
| 126 | ifeq ($(MACHEROS),AIX)
 | 
|---|
| 127 | AR := /usr/bin/ar
 | 
|---|
| 128 | endif
 | 
|---|
| 129 | 
 | 
|---|
| 130 | ifeq ($(MACHEROS),Darwin)
 | 
|---|
| 131 | AR := libtool
 | 
|---|
| 132 | ARFLAGS := -static -o
 | 
|---|
| 133 | ARARGS := ^
 | 
|---|
| 134 | EROSCXX := g++
 | 
|---|
| 135 | CXX := g++
 | 
|---|
| 136 | CC := cc
 | 
|---|
| 137 | endif
 | 
|---|
| 138 | 
 | 
|---|
| 139 | #   Avec certains compilateurs C++ (KCC, aCC) , il faut fabriquer les librairies et 
 | 
|---|
| 140 | # les shared libs avec la meme commande 
 | 
|---|
| 141 | override ARCXX := $(AR) 
 | 
|---|
| 142 | override ARCXXFLAGS := $(ARFLAGS) 
 | 
|---|
| 143 | #RZ0999 ifeq ($(CXX),KCC)
 | 
|---|
| 144 | #RZ0999 override  ARCXX  := KCC
 | 
|---|
| 145 | #RZ0999 override ARCXXFLAGS  := -o
 | 
|---|
| 146 | #RZ0999 endif
 | 
|---|
| 147 | ifeq ($(CXX),aCC)
 | 
|---|
| 148 | override ARCXX  := aCC 
 | 
|---|
| 149 | override ARCXXFLAGS  := -o
 | 
|---|
| 150 | endif
 | 
|---|
| 151 | 
 | 
|---|
| 152 | # Les chemins speciaux pour includes systemes et bibliotheques
 | 
|---|
| 153 | ifeq (${MACHEROS},HP-UX)
 | 
|---|
| 154 |   XLDLIBS := -L.
 | 
|---|
| 155 |   XCFLAGS := -I.
 | 
|---|
| 156 | endif
 | 
|---|
| 157 | 
 | 
|---|
| 158 | 
 | 
|---|
| 159 | #  Pour compiler PI, sous Linux, les includes et libs se trouve souvent ds /usr/X11/include /usr/X11/lib/
 | 
|---|
| 160 | ifeq (${MACHEROS},Linux)
 | 
|---|
| 161 |   XLDLIBS := -L/usr/X11/lib -L/usr/X11R6/lib
 | 
|---|
| 162 |   XCFLAGS := -I/usr/X11/include -I/usr/X11R6/include
 | 
|---|
| 163 |   LDLIBS := -ldl
 | 
|---|
| 164 | endif
 | 
|---|
| 165 | 
 | 
|---|
| 166 | ifeq (${MACHEROS},Darwin)
 | 
|---|
| 167 |   XLDLIBS := -L/usr/X11R6/lib
 | 
|---|
| 168 |   XCFLAGS := -I/usr/X11R6/include -fno-coalesce -fkeep-inline-functions
 | 
|---|
| 169 | endif
 | 
|---|
| 170 | 
 | 
|---|
| 171 | # Chemin pour les include et fichiers d'autres librairies
 | 
|---|
| 172 | EXTINCPI := 
 | 
|---|
| 173 | EXTLIBPL := 
 | 
|---|
| 174 | EXTSLBPL := 
 | 
|---|
| 175 | EXTINCPATH := 
 | 
|---|
| 176 | EXTLIBPATH := 
 | 
|---|
| 177 | EXTSLBPATH := 
 | 
|---|
| 178 | 
 | 
|---|
| 179 | ifdef EXTLIBDIR
 | 
|---|
| 180 |  EXTINCPI := -I$(EXTLIBDIR)/Include/
 | 
|---|
| 181 |  EXTLIBPL := -L$(EXTLIBDIR)/$(MACHDIR)/Libs/
 | 
|---|
| 182 |  EXTSLBPL := -L$(EXTLIBDIR)/$(MACHDIR)/ShLibs/
 | 
|---|
| 183 |  EXTINCPATH := $(EXTLIBDIR)/Include/
 | 
|---|
| 184 |  EXTLIBPATH := $(EXTLIBDIR)/$(MACHDIR)/Libs/
 | 
|---|
| 185 |  EXTSLBPATH := $(EXTLIBDIR)/$(MACHDIR)/ShLibs/
 | 
|---|
| 186 | endif
 | 
|---|
| 187 | 
 | 
|---|
| 188 | #  S'il y a des flags particulier pour un module de compilation
 | 
|---|
| 189 | #ifndef MODULECPPFLAGS
 | 
|---|
| 190 |   override MODULECPPFLAGS :=
 | 
|---|
| 191 | #endif
 | 
|---|
| 192 | 
 | 
|---|
| 193 | CPPFLAGS     :=  -I${INC} $(EXTINCPI) -D${MACHEROSD} $(MODULECPPFLAGS)
 | 
|---|
| 194 | 
 | 
|---|
| 195 | #  Si la variable d'environnement SOPHYA_DEBUG est definie : Activation des 
 | 
|---|
| 196 | #  compilations conditionnelles pour le debug/bound-checking/... ds le code
 | 
|---|
| 197 | ifdef SOPHYA_DEBUG 
 | 
|---|
| 198 |   CPPFLAGS   := $(CPPFLAGS) -DSOPHYA_DEBUG
 | 
|---|
| 199 | endif
 | 
|---|
| 200 | 
 | 
|---|
| 201 | # Les options selon les divers compilateurs
 | 
|---|
| 202 | # GNU
 | 
|---|
| 203 | ifeq ($(CC), gcc)
 | 
|---|
| 204 |   CFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 205 |                   -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 206 |                   $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 207 |   LDLIBS       := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 208 | endif
 | 
|---|
| 209 | ifeq ($(CC), egcs)
 | 
|---|
| 210 |   CFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 211 |                   -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 212 |                   $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 213 |   LDLIBS       := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 214 | endif
 | 
|---|
| 215 | 
 | 
|---|
| 216 | ifeq ($(CXX), g++)
 | 
|---|
| 217 |   CXXFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 218 |                     -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 219 |                     $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 220 |   LDLIBS      := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 221 | #  ifdef NOSHLIB 
 | 
|---|
| 222 | #    LDFLAGS := -static
 | 
|---|
| 223 | #  endif
 | 
|---|
| 224 | endif
 | 
|---|
| 225 | ifeq ($(CXX), egcs++)
 | 
|---|
| 226 |   CXXFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 227 |                     -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 228 |                     $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 229 |   LDLIBS      := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 230 |   ifdef NOSHLIB 
 | 
|---|
| 231 |     LDFLAGS := -static
 | 
|---|
| 232 |   endif
 | 
|---|
| 233 | endif
 | 
|---|
| 234 | 
 | 
|---|
| 235 | # Compilateur C natif HP-UX
 | 
|---|
| 236 | ifeq (${MACHEROS},HP-UX)
 | 
|---|
| 237 | ifeq ($(CC),cc)                                    
 | 
|---|
| 238 |   CFLAGS       :=  +Z -Aa -Ae $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 239 |   FFLAGS       :=  -Aa -I${INC}   -D${MACHEROSD}  
 | 
|---|
| 240 |   CPPFLAGS     :=  -I${INC}  -I$(INC)/tnt -D${MACHEROSD} \
 | 
|---|
| 241 |                -D_HPUX_SOURCE $(MODULECPPFLAGS)
 | 
|---|
| 242 |   LDLIBS      := $(XLDLIBS)
 | 
|---|
| 243 |   override NOSHLIB := Y
 | 
|---|
| 244 | 
 | 
|---|
| 245 | endif
 | 
|---|
| 246 | ifeq ($(CXX),aCC)
 | 
|---|
| 247 |   CXXFLAGS := $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) +Z -D__aCC__
 | 
|---|
| 248 | #  -DCOMPILER_EXCEPTIONS -D__ANSI_TEMPLATES__  definis ds defs.h
 | 
|---|
| 249 | endif
 | 
|---|
| 250 | endif
 | 
|---|
| 251 | 
 | 
|---|
| 252 | # AIX, xlC comme compilateur C et C++
 | 
|---|
| 253 | ifeq ($(CXX), xlC)
 | 
|---|
| 254 |   CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) $(XCFLAGS)
 | 
|---|
| 255 |   CPPFLAGS := -I$(INC)/Syst -I${INC}  -I$(INC)/tnt -D${MACHEROSD} $(MODULECPPFLAGS)
 | 
|---|
| 256 |   CXXFLAGS     := $(CFLAGS) -D__xlC 
 | 
|---|
| 257 | # -DCOMPILER_EXCEPTIONS defini ds defs.h
 | 
|---|
| 258 |   LDLIBS      := $(XLDLIBS)
 | 
|---|
| 259 | 
 | 
|---|
| 260 | # Pour faire des bibliotheques partagees, il faut faire un truc du
 | 
|---|
| 261 | # style 
 | 
|---|
| 262 | #ld -o shrsub.o subs1.o subs2.o -bE:shrsub.exp -bM:SRE -lc
 | 
|---|
| 263 | 
 | 
|---|
| 264 | # Pour le moment on ne se fatigue pas, tant pis
 | 
|---|
| 265 |   override NOSHLIB := Y
 | 
|---|
| 266 | 
 | 
|---|
| 267 | # Et puis 1540-293: (W) est un FAUX warning, on supprime les warnings
 | 
|---|
| 268 |   CXXFLAGS := -qflag=e $(CXXFLAGS)
 | 
|---|
| 269 | endif
 | 
|---|
| 270 | 
 | 
|---|
| 271 | 
 | 
|---|
| 272 | ifeq ($(CXX), cxx)
 | 
|---|
| 273 |   ifeq ($(DBGFLAG), -g)
 | 
|---|
| 274 |     ifdef OPTFLAG
 | 
|---|
| 275 |       override DBGFLAG := -g1
 | 
|---|
| 276 |     endif
 | 
|---|
| 277 | #    ifdef XOPT
 | 
|---|
| 278 | #      override DBGFLAG := -g1
 | 
|---|
| 279 | #    endif
 | 
|---|
| 280 |   endif
 | 
|---|
| 281 | 
 | 
|---|
| 282 | # chemin pour repository CXX
 | 
|---|
| 283 |  REP := $(OBJ)/cxxrep/
 | 
|---|
| 284 |  REPPI := $(OBJ)/cxxrep_PI/
 | 
|---|
| 285 |  REPCXX := -ptr $(OBJ)/cxxrep/
 | 
|---|
| 286 |  ifdef MODULECXXREPNAME
 | 
|---|
| 287 |    REPCXX := -ptr $(OBJ)/cxxrep_$(MODULECXXREPNAME)/  -ptr $(OBJ)/cxxrep/
 | 
|---|
| 288 |    REPM := $(OBJ)/cxxrep_$(MODULECXXREPNAME)/
 | 
|---|
| 289 |  endif
 | 
|---|
| 290 | 
 | 
|---|
| 291 |   LDLIBS      := $(XLDLIBS) -lrt
 | 
|---|
| 292 | 
 | 
|---|
| 293 |   CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)   \
 | 
|---|
| 294 |               $(REPCXX) -no_implicit_include 
 | 
|---|
| 295 | # $(REPCXX) -no_implicit_include -D__USE_STD_IOSTREAM  passe pas avec cxx 6.0 Reza 23/12/99
 | 
|---|
| 296 |   CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 297 | #  CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)  \
 | 
|---|
| 298 | #             -nopt -define_templates
 | 
|---|
| 299 |   ifeq ($(XOPT), 1)
 | 
|---|
| 300 |     override DBGFLAG :=
 | 
|---|
| 301 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS)  \
 | 
|---|
| 302 |                 $(REPCXX) -fp_reorder \
 | 
|---|
| 303 |                 -O5 -inline speed -tune host
 | 
|---|
| 304 |   endif
 | 
|---|
| 305 |   ifeq ($(XOPT), 2)
 | 
|---|
| 306 |     override DBGFLAG :=
 | 
|---|
| 307 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS)  \
 | 
|---|
| 308 |               $(REPCXX) -fp_reorder \
 | 
|---|
| 309 |               -O5 -inline speed -tune host \
 | 
|---|
| 310 |               -assume trusted_short_alignment
 | 
|---|
| 311 |   endif
 | 
|---|
| 312 |   ifeq ($(XOPT), 3)
 | 
|---|
| 313 |     override DBGFLAG :=
 | 
|---|
| 314 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS)  \
 | 
|---|
| 315 |               $(REPCXX) -fp_reorder \
 | 
|---|
| 316 |               -O5 -inline speed -tune host \
 | 
|---|
| 317 |               -assume trusted_short_alignment \
 | 
|---|
| 318 |               -non_shared -om
 | 
|---|
| 319 |     override NOSHLIB := Y
 | 
|---|
| 320 |   endif
 | 
|---|
| 321 | 
 | 
|---|
| 322 | # le fichier X11/Xlib.h contient des declarations de fonctions sans type
 | 
|---|
| 323 | # Cela genere un grand nombre de warning avec cxx V6
 | 
|---|
| 324 | # La variable MODULEDECCXXFLAGS permet de specifier des options de compilation 
 | 
|---|
| 325 | # pour un module donne  
 | 
|---|
| 326 |   ifdef MODULEDECCXXFLAGS
 | 
|---|
| 327 |     CXXFLAGS := $(CXXFLAGS) $(MODULEDECCXXFLAGS)
 | 
|---|
| 328 |   endif
 | 
|---|
| 329 | endif
 | 
|---|
| 330 | ifeq ($(CC),cc)
 | 
|---|
| 331 |   ifeq ($(MACHEROS),OSF1)
 | 
|---|
| 332 |   ifeq ($(XOPT), 1)
 | 
|---|
| 333 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 334 |               -O4 -inline speed -tune host
 | 
|---|
| 335 |   endif
 | 
|---|
| 336 |   ifeq ($(XOPT), 2)
 | 
|---|
| 337 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 338 |               -O4 -inline speed -tune host \
 | 
|---|
| 339 |               -assume trusted_short_alignment -fast
 | 
|---|
| 340 |   endif
 | 
|---|
| 341 |   ifeq ($(XOPT), 3)
 | 
|---|
| 342 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 343 |               -O4 -inline speed -tune host \
 | 
|---|
| 344 |               -assume trusted_short_alignment -fast \
 | 
|---|
| 345 |               -non_shared -om
 | 
|---|
| 346 |   endif
 | 
|---|
| 347 |   endif
 | 
|---|
| 348 | endif
 | 
|---|
| 349 | 
 | 
|---|
| 350 | # --- Compilateur KAI  (OK pour v 3.3)
 | 
|---|
| 351 | ifeq ($(CXX), KCC)
 | 
|---|
| 352 |   CXXFLAGS     :=  --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__
 | 
|---|
| 353 |   CXXFLAGS  := $(CXXFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 354 |   CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 355 | # Flag --one_instantiation_per_object mis - Reza 02/03/99
 | 
|---|
| 356 | endif
 | 
|---|
| 357 | 
 | 
|---|
| 358 | # --- Systeme IRIX64 de Silixon Graphics (SGI) 
 | 
|---|
| 359 | ifeq ($(MACHEROS), IRIX64)
 | 
|---|
| 360 | # --- Compilateur natif CC de SGI 
 | 
|---|
| 361 |   ifeq ($(CXX), CC)
 | 
|---|
| 362 |     CFLAGS  := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 363 |     CXXFLAGS := -prelink -D__SGICC__ $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 364 |     LINK.cc := CC $(CPPFLAGS) -D__SGICC__ $(DBGFLAG) $(OPTFLAG)
 | 
|---|
| 365 | #  sur SGI, les libs/executables ont deux formats 32 et 64 bits (trois avec o32)
 | 
|---|
| 366 | #  -n32 Generates a (new) 32-bit object default to -mips3 if -mips4 has not been specified
 | 
|---|
| 367 | #  -64 Generates a 64-bit object - defaults to -mips4 if -mips3 has not been specified
 | 
|---|
| 368 | #  La variable d'environnement SOPHYA_SGI64 controle cette option
 | 
|---|
| 369 |     ifdef SOPHYA_SGI64
 | 
|---|
| 370 |       CFLAGS  := -64 -DSGI_ARCH64 $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 371 |       CXXFLAGS := -64 -prelink -DSGI_ARCH64 -D__SGICC__ $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 372 |       LINK.cc := CC -64 $(CPPFLAGS) -D__SGICC__ $(DBGFLAG) $(OPTFLAG)
 | 
|---|
| 373 |     endif
 | 
|---|
| 374 |   endif
 | 
|---|
| 375 |   ifeq ($(CXX), g++)
 | 
|---|
| 376 |     ifdef SOPHYA_SGI64
 | 
|---|
| 377 |       CFLAGS  := $(CFLAGS) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
 | 
|---|
| 378 |       CXXFLAGS := $(CXXFLAGS) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
 | 
|---|
| 379 |       LINK.cc := $(LINK.cc) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
 | 
|---|
| 380 |     endif
 | 
|---|
| 381 |   endif
 | 
|---|
| 382 | endif
 | 
|---|
| 383 | 
 | 
|---|
| 384 | # Autres compilateurs natifs.
 | 
|---|
| 385 | 
 | 
|---|
| 386 | #  CFLAGS       :=  -I$(INC) $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 387 | #  CXXFLAGS     := $(CFLAGS)
 | 
|---|
| 388 | #  LDLIBS      := $(XLDLIBS)
 | 
|---|
| 389 | 
 | 
|---|
| 390 | #- redefine implicit rule. Les .o sont dans $(OBJ).
 | 
|---|
| 391 | $(OBJ)%.o:%.c
 | 
|---|
| 392 |         $(COMPILE.c) -o $@ $<
 | 
|---|
| 393 | 
 | 
|---|
| 394 | $(OBJ)%.o:%.cc
 | 
|---|
| 395 |         $(COMPILE.cc) -o $@ $<
 | 
|---|
| 396 | 
 | 
|---|
| 397 | $(OBJ)%.o:%.f
 | 
|---|
| 398 |         $(COMPILE.f) -o $@ $< 
 | 
|---|
| 399 | 
 | 
|---|
| 400 | #OSF1
 | 
|---|
| 401 | #LDFC est f77
 | 
|---|
| 402 | #LDFCFLAGS est rien
 | 
|---|
| 403 | 
 | 
|---|
| 404 | #parfois
 | 
|---|
| 405 | #LDFC est cc
 | 
|---|
| 406 | #LDFCFLAGS est -ltruc
 | 
|---|
| 407 | 
 | 
|---|
| 408 | #------------------------------------------------- End of Makefile.h ------- 
 | 
|---|