| 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 | endif
 | 
|---|
| 68 | #########################################################################
 | 
|---|
| 69 | 
 | 
|---|
| 70 | 
 | 
|---|
| 71 | MACHDIR := $(MACHEROS)-$(CXX)
 | 
|---|
| 72 | 
 | 
|---|
| 73 | 
 | 
|---|
| 74 | #-
 | 
|---|
| 75 | #-   Define Makefile paths
 | 
|---|
| 76 | #-  (NE PAS TOUCHER CES LIGNES: generation automatique de MakefileUser.h)
 | 
|---|
| 77 | #-  
 | 
|---|
| 78 | PP  := ${DPCDEVREP}/${MACHDIR}/
 | 
|---|
| 79 | LIB := ${PP}/Libs/
 | 
|---|
| 80 | SLB := ${PP}/ShLibs/
 | 
|---|
| 81 | OBJ := ${PP}/Objs/
 | 
|---|
| 82 | EXE := ${PP}/Exec/
 | 
|---|
| 83 | INC := ${DPCDEVREP}/Include/
 | 
|---|
| 84 | GLB := /usr/local/lib/
 | 
|---|
| 85 | #--
 | 
|---|
| 86 | 
 | 
|---|
| 87 | #-   Flag for optimisation/ debug
 | 
|---|
| 88 | # Pour forcer sans debug, DBGFLAG = -g0
 | 
|---|
| 89 | ifndef OPTFLAG
 | 
|---|
| 90 |   OPTFLAG  := -O
 | 
|---|
| 91 | endif
 | 
|---|
| 92 | 
 | 
|---|
| 93 | ifndef DBGFLAG
 | 
|---|
| 94 |   DBGFLAG  := -g
 | 
|---|
| 95 | #  Probleme sur DEC/OSF1 -g avec g++/egcs pose probleme a l'assembleur
 | 
|---|
| 96 | #                    Reza 09/99 - On met -gcoff
 | 
|---|
| 97 |   ifeq (${MACHEROS},OSF1)
 | 
|---|
| 98 |     ifeq ($(CXX), g++)
 | 
|---|
| 99 |       override DBGFLAG := -gcoff
 | 
|---|
| 100 |     endif
 | 
|---|
| 101 |   endif
 | 
|---|
| 102 | endif
 | 
|---|
| 103 | 
 | 
|---|
| 104 | # DBGFLAG a -g0 veut dire pas de debug. Tout le monde a ca par defaut...
 | 
|---|
| 105 | ifeq ($(DBGFLAG), -g0)
 | 
|---|
| 106 |   override DBGFLAG :=
 | 
|---|
| 107 | endif
 | 
|---|
| 108 | 
 | 
|---|
| 109 | # xlC ne connait pas -O0, par defaut il n'optimise pas.
 | 
|---|
| 110 | ifeq ($(OPTFLAG), -O0)
 | 
|---|
| 111 |   ifeq ($(CC), xlC)
 | 
|---|
| 112 |     override OPTFLAG :=
 | 
|---|
| 113 |   endif
 | 
|---|
| 114 | endif
 | 
|---|
| 115 | 
 | 
|---|
| 116 | AR       := ar
 | 
|---|
| 117 | ARFLAGS  := -rcs
 | 
|---|
| 118 | 
 | 
|---|
| 119 | # le gnu ar ne fonctionne pas bien sur OSF...
 | 
|---|
| 120 | ifeq (${MACHEROS},OSF1)
 | 
|---|
| 121 | AR       := /usr/bin/ar
 | 
|---|
| 122 | endif
 | 
|---|
| 123 | # et sur AIX il nous sort des tas de warnings inutiles
 | 
|---|
| 124 | ifeq ($(MACHEROS),AIX)
 | 
|---|
| 125 | AR := /usr/bin/ar
 | 
|---|
| 126 | endif
 | 
|---|
| 127 | 
 | 
|---|
| 128 | #   Avec certains compilateurs C++ (KCC, aCC) , il faut fabriquer les librairies et 
 | 
|---|
| 129 | # les shared libs avec la meme commande 
 | 
|---|
| 130 | override ARCXX := $(AR) 
 | 
|---|
| 131 | override ARCXXFLAGS := $(ARFLAGS) 
 | 
|---|
| 132 | #RZ0999 ifeq ($(CXX),KCC)
 | 
|---|
| 133 | #RZ0999 override  ARCXX  := KCC
 | 
|---|
| 134 | #RZ0999 override ARCXXFLAGS  := -o
 | 
|---|
| 135 | #RZ0999 endif
 | 
|---|
| 136 | ifeq ($(CXX),aCC)
 | 
|---|
| 137 | override ARCXX  := aCC 
 | 
|---|
| 138 | override ARCXXFLAGS  := -o
 | 
|---|
| 139 | endif
 | 
|---|
| 140 | 
 | 
|---|
| 141 | # Les chemins speciaux pour includes systemes et bibliotheques
 | 
|---|
| 142 | ifeq (${MACHEROS},HP-UX)
 | 
|---|
| 143 |   XLDLIBS := -L.
 | 
|---|
| 144 |   XCFLAGS := -I.
 | 
|---|
| 145 | endif
 | 
|---|
| 146 | 
 | 
|---|
| 147 | 
 | 
|---|
| 148 | #  Pour compiler PI, sous Linux, les includes et libs se trouve souvent ds /usr/X11/include /usr/X11/lib/
 | 
|---|
| 149 | ifeq (${MACHEROS},Linux)
 | 
|---|
| 150 |   XLDLIBS := -L/usr/X11/lib -L/usr/X11R6/lib
 | 
|---|
| 151 |   XCFLAGS := -I/usr/X11/include -I/usr/X11R6/include
 | 
|---|
| 152 |   LDLIBS := -ldl
 | 
|---|
| 153 | endif
 | 
|---|
| 154 | 
 | 
|---|
| 155 | # Chemin pour les include et fichiers d'autres librairies
 | 
|---|
| 156 | EXTINCPI := 
 | 
|---|
| 157 | EXTLIBPL := 
 | 
|---|
| 158 | EXTSLBPL := 
 | 
|---|
| 159 | EXTINCPATH := 
 | 
|---|
| 160 | EXTLIBPATH := 
 | 
|---|
| 161 | EXTSLBPATH := 
 | 
|---|
| 162 | 
 | 
|---|
| 163 | ifdef EXTLIBDIR
 | 
|---|
| 164 |  EXTINCPI := -I$(EXTLIBDIR)/Include/
 | 
|---|
| 165 |  EXTLIBPL := -L$(EXTLIBDIR)/$(MACHDIR)/Libs/
 | 
|---|
| 166 |  EXTSLBPL := -L$(EXTLIBDIR)/$(MACHDIR)/ShLibs/
 | 
|---|
| 167 |  EXTINCPATH := $(EXTLIBDIR)/Include/
 | 
|---|
| 168 |  EXTLIBPATH := $(EXTLIBDIR)/$(MACHDIR)/Libs/
 | 
|---|
| 169 |  EXTSLBPATH := $(EXTLIBDIR)/$(MACHDIR)/ShLibs/
 | 
|---|
| 170 | endif
 | 
|---|
| 171 | 
 | 
|---|
| 172 | #  S'il y a des flags particulier pour un module de compilation
 | 
|---|
| 173 | #ifndef MODULECPPFLAGS
 | 
|---|
| 174 |   override MODULECPPFLAGS :=
 | 
|---|
| 175 | #endif
 | 
|---|
| 176 | 
 | 
|---|
| 177 | CPPFLAGS     :=  -I${INC} $(EXTINCPI) -D${MACHEROSD} $(MODULECPPFLAGS)
 | 
|---|
| 178 | 
 | 
|---|
| 179 | # Les options selon les divers compilateurs
 | 
|---|
| 180 | # GNU
 | 
|---|
| 181 | ifeq ($(CC), gcc)
 | 
|---|
| 182 |   CFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 183 |                   -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 184 |                   $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 185 |   LDLIBS       := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 186 | endif
 | 
|---|
| 187 | ifeq ($(CC), egcs)
 | 
|---|
| 188 |   CFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 189 |                   -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 190 |                   $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 191 |   LDLIBS       := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 192 | endif
 | 
|---|
| 193 | 
 | 
|---|
| 194 | ifeq ($(CXX), g++)
 | 
|---|
| 195 |   CXXFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 196 |                     -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 197 |                     $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 198 |   LDLIBS      := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 199 | #  ifdef NOSHLIB 
 | 
|---|
| 200 | #    LDFLAGS := -static
 | 
|---|
| 201 | #  endif
 | 
|---|
| 202 | endif
 | 
|---|
| 203 | ifeq ($(CXX), egcs++)
 | 
|---|
| 204 |   CXXFLAGS       := -Wall -Wpointer-arith \
 | 
|---|
| 205 |                     -Wmissing-prototypes -Wsynth -I$(INC) $(XCFLAGS) \
 | 
|---|
| 206 |                     $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 207 |   LDLIBS      := $(LDLIBS) $(XLDLIBS)
 | 
|---|
| 208 |   ifdef NOSHLIB 
 | 
|---|
| 209 |     LDFLAGS := -static
 | 
|---|
| 210 |   endif
 | 
|---|
| 211 | endif
 | 
|---|
| 212 | 
 | 
|---|
| 213 | # Compilateur C natif HP-UX
 | 
|---|
| 214 | ifeq (${MACHEROS},HP-UX)
 | 
|---|
| 215 | ifeq ($(CC),cc)                                    
 | 
|---|
| 216 |   CFLAGS       :=  +Z -Aa -Ae $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) 
 | 
|---|
| 217 |   FFLAGS       :=  -Aa -I${INC}   -D${MACHEROSD}  
 | 
|---|
| 218 |   CPPFLAGS     :=  -I${INC}  -I$(INC)/tnt -D${MACHEROSD} \
 | 
|---|
| 219 |                -D_HPUX_SOURCE $(MODULECPPFLAGS)
 | 
|---|
| 220 |   LDLIBS      := $(XLDLIBS)
 | 
|---|
| 221 |   override NOSHLIB := Y
 | 
|---|
| 222 | 
 | 
|---|
| 223 | endif
 | 
|---|
| 224 | ifeq ($(CXX),aCC)
 | 
|---|
| 225 |   CXXFLAGS := $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) +Z -D__aCC__
 | 
|---|
| 226 | #  -DCOMPILER_EXCEPTIONS -D__ANSI_TEMPLATES__  definis ds defs.h
 | 
|---|
| 227 | endif
 | 
|---|
| 228 | endif
 | 
|---|
| 229 | 
 | 
|---|
| 230 | # AIX, xlC comme compilateur C et C++
 | 
|---|
| 231 | ifeq ($(CXX), xlC)
 | 
|---|
| 232 |   CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) $(XCFLAGS)
 | 
|---|
| 233 |   CPPFLAGS := -I$(INC)/Syst -I${INC}  -I$(INC)/tnt -D${MACHEROSD} $(MODULECPPFLAGS)
 | 
|---|
| 234 |   CXXFLAGS     := $(CFLAGS) -D__xlC -DCOMPILER_EXCEPTIONS
 | 
|---|
| 235 | # -DCOMPILER_EXCEPTIONS defini ds defs.h
 | 
|---|
| 236 |   LDLIBS      := $(XLDLIBS)
 | 
|---|
| 237 | 
 | 
|---|
| 238 | # Pour faire des bibliotheques partagees, il faut faire un truc du
 | 
|---|
| 239 | # style 
 | 
|---|
| 240 | #ld -o shrsub.o subs1.o subs2.o -bE:shrsub.exp -bM:SRE -lc
 | 
|---|
| 241 | 
 | 
|---|
| 242 | # Pour le moment on ne se fatigue pas, tant pis
 | 
|---|
| 243 |   override NOSHLIB := Y
 | 
|---|
| 244 | 
 | 
|---|
| 245 | # Et puis 1540-293: (W) est un FAUX warning, on supprime les warnings
 | 
|---|
| 246 |   CXXFLAGS := -qflag=e $(CXXFLAGS)
 | 
|---|
| 247 | endif
 | 
|---|
| 248 | 
 | 
|---|
| 249 | 
 | 
|---|
| 250 | ifeq ($(CXX), cxx)
 | 
|---|
| 251 |   ifeq ($(DBGFLAG), -g)
 | 
|---|
| 252 |     ifdef OPTFLAG
 | 
|---|
| 253 |       override DBGFLAG := -g1
 | 
|---|
| 254 |     endif
 | 
|---|
| 255 | #    ifdef XOPT
 | 
|---|
| 256 | #      override DBGFLAG := -g1
 | 
|---|
| 257 | #    endif
 | 
|---|
| 258 |   endif
 | 
|---|
| 259 | 
 | 
|---|
| 260 | # chemin pour repository CXX
 | 
|---|
| 261 |  REP := $(OBJ)/cxxrep/
 | 
|---|
| 262 |  REPPI := $(OBJ)/cxxrep_PI/
 | 
|---|
| 263 |  REPCXX := -ptr $(OBJ)/cxxrep/
 | 
|---|
| 264 |  ifdef MODULECXXREPNAME
 | 
|---|
| 265 |    REPCXX := -ptr $(OBJ)/cxxrep_$(MODULECXXREPNAME)/  -ptr $(OBJ)/cxxrep/
 | 
|---|
| 266 |    REPM := $(OBJ)/cxxrep_$(MODULECXXREPNAME)/
 | 
|---|
| 267 |  endif
 | 
|---|
| 268 | 
 | 
|---|
| 269 |   LDLIBS      := $(XLDLIBS) -lrt
 | 
|---|
| 270 | 
 | 
|---|
| 271 |   CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) -DCOMPILER_EXCEPTIONS  \
 | 
|---|
| 272 |               $(REPCXX) -no_implicit_include 
 | 
|---|
| 273 | # $(REPCXX) -no_implicit_include -D__USE_STD_IOSTREAM  passe pas avec cxx 6.0 Reza 23/12/99
 | 
|---|
| 274 |   CFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 275 | #  CXXFLAGS := $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS) -DCOMPILER_EXCEPTIONS \
 | 
|---|
| 276 | #             -nopt -define_templates
 | 
|---|
| 277 |   ifeq ($(XOPT), 1)
 | 
|---|
| 278 |     override DBGFLAG :=
 | 
|---|
| 279 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) -DCOMPILER_EXCEPTIONS \
 | 
|---|
| 280 |                 $(REPCXX) -fp_reorder \
 | 
|---|
| 281 |                 -O5 -inline speed -tune host
 | 
|---|
| 282 |   endif
 | 
|---|
| 283 |   ifeq ($(XOPT), 2)
 | 
|---|
| 284 |     override DBGFLAG :=
 | 
|---|
| 285 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) -DCOMPILER_EXCEPTIONS \
 | 
|---|
| 286 |               $(REPCXX) -fp_reorder \
 | 
|---|
| 287 |               -O5 -inline speed -tune host \
 | 
|---|
| 288 |               -assume trusted_short_alignment
 | 
|---|
| 289 |   endif
 | 
|---|
| 290 |   ifeq ($(XOPT), 3)
 | 
|---|
| 291 |     override DBGFLAG :=
 | 
|---|
| 292 |     CXXFLAGS := $(DBGFLAG) $(MYCFLAGS) -DCOMPILER_EXCEPTIONS \
 | 
|---|
| 293 |               $(REPCXX) -fp_reorder \
 | 
|---|
| 294 |               -O5 -inline speed -tune host \
 | 
|---|
| 295 |               -assume trusted_short_alignment \
 | 
|---|
| 296 |               -non_shared -om
 | 
|---|
| 297 |     override NOSHLIB := Y
 | 
|---|
| 298 |   endif
 | 
|---|
| 299 | 
 | 
|---|
| 300 | # le fichier X11/Xlib.h contient des declarations de fonctions sans type
 | 
|---|
| 301 | # Cela genere un grand nombre de warning avec cxx V6
 | 
|---|
| 302 | # La variable MODULEDECCXXFLAGS permet de specifier des options de compilation 
 | 
|---|
| 303 | # pour un module donne  
 | 
|---|
| 304 |   ifdef MODULEDECCXXFLAGS
 | 
|---|
| 305 |     CXXFLAGS := $(CXXFLAGS) $(MODULEDECCXXFLAGS)
 | 
|---|
| 306 |   endif
 | 
|---|
| 307 | endif
 | 
|---|
| 308 | ifeq ($(CC),cc)
 | 
|---|
| 309 |   ifeq ($(MACHEROS),OSF1)
 | 
|---|
| 310 |   ifeq ($(XOPT), 1)
 | 
|---|
| 311 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 312 |               -O4 -inline speed -tune host
 | 
|---|
| 313 |   endif
 | 
|---|
| 314 |   ifeq ($(XOPT), 2)
 | 
|---|
| 315 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 316 |               -O4 -inline speed -tune host \
 | 
|---|
| 317 |               -assume trusted_short_alignment -fast
 | 
|---|
| 318 |   endif
 | 
|---|
| 319 |   ifeq ($(XOPT), 3)
 | 
|---|
| 320 |     CFLAGS :=  $(DBGFLAG) $(MYCFLAGS) -fp_reorder \
 | 
|---|
| 321 |               -O4 -inline speed -tune host \
 | 
|---|
| 322 |               -assume trusted_short_alignment -fast \
 | 
|---|
| 323 |               -non_shared -om
 | 
|---|
| 324 |   endif
 | 
|---|
| 325 |   endif
 | 
|---|
| 326 | endif
 | 
|---|
| 327 | 
 | 
|---|
| 328 | # --- Compilateur KAI  (OK pour v 3.3)
 | 
|---|
| 329 | ifeq ($(CXX), KCC)
 | 
|---|
| 330 |   CXXFLAGS     :=  --exceptions --rtti  --auto_instantiation --one_instantiation_per_object -D__KCC__
 | 
|---|
| 331 | # Flag --one_instantiation_per_object mis - Reza 02/03/99
 | 
|---|
| 332 | # -DCOMPILER_EXCEPTIONS -D__ANSI_TEMPLATES__  definis ds defs.h 
 | 
|---|
| 333 | endif
 | 
|---|
| 334 | 
 | 
|---|
| 335 | # --- Compilateur natif CC de SGI 
 | 
|---|
| 336 | ifeq ($(MACHEROS), IRIX64)
 | 
|---|
| 337 |   ifeq ($(CXX), CC)
 | 
|---|
| 338 |     CXXFLAGS     :=  -prelink -D__SGICC__
 | 
|---|
| 339 |     LINK.cc := CC $(CPPFLAGS) -D__SGICC__ $(DBGFLAG) $(OPTFLAG)
 | 
|---|
| 340 |   endif
 | 
|---|
| 341 | endif
 | 
|---|
| 342 | 
 | 
|---|
| 343 | # Autres compilateurs natifs.
 | 
|---|
| 344 | 
 | 
|---|
| 345 | #  CFLAGS       :=  -I$(INC) $(XCFLAGS) $(OPTFLAG) $(DBGFLAG) $(MYCFLAGS)
 | 
|---|
| 346 | #  CXXFLAGS     := $(CFLAGS)
 | 
|---|
| 347 | #  LDLIBS      := $(XLDLIBS)
 | 
|---|
| 348 | 
 | 
|---|
| 349 | #- redefine implicit rule. Les .o sont dans $(OBJ).
 | 
|---|
| 350 | $(OBJ)%.o:%.c
 | 
|---|
| 351 |         $(COMPILE.c) -o $@ $<
 | 
|---|
| 352 | 
 | 
|---|
| 353 | $(OBJ)%.o:%.cc
 | 
|---|
| 354 |         $(COMPILE.cc) -o $@ $<
 | 
|---|
| 355 | 
 | 
|---|
| 356 | $(OBJ)%.o:%.f
 | 
|---|
| 357 |         $(COMPILE.f) -o $@ $< 
 | 
|---|
| 358 | 
 | 
|---|
| 359 | #OSF1
 | 
|---|
| 360 | #LDFC est f77
 | 
|---|
| 361 | #LDFCFLAGS est rien
 | 
|---|
| 362 | 
 | 
|---|
| 363 | #parfois
 | 
|---|
| 364 | #LDFC est cc
 | 
|---|
| 365 | #LDFCFLAGS est -ltruc
 | 
|---|
| 366 | 
 | 
|---|
| 367 | #------------------------------------------------- End of Makefile.h ------- 
 | 
|---|