| 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 SOPHYADEVREP 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 SOPHYACXX
|
|---|
| 25 | CXX := $(SOPHYACXX)
|
|---|
| 26 | endif
|
|---|
| 27 |
|
|---|
| 28 | ifeq ($(CXX),gcc)
|
|---|
| 29 | override CXX := g++
|
|---|
| 30 | endif
|
|---|
| 31 |
|
|---|
| 32 | ifeq ($(SOPHYACXX),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 ($(SOPHYACXX), 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 := ${SOPHYADEVREP}/${MACHDIR}/
|
|---|
| 80 | LIB := ${PP}/Libs/
|
|---|
| 81 | SLB := ${PP}/ShLibs/
|
|---|
| 82 | OBJ := ${PP}/Objs/
|
|---|
| 83 | EXE := ${PP}/Exec/
|
|---|
| 84 | INC := ${SOPHYADEVREP}/Include/
|
|---|
| 85 | GLB := /usr/local/lib/
|
|---|
| 86 | #--
|
|---|
| 87 |
|
|---|
| 88 | # Si Makefile.h utilise pour la construction d'autres librairies
|
|---|
| 89 | ifdef MYBUILDDEVREP
|
|---|
| 90 | MYPP := ${MYBUILDDEVREP}/${MACHDIR}/
|
|---|
| 91 | MYLIB := ${MYPP}/Libs/
|
|---|
| 92 | MYSLB := ${MYPP}/ShLibs/
|
|---|
| 93 | OBJ := ${MYPP}/Objs/
|
|---|
| 94 | EXE := ${MYPP}/Exec/
|
|---|
| 95 | endif
|
|---|
| 96 |
|
|---|
| 97 | #- Flag for optimisation/ debug
|
|---|
| 98 | # Pour forcer sans debug, DBGFLAG = -g0
|
|---|
| 99 | ifndef OPTFLAG
|
|---|
| 100 | OPTFLAG := -O
|
|---|
| 101 | ifeq (${MACHEROS},OSF1)
|
|---|
| 102 | ifeq ($(CXX), cxx)
|
|---|
| 103 | override OPTFLAG := -O -pthread
|
|---|
| 104 | endif
|
|---|
| 105 | endif
|
|---|
| 106 | endif
|
|---|
| 107 |
|
|---|
| 108 | ifndef DBGFLAG
|
|---|
| 109 | DBGFLAG := -g
|
|---|
| 110 | # Probleme sur DEC/OSF1 -g avec g++/egcs pose probleme a l'assembleur
|
|---|
| 111 | # Reza 09/99 - On met -gcoff
|
|---|
| 112 | ifeq (${MACHEROS},OSF1)
|
|---|
| 113 | ifeq ($(CXX), g++)
|
|---|
| 114 | override DBGFLAG := -gcoff
|
|---|
| 115 | endif
|
|---|
| 116 | endif
|
|---|
| 117 | endif
|
|---|
| 118 |
|
|---|
| 119 | # DBGFLAG a -g0 veut dire pas de debug. Tout le monde a ca par defaut...
|
|---|
| 120 | ifeq ($(DBGFLAG), -g0)
|
|---|
| 121 | override DBGFLAG :=
|
|---|
| 122 | endif
|
|---|
| 123 |
|
|---|
| 124 | # xlC ne connait pas -O0, par defaut il n'optimise pas.
|
|---|
| 125 | ifeq ($(OPTFLAG), -O0)
|
|---|
| 126 | ifeq ($(CC), xlC)
|
|---|
| 127 | override OPTFLAG :=
|
|---|
| 128 | endif
|
|---|
| 129 | endif
|
|---|
| 130 |
|
|---|
| 131 | AR := ar
|
|---|
| 132 | ARFLAGS := -rcs
|
|---|
| 133 | ARARGS := ?
|
|---|
| 134 |
|
|---|
| 135 | # le gnu ar ne fonctionne pas bien sur OSF...
|
|---|
| 136 | ifeq (${MACHEROS},OSF1)
|
|---|
| 137 | AR := /usr/bin/ar
|
|---|
| 138 | endif
|
|---|
| 139 | # et sur AIX il nous sort des tas de warnings inutiles
|
|---|
| 140 | ifeq ($(MACHEROS),AIX)
|
|---|
| 141 | AR := /usr/bin/ar
|
|---|
| 142 | endif
|
|---|
| 143 |
|
|---|
| 144 | ifeq ($(MACHEROS),Darwin)
|
|---|
| 145 | AR := libtool
|
|---|
| 146 | ARFLAGS := -static -o
|
|---|
| 147 | ARARGS := ^
|
|---|
| 148 | SOPHYACXX := c++
|
|---|
| 149 | CXX := c++
|
|---|
| 150 | CC := cc
|
|---|
| 151 | # Pour enlever les erreurs au link des slb en -O. Pas d'avenir!
|
|---|
| 152 | # Reza:Mai 2005 : On tente les flags -fast -mcpu=7450 ET -fPIC
|
|---|
| 153 | # OPTFLAG := -g -fast -mcpu=7450 -fPIC
|
|---|
| 154 | # Apple dit qu'il faut mettre -fastf pour le c++ : Ca marche avec GCC 3.3 !
|
|---|
| 155 | # OPTFLAG := -g
|
|---|
| 156 | OPTFLAG := -g -fastf -mtune=G4 -fPIC
|
|---|
| 157 | endif
|
|---|
| 158 |
|
|---|
| 159 | # Avec certains compilateurs C++ (KCC, aCC) , il faut fabriquer les librairies et
|
|---|
| 160 | # les shared libs avec la meme commande
|
|---|
| 161 | override ARCXX := $(AR)
|
|---|
| 162 | override ARCXXFLAGS := $(ARFLAGS)
|
|---|
| 163 | #RZ0999 ifeq ($(CXX),KCC)
|
|---|
| 164 | #RZ0999 override ARCXX := KCC
|
|---|
| 165 | #RZ0999 override ARCXXFLAGS := -o
|
|---|
| 166 | #RZ0999 endif
|
|---|
| 167 | ifeq ($(CXX),aCC)
|
|---|
| 168 | override ARCXX := aCC
|
|---|
| 169 | override ARCXXFLAGS := -o
|
|---|
| 170 | endif
|
|---|
| 171 |
|
|---|
| 172 | # Les chemins speciaux pour includes systemes et bibliotheques
|
|---|
| 173 | ifeq (${MACHEROS},HP-UX)
|
|---|
| 174 | XLDLIBS := -L.
|
|---|
| 175 | XCFLAGS :=
|
|---|
| 176 | XCPPFLAGS :=
|
|---|
| 177 | endif
|
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 | # Pour compiler PI, sous Linux, les includes et libs se trouve souvent ds /usr/X11/include /usr/X11/lib/
|
|---|
| 181 | ifeq (${MACHEROS},Linux)
|
|---|
| 182 | XLDLIBS := -L/usr/X11/lib -L/usr/X11R6/lib
|
|---|
| 183 | XCPPFLAGS := -I/usr/X11/include -I/usr/X11R6/include
|
|---|
| 184 | LDLIBS := -ldl
|
|---|
| 185 | endif
|
|---|
| 186 |
|
|---|
| 187 | ifeq (${MACHEROS},Darwin)
|
|---|
| 188 | XLDLIBS := -L/usr/X11R6/lib
|
|---|
| 189 | XCPPFLAGS := -I/usr/X11R6/include -I/sw/include
|
|---|
| 190 | # XCPPFLAGS := -I/usr/X11R6/include
|
|---|
| 191 | # XCFLAGS := -fkeep-inline-functions -fno-common -fcoalesce
|
|---|
| 192 | XCFLAGS := -fno-common
|
|---|
| 193 | endif
|
|---|
| 194 |
|
|---|
| 195 | # Chemin pour les include et fichiers d'autres librairies
|
|---|
| 196 | EXTINCPI :=
|
|---|
| 197 | EXTLIBPL :=
|
|---|
| 198 | EXTSLBPL :=
|
|---|
| 199 | EXTINCPATH :=
|
|---|
| 200 | EXTLIBPATH :=
|
|---|
| 201 | EXTSLBPATH :=
|
|---|
| 202 |
|
|---|
| 203 | ifdef EXTLIBDIR
|
|---|
| 204 | EXTINCPI := -I$(EXTLIBDIR)/Include/
|
|---|
| 205 | EXTLIBPL := -L$(EXTLIBDIR)/$(MACHDIR)/Libs/
|
|---|
| 206 | EXTSLBPL := -L$(EXTLIBDIR)/$(MACHDIR)/ShLibs/
|
|---|
| 207 | EXTINCPATH := $(EXTLIBDIR)/Include/
|
|---|
| 208 | EXTLIBPATH := $(EXTLIBDIR)/$(MACHDIR)/Libs/
|
|---|
| 209 | EXTSLBPATH := $(EXTLIBDIR)/$(MACHDIR)/ShLibs/
|
|---|
| 210 | endif
|
|---|
| 211 |
|
|---|
| 212 | # S'il y a des flags particulier pour un module de compilation
|
|---|
| 213 | #ifndef MODULECPPFLAGS
|
|---|
| 214 | override MODULECPPFLAGS :=
|
|---|
| 215 | #endif
|
|---|
| 216 |
|
|---|
| 217 | CPPFLAGS := -I${INC} $(EXTINCPI) $(XCPPFLAGS) -D${MACHEROSD} $(MODULECPPFLAGS)
|
|---|
| 218 |
|
|---|
| 219 | # Si la variable d'environnement SOPHYA_DEBUG est definie : Activation des
|
|---|
| 220 | # compilations conditionnelles pour le debug/bound-checking/... ds le code
|
|---|
| 221 | ifdef SOPHYA_DEBUG
|
|---|
| 222 | CPPFLAGS := $(CPPFLAGS) -DSOPHYA_DEBUG
|
|---|
| 223 | endif
|
|---|
| 224 |
|
|---|
| 225 | # Les options selon les divers compilateurs
|
|---|
| 226 | # GNU
|
|---|
| 227 | ifeq ($(CC), gcc)
|
|---|
| 228 | CFLAGS := -Wall -Wpointer-arith \
|
|---|
| 229 | -Wmissing-prototypes -I$(INC) $(XCFLAGS) \
|
|---|
| 230 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 231 | LDLIBS := $(LDLIBS) $(XLDLIBS)
|
|---|
| 232 | endif
|
|---|
| 233 | ifeq ($(CC), egcs)
|
|---|
| 234 | CFLAGS := -Wall -Wpointer-arith \
|
|---|
| 235 | -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
|
|---|
| 236 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 237 | LDLIBS := $(LDLIBS) $(XLDLIBS)
|
|---|
| 238 | endif
|
|---|
| 239 |
|
|---|
| 240 | ifeq ($(CXX), g++)
|
|---|
| 241 | CXXFLAGS := -Wall -Wpointer-arith \
|
|---|
| 242 | -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
|
|---|
| 243 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 244 | LDLIBS := $(LDLIBS) $(XLDLIBS)
|
|---|
| 245 | # ifdef NOSHLIB
|
|---|
| 246 | # LDFLAGS := -static
|
|---|
| 247 | # endif
|
|---|
| 248 | endif
|
|---|
| 249 | ifeq ($(CXX), egcs++)
|
|---|
| 250 | CXXFLAGS := -Wall -Wpointer-arith \
|
|---|
| 251 | -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
|
|---|
| 252 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 253 | LDLIBS := $(LDLIBS) $(XLDLIBS)
|
|---|
| 254 | ifdef NOSHLIB
|
|---|
| 255 | LDFLAGS := -static
|
|---|
| 256 | endif
|
|---|
| 257 | endif
|
|---|
| 258 |
|
|---|
| 259 | # Compilateur natif (GNU-gcc) sous MacOSX (Darwin)
|
|---|
| 260 | ifeq (${MACHEROS},Darwin)
|
|---|
| 261 | CFLAGS := -Wall -Wpointer-arith \
|
|---|
| 262 | -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
|
|---|
| 263 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 264 | CXXFLAGS := -Wall -Wpointer-arith \
|
|---|
| 265 | -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
|
|---|
| 266 | $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 267 | LDLIBS := -Xlinker -bind_at_load $(LDLIBS) $(XLDLIBS)
|
|---|
| 268 | endif
|
|---|
| 269 |
|
|---|
| 270 | # Compilateur C natif HP-UX
|
|---|
| 271 | ifeq (${MACHEROS},HP-UX)
|
|---|
| 272 | ifeq ($(CC),cc)
|
|---|
| 273 | CFLAGS := +Z -Aa -Ae $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 274 | FFLAGS := -Aa -I${INC} -D${MACHEROSD}
|
|---|
| 275 | CPPFLAGS := -I${INC} -I$(INC)/tnt -D${MACHEROSD} \
|
|---|
| 276 | -D_HPUX_SOURCE $(MODULECPPFLAGS)
|
|---|
| 277 | LDLIBS := $(XLDLIBS)
|
|---|
| 278 | override NOSHLIB := Y
|
|---|
| 279 |
|
|---|
| 280 | endif
|
|---|
| 281 | ifeq ($(CXX),aCC)
|
|---|
| 282 | CXXFLAGS := $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) +Z -D__aCC__
|
|---|
| 283 | # -DCOMPILER_EXCEPTIONS -D__ANSI_TEMPLATES__ definis ds defs.h
|
|---|
| 284 | endif
|
|---|
| 285 | endif
|
|---|
| 286 |
|
|---|
| 287 | # AIX, xlC comme compilateur C et C++
|
|---|
| 288 | ifeq ($(CXX), xlC)
|
|---|
| 289 | CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) $(XCFLAGS)
|
|---|
| 290 | CPPFLAGS := -I$(INC)/Syst -I${INC} -I$(INC)/tnt -D${MACHEROSD} $(MODULECPPFLAGS)
|
|---|
| 291 | CXXFLAGS := $(CFLAGS) -D__xlC
|
|---|
| 292 | # -DCOMPILER_EXCEPTIONS defini ds defs.h
|
|---|
| 293 | LDLIBS := $(XLDLIBS)
|
|---|
| 294 |
|
|---|
| 295 | # Pour faire des bibliotheques partagees, il faut faire un truc du
|
|---|
| 296 | # style
|
|---|
| 297 | #ld -o shrsub.o subs1.o subs2.o -bE:shrsub.exp -bM:SRE -lc
|
|---|
| 298 |
|
|---|
| 299 | # Pour le moment on ne se fatigue pas, tant pis
|
|---|
| 300 | override NOSHLIB := Y
|
|---|
| 301 |
|
|---|
| 302 | # Et puis 1540-293: (W) est un FAUX warning, on supprime les warnings
|
|---|
| 303 | CXXFLAGS := -qflag=e $(CXXFLAGS)
|
|---|
| 304 | endif
|
|---|
| 305 |
|
|---|
| 306 |
|
|---|
| 307 | ifeq ($(CXX), cxx)
|
|---|
| 308 | ifeq ($(DBGFLAG), -g)
|
|---|
| 309 | ifdef OPTFLAG
|
|---|
| 310 | override DBGFLAG := -g1
|
|---|
| 311 | endif
|
|---|
| 312 | # ifdef XOPT
|
|---|
| 313 | # override DBGFLAG := -g1
|
|---|
| 314 | # endif
|
|---|
| 315 | endif
|
|---|
| 316 |
|
|---|
| 317 | # chemin pour repository CXX
|
|---|
| 318 | REP := $(OBJ)/cxxrep/
|
|---|
| 319 | REPPI := $(OBJ)/cxxrep_PI/
|
|---|
| 320 | REPCXX := -ptr $(OBJ)/cxxrep/
|
|---|
| 321 | ifdef MODULECXXREPNAME
|
|---|
| 322 | REPCXX := -ptr $(OBJ)/cxxrep_$(MODULECXXREPNAME)/ -ptr $(OBJ)/cxxrep/
|
|---|
| 323 | REPM := $(OBJ)/cxxrep_$(MODULECXXREPNAME)/
|
|---|
| 324 | endif
|
|---|
| 325 |
|
|---|
| 326 | LDLIBS := $(XLDLIBS) -lrt
|
|---|
| 327 |
|
|---|
| 328 | CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) \
|
|---|
| 329 | $(REPCXX) -no_implicit_include
|
|---|
| 330 | # $(REPCXX) -no_implicit_include -D__USE_STD_IOSTREAM passe pas avec cxx 6.0 Reza 23/12/99
|
|---|
| 331 | CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 332 | # CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) \
|
|---|
| 333 | # -nopt -define_templates
|
|---|
| 334 | ifeq ($(XOPT), 1)
|
|---|
| 335 | override DBGFLAG :=
|
|---|
| 336 | CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) \
|
|---|
| 337 | $(REPCXX) -fp_reorder \
|
|---|
| 338 | -O5 -inline speed -tune host
|
|---|
| 339 | endif
|
|---|
| 340 | ifeq ($(XOPT), 2)
|
|---|
| 341 | override DBGFLAG :=
|
|---|
| 342 | CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) \
|
|---|
| 343 | $(REPCXX) -fp_reorder \
|
|---|
| 344 | -O5 -inline speed -tune host \
|
|---|
| 345 | -assume trusted_short_alignment
|
|---|
| 346 | endif
|
|---|
| 347 | ifeq ($(XOPT), 3)
|
|---|
| 348 | override DBGFLAG :=
|
|---|
| 349 | CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) \
|
|---|
| 350 | $(REPCXX) -fp_reorder \
|
|---|
| 351 | -O5 -inline speed -tune host \
|
|---|
| 352 | -assume trusted_short_alignment \
|
|---|
| 353 | -non_shared -om
|
|---|
| 354 | override NOSHLIB := Y
|
|---|
| 355 | endif
|
|---|
| 356 |
|
|---|
| 357 | # le fichier X11/Xlib.h contient des declarations de fonctions sans type
|
|---|
| 358 | # Cela genere un grand nombre de warning avec cxx V6
|
|---|
| 359 | # La variable MODULEDECCXXFLAGS permet de specifier des options de compilation
|
|---|
| 360 | # pour un module donne
|
|---|
| 361 | ifdef MODULEDECCXXFLAGS
|
|---|
| 362 | CXXFLAGS := $(CXXFLAGS) $(MODULEDECCXXFLAGS)
|
|---|
| 363 | endif
|
|---|
| 364 | endif
|
|---|
| 365 | ifeq ($(CC),cc)
|
|---|
| 366 | ifeq ($(MACHEROS),OSF1)
|
|---|
| 367 | ifeq ($(XOPT), 1)
|
|---|
| 368 | CFLAGS := $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
|
|---|
| 369 | -O4 -inline speed -tune host
|
|---|
| 370 | endif
|
|---|
| 371 | ifeq ($(XOPT), 2)
|
|---|
| 372 | CFLAGS := $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
|
|---|
| 373 | -O4 -inline speed -tune host \
|
|---|
| 374 | -assume trusted_short_alignment -fast
|
|---|
| 375 | endif
|
|---|
| 376 | ifeq ($(XOPT), 3)
|
|---|
| 377 | CFLAGS := $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
|
|---|
| 378 | -O4 -inline speed -tune host \
|
|---|
| 379 | -assume trusted_short_alignment -fast \
|
|---|
| 380 | -non_shared -om
|
|---|
| 381 | endif
|
|---|
| 382 | endif
|
|---|
| 383 | endif
|
|---|
| 384 |
|
|---|
| 385 | # --- Compilateur KAI (OK pour v 3.3)
|
|---|
| 386 | ifeq ($(CXX), KCC)
|
|---|
| 387 | CXXFLAGS := --exceptions --rtti --auto_instantiation --one_instantiation_per_object -D__KCC__
|
|---|
| 388 | CXXFLAGS := $(CXXFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 389 | CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 390 | # Flag --one_instantiation_per_object mis - Reza 02/03/99
|
|---|
| 391 | endif
|
|---|
| 392 |
|
|---|
| 393 | # --- Systeme IRIX64 de Silixon Graphics (SGI)
|
|---|
| 394 | ifeq ($(MACHEROS), IRIX64)
|
|---|
| 395 | # --- Compilateur natif CC de SGI
|
|---|
| 396 | ifeq ($(CXX), CC)
|
|---|
| 397 | CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 398 | CXXFLAGS := -prelink -D__SGICC__ -LANG:std $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 399 | LINK.cc := CC $(CPPFLAGS) -D__SGICC__ -LANG:std $(DBGFLAG) $(OPTFLAG)
|
|---|
| 400 | # sur SGI, les libs/executables ont deux formats 32 et 64 bits (trois avec o32)
|
|---|
| 401 | # -n32 Generates a (new) 32-bit object default to -mips3 if -mips4 has not been specified
|
|---|
| 402 | # -64 Generates a 64-bit object - defaults to -mips4 if -mips3 has not been specified
|
|---|
| 403 | # La variable d'environnement SOPHYA_SGI64 controle cette option
|
|---|
| 404 | ifdef SOPHYA_SGI64
|
|---|
| 405 | CFLAGS := -64 -DSGI_ARCH64 $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 406 | CXXFLAGS := -64 -prelink -DSGI_ARCH64 -D__SGICC__ -LANG:std $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 407 | LINK.cc := CC -64 $(CPPFLAGS) -D__SGICC__ -LANG:std $(DBGFLAG) $(OPTFLAG)
|
|---|
| 408 | endif
|
|---|
| 409 | endif
|
|---|
| 410 | ifeq ($(CXX), g++)
|
|---|
| 411 | ifdef SOPHYA_SGI64
|
|---|
| 412 | CFLAGS := $(CFLAGS) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
|
|---|
| 413 | CXXFLAGS := $(CXXFLAGS) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
|
|---|
| 414 | LINK.cc := $(LINK.cc) -DSGI_ARCH64 -mips4 -mlong64 -mfp64 -mgp64 -mabi=64
|
|---|
| 415 | endif
|
|---|
| 416 | endif
|
|---|
| 417 | endif
|
|---|
| 418 |
|
|---|
| 419 | # Autres compilateurs natifs.
|
|---|
| 420 |
|
|---|
| 421 | # CFLAGS := -I$(INC) $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
|
|---|
| 422 | # CXXFLAGS := $(CFLAGS)
|
|---|
| 423 | # LDLIBS := $(XLDLIBS)
|
|---|
| 424 |
|
|---|
| 425 | #- redefine implicit rule. Les .o sont dans $(OBJ).
|
|---|
| 426 | $(OBJ)%.o:%.c
|
|---|
| 427 | $(COMPILE.c) -o $@ $<
|
|---|
| 428 |
|
|---|
| 429 | $(OBJ)%.o:%.cc
|
|---|
| 430 | $(COMPILE.cc) -o $@ $<
|
|---|
| 431 |
|
|---|
| 432 | $(OBJ)%.o:%.f
|
|---|
| 433 | $(COMPILE.f) -o $@ $<
|
|---|
| 434 |
|
|---|
| 435 | #OSF1
|
|---|
| 436 | #LDFC est f77
|
|---|
| 437 | #LDFCFLAGS est rien
|
|---|
| 438 |
|
|---|
| 439 | #parfois
|
|---|
| 440 | #LDFC est cc
|
|---|
| 441 | #LDFCFLAGS est -ltruc
|
|---|
| 442 |
|
|---|
| 443 | #------------------------------------------------- End of Makefile.h -------
|
|---|