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