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