[d7d2da3] | 1 | # -*- mode: makefile -*-
|
---|
| 2 | #
|
---|
| 3 | # Makefile containing platform dependencies for ROOT based projects.
|
---|
| 4 | #
|
---|
| 5 | # Copyright (c) 2000 Rene Brun and Fons Rademakers
|
---|
| 6 | #
|
---|
| 7 | # Author: Fons Rademakers, 29/2/2000
|
---|
| 8 |
|
---|
| 9 | RC := root-config
|
---|
| 10 | ifneq ($(shell which $(RC) 2>&1 | sed -ne "s@.*/$(RC)@$(RC)@p"),$(RC))
|
---|
| 11 | ifneq ($(ROOTSYS),)
|
---|
| 12 | RC1 := $(ROOTSYS)/bin/root-config
|
---|
| 13 | ifneq ($(shell which $(RC1) 2>&1 | sed -ne "s@.*/$(RC)@$(RC)@p"),$(RC))
|
---|
| 14 | $(error Please make sure $(RC1) can be found in path)
|
---|
| 15 | else
|
---|
| 16 | RC := $(RC1)
|
---|
| 17 | endif
|
---|
| 18 | else
|
---|
| 19 | $(error Please make sure $(RC) can be found in path)
|
---|
| 20 | endif
|
---|
| 21 | endif
|
---|
| 22 |
|
---|
| 23 | ARCH := $(shell $(RC) --arch)
|
---|
| 24 | PLATFORM := $(shell $(RC) --platform)
|
---|
| 25 | ALTCC := $(shell $(RC) --cc)
|
---|
| 26 | ALTCXX := $(shell $(RC) --cxx)
|
---|
| 27 | ALTF77 := $(shell $(RC) --f77)
|
---|
| 28 | ALTLD := $(shell $(RC) --ld)
|
---|
| 29 |
|
---|
| 30 | #CXX =
|
---|
| 31 | ObjSuf = o
|
---|
| 32 | SrcSuf = cxx
|
---|
| 33 | ExeSuf =
|
---|
| 34 | DllSuf = so
|
---|
| 35 | OutPutOpt = -o # keep whitespace after "-o"
|
---|
| 36 |
|
---|
| 37 | ifeq (debug,$(findstring debug,$(ROOTBUILD)))
|
---|
| 38 | OPT = -g
|
---|
| 39 | OPT2 = -g
|
---|
| 40 | else
|
---|
| 41 | ifneq ($(findstring debug, $(strip $(shell $(RC) --config))),)
|
---|
| 42 | OPT = -g
|
---|
| 43 | OPT2 = -g
|
---|
| 44 | else
|
---|
| 45 | OPT = -O
|
---|
| 46 | OPT2 = -O2
|
---|
| 47 | endif
|
---|
| 48 | endif
|
---|
| 49 |
|
---|
| 50 | ROOTCFLAGS := $(shell $(RC) --cflags)
|
---|
| 51 | ROOTLDFLAGS := $(shell $(RC) --ldflags)
|
---|
| 52 | ROOTLIBS := $(shell $(RC) --libs)
|
---|
| 53 | ROOTGLIBS := $(shell $(RC) --glibs)
|
---|
| 54 | HASTHREAD := $(shell $(RC) --has-thread)
|
---|
| 55 | ROOTCINT := rootcint
|
---|
| 56 |
|
---|
| 57 | ifeq ($(PLATFORM),macosx)
|
---|
| 58 | MACOSX_MINOR := $(shell sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2)
|
---|
| 59 | ifeq ($(MACOSX_DEPLOYMENT_TARGET),)
|
---|
| 60 | MACOSXTARGET := 10.$(MACOSX_MINOR)
|
---|
| 61 | else
|
---|
| 62 | MACOSXTARGET := $(MACOSX_DEPLOYMENT_TARGET)
|
---|
| 63 | endif
|
---|
| 64 | endif
|
---|
| 65 |
|
---|
| 66 | ifeq ($(ARCH),hpuxacc)
|
---|
| 67 | # HP-UX 10.x with aCC
|
---|
| 68 | CXX = aCC
|
---|
| 69 | CXXFLAGS = $(OPT) +Z
|
---|
| 70 | LD = aCC
|
---|
| 71 | LDFLAGS = $(OPT) -z
|
---|
| 72 | SOFLAGS = -b
|
---|
| 73 | endif
|
---|
| 74 |
|
---|
| 75 | ifeq ($(ARCH),hpuxia64acc)
|
---|
| 76 | # HP-UX 11i 1.5 (IA-64) with aCC
|
---|
| 77 | CXX = aCC
|
---|
| 78 | CXXFLAGS = +DD64 $(OPT) +Z
|
---|
| 79 | LD = aCC
|
---|
| 80 | LDFLAGS = +DD64 $(OPT) -z
|
---|
| 81 | SOFLAGS = -b
|
---|
| 82 | endif
|
---|
| 83 |
|
---|
| 84 | ifeq ($(ARCH),hpuxgcc)
|
---|
| 85 | # HP-UX 10.x with g++
|
---|
| 86 | CXXFLAGS = $(OPT) -fPIC
|
---|
| 87 | CXX = g++
|
---|
| 88 | LD = g++
|
---|
| 89 | LDFLAGS = $(OPT)
|
---|
| 90 | SOFLAGS = -fPIC -shared
|
---|
| 91 | endif
|
---|
| 92 |
|
---|
| 93 | ifeq ($(ARCH),hurddeb)
|
---|
| 94 | # GNU/Hurd
|
---|
| 95 | CXX = g++
|
---|
| 96 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 97 | LD = g++
|
---|
| 98 | LDFLAGS = $(OPT2)
|
---|
| 99 | SOFLAGS = -shared
|
---|
| 100 | endif
|
---|
| 101 |
|
---|
| 102 | ifeq ($(ARCH),aix5)
|
---|
| 103 | # IBM AIX >5.x xlC
|
---|
| 104 | CXX = xlC
|
---|
| 105 | CXXFLAGS = $(OPT)
|
---|
| 106 | LD = xlC
|
---|
| 107 | LDFLAGS = $(OPT)
|
---|
| 108 | SOFLAGS =
|
---|
| 109 | DllSuf = a
|
---|
| 110 | endif
|
---|
| 111 |
|
---|
| 112 | ifeq ($(ARCH),aixgcc)
|
---|
| 113 | # IBM AIX >5.x with GCC
|
---|
| 114 | CXX = g++
|
---|
| 115 | CXXFLAGS = $(OPT)
|
---|
| 116 | LD = g++
|
---|
| 117 | LDFLAGS = $(OPT)
|
---|
| 118 | SOFLAGS = -shared
|
---|
| 119 | DllSuf = a
|
---|
| 120 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 121 | endif
|
---|
| 122 |
|
---|
| 123 | ifeq ($(ARCH),solaris)
|
---|
| 124 | # Solaris CC
|
---|
| 125 | CXX = /opt/SUNWspro/bin/CC
|
---|
| 126 | CXXFLAGS = $(OPT) -KPIC
|
---|
| 127 | LD = /opt/SUNWspro/bin/CC
|
---|
| 128 | LDFLAGS = $(OPT)
|
---|
| 129 | SOFLAGS = -G
|
---|
| 130 | endif
|
---|
| 131 |
|
---|
| 132 | ifeq ($(ARCH),solarisCC5)
|
---|
| 133 | # Solaris CC 5.0
|
---|
| 134 | CXX = CC
|
---|
| 135 | CXXFLAGS = $(OPT) -KPIC
|
---|
| 136 | LD = CC
|
---|
| 137 | LDFLAGS = $(OPT)
|
---|
| 138 | SOFLAGS = -G
|
---|
| 139 | endif
|
---|
| 140 |
|
---|
| 141 | ifeq ($(ARCH),solaris64CC5)
|
---|
| 142 | # Solaris CC 5.0 64-bit
|
---|
| 143 | CXX = CC
|
---|
| 144 | CXXFLAGS = $(OPT) -KPIC
|
---|
| 145 | LD = CC
|
---|
| 146 | LDFLAGS = $(OPT)
|
---|
| 147 | SOFLAGS = -G
|
---|
| 148 | endif
|
---|
| 149 |
|
---|
| 150 | ifeq ($(ARCH),sgicc)
|
---|
| 151 | # SGI
|
---|
| 152 | CXX = CC -n32 -I/usr/include/CC.sgi
|
---|
| 153 | CXXFLAGS = $(OPT)
|
---|
| 154 | LD = CC -n32 -LANG:std -I/usr/include/CC.sgi
|
---|
| 155 | LDFLAGS = $(OPT)
|
---|
| 156 | SOFLAGS = -shared
|
---|
| 157 | endif
|
---|
| 158 |
|
---|
| 159 | ifeq ($(ARCH),sgicc64)
|
---|
| 160 | # SGI
|
---|
| 161 | CXX = CC -64 -I/usr/include/CC.sgi
|
---|
| 162 | CXXFLAGS = $(OPT)
|
---|
| 163 | LD = CC -64 -LANG:std -I/usr/include/CC.sgi
|
---|
| 164 | LDFLAGS = $(OPT)
|
---|
| 165 | SOFLAGS = -shared
|
---|
| 166 | endif
|
---|
| 167 |
|
---|
| 168 | ifeq ($(ARCH),sgigcc)
|
---|
| 169 | # SGI 6.x with gcc
|
---|
| 170 | CXX = g++
|
---|
| 171 | CXXFLAGS = $(OPT) -Wall -fPIC
|
---|
| 172 | LD = g++
|
---|
| 173 | LDFLAGS = $(OPT) -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
|
---|
| 174 | SOFLAGS = -shared
|
---|
| 175 | endif
|
---|
| 176 |
|
---|
| 177 | ifeq ($(ARCH),sgin32gcc)
|
---|
| 178 | # SGI 6.x with gcc for n32 ABI
|
---|
| 179 | CXX = g++
|
---|
| 180 | CXXFLAGS = $(OPT) -Wall -fPIC
|
---|
| 181 | LD = g++
|
---|
| 182 | LDFLAGS = $(OPT) -L/usr/lib32 -Wl,-woff,134 -lgen
|
---|
| 183 | SOFLAGS = -shared
|
---|
| 184 | endif
|
---|
| 185 |
|
---|
| 186 | ifeq ($(ARCH),alphagcc)
|
---|
| 187 | # Alpha/OSF with gcc
|
---|
| 188 | CXX = g++
|
---|
| 189 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 190 | LD = g++
|
---|
| 191 | LDFLAGS = $(OPT2)
|
---|
| 192 | SOFLAGS = -Wl,-expect_unresolved,* -shared
|
---|
| 193 | endif
|
---|
| 194 |
|
---|
| 195 | ifeq ($(ARCH),alphacxx6)
|
---|
| 196 | # Alpha/OSF with cxx6
|
---|
| 197 | CXX = cxx
|
---|
| 198 | CXXFLAGS = $(OPT)
|
---|
| 199 | LD = cxx
|
---|
| 200 | LDFLAGS = $(OPT)
|
---|
| 201 | SOFLAGS = -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
|
---|
| 202 | endif
|
---|
| 203 |
|
---|
| 204 | ifeq ($(ARCH),linux)
|
---|
| 205 | # Linux with egcs, gcc 2.9x, gcc 3.x
|
---|
| 206 | CXX = g++
|
---|
| 207 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 208 | LD = g++
|
---|
| 209 | LDFLAGS = $(OPT2)
|
---|
| 210 | SOFLAGS = -shared
|
---|
| 211 | endif
|
---|
| 212 |
|
---|
| 213 | ifeq ($(ARCH),linuxicc)
|
---|
| 214 | # Linux with Intel icc compiler
|
---|
| 215 | ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
|
---|
| 216 | cut -d'.' -f1)
|
---|
| 217 | ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
|
---|
| 218 | cut -d'.' -f2)
|
---|
| 219 | CXX = icc
|
---|
| 220 | CXXFLAGS = $(OPT) -fPIC -wd1476
|
---|
| 221 | LD = icpc
|
---|
| 222 | LDFLAGS = $(OPT)
|
---|
| 223 | SOFLAGS = -shared
|
---|
| 224 | endif
|
---|
| 225 |
|
---|
| 226 | ifeq ($(ARCH),linuxppcgcc)
|
---|
| 227 | # PPC Linux with gcc and glibc
|
---|
| 228 | CXX = g++
|
---|
| 229 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 230 | LD = g++
|
---|
| 231 | LDFLAGS = $(OPT2)
|
---|
| 232 | SOFLAGS = -shared
|
---|
| 233 | endif
|
---|
| 234 |
|
---|
| 235 | ifeq ($(ARCH),linuxia64gcc)
|
---|
| 236 | # Itanium Linux with gcc 2.9x
|
---|
| 237 | CXX = g++
|
---|
| 238 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 239 | LD = g++
|
---|
| 240 | LDFLAGS = $(OPT2)
|
---|
| 241 | SOFLAGS = -shared
|
---|
| 242 | endif
|
---|
| 243 |
|
---|
| 244 | ifeq ($(ARCH),linuxia64ecc)
|
---|
| 245 | # Itanium Linux with Intel icc (was ecc)
|
---|
| 246 | ICC_MAJOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
|
---|
| 247 | cut -d'.' -f1)
|
---|
| 248 | ICC_MINOR := $(shell icc -v 2>&1 | awk '{ if (NR==1) print $$2 }' | \
|
---|
| 249 | cut -d'.' -f2)
|
---|
| 250 | CXX = icc
|
---|
| 251 | CXXFLAGS = $(OPT) -fPIC -wd1476 -ftz
|
---|
| 252 | LD = icpc
|
---|
| 253 | LDFLAGS = $(OPT)
|
---|
| 254 | SOFLAGS = -shared
|
---|
| 255 | endif
|
---|
| 256 |
|
---|
| 257 | ifeq ($(ARCH),linuxx8664gcc)
|
---|
| 258 | # AMD Opteron and Intel EM64T (64 bit mode) Linux with gcc 3.x
|
---|
| 259 | CXX = g++
|
---|
| 260 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 261 | LD = g++
|
---|
| 262 | LDFLAGS = $(OPT2)
|
---|
| 263 | SOFLAGS = -shared
|
---|
| 264 | endif
|
---|
| 265 |
|
---|
| 266 | ifeq ($(ARCH),linuxppc64gcc)
|
---|
| 267 | # PPC64 Linux with gcc 3.x
|
---|
| 268 | CXX = g++
|
---|
| 269 | CXXFLAGS = $(OPT) -Wall -fPIC
|
---|
| 270 | LD = g++
|
---|
| 271 | LDFLAGS = $(OPT)
|
---|
| 272 | SOFLAGS = -shared
|
---|
| 273 | endif
|
---|
| 274 |
|
---|
| 275 | ifeq ($(ARCH),linuxx8664icc)
|
---|
| 276 | # AMD Opteron and Intel EM64T (64 bit mode) Linux with Intel icc compiler
|
---|
| 277 | CXX = icc
|
---|
| 278 | CXXFLAGS = $(OPT) -fPIC -wd1476 -wd1572
|
---|
| 279 | LD = icpc
|
---|
| 280 | LDFLAGS = $(OPT)
|
---|
| 281 | SOFLAGS = -shared
|
---|
| 282 | endif
|
---|
| 283 |
|
---|
| 284 | ifeq ($(ARCH),linuxalphagcc)
|
---|
| 285 | # Alpha Linux with gcc
|
---|
| 286 | CXX = g++
|
---|
| 287 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 288 | LD = g++
|
---|
| 289 | LDFLAGS = $(OPT2)
|
---|
| 290 | SOFLAGS = -shared
|
---|
| 291 | endif
|
---|
| 292 |
|
---|
| 293 | ifeq ($(ARCH),linuxmips)
|
---|
| 294 | # GNU/Linux on mips (BE/LE, O32/N32/N64) with gcc
|
---|
| 295 | CXX = g++
|
---|
| 296 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 297 | LD = g++
|
---|
| 298 | LDFLAGS = $(OPT2)
|
---|
| 299 | SOFLAGS = -shared
|
---|
| 300 | endif
|
---|
| 301 |
|
---|
| 302 | ifeq ($(ARCH),linuxhppa)
|
---|
| 303 | # GNU/Linux on hppa with gcc
|
---|
| 304 | CXX = g++
|
---|
| 305 | CXXFLAGS = $(OPT2) -Wall -fPIC
|
---|
| 306 | LD = g++
|
---|
| 307 | LDFLAGS = $(OPT2)
|
---|
| 308 | SOFLAGS = -shared
|
---|
| 309 | endif
|
---|
| 310 |
|
---|
| 311 | ifeq ($(ARCH),linuxarm)
|
---|
| 312 | # ARM Linux with egcs
|
---|
| 313 | CXX = g++
|
---|
| 314 | CXXFLAGS = $(OPT) -Wall -fPIC
|
---|
| 315 | LD = g++
|
---|
| 316 | LDFLAGS = $(OPT)
|
---|
| 317 | SOFLAGS = -shared
|
---|
| 318 | endif
|
---|
| 319 |
|
---|
| 320 | ifeq ($(ARCH),freebsd4)
|
---|
| 321 | # FreeBSD with glibc
|
---|
| 322 | CXX = g++
|
---|
| 323 | CXXFLAGS = $(OPT) -W -Wall -fPIC
|
---|
| 324 | LD = $(CXX)
|
---|
| 325 | LDFLAGS = $(OPT)
|
---|
| 326 | SOFLAGS = -shared -Wl,-x
|
---|
| 327 | endif
|
---|
| 328 |
|
---|
| 329 | ifeq ($(ARCH),freebsd5)
|
---|
| 330 | # FreeBSD with glibc
|
---|
| 331 | CXX = g++
|
---|
| 332 | CXXFLAGS = $(OPT) -W -Wall -fPIC
|
---|
| 333 | LD = $(CXX)
|
---|
| 334 | LDFLAGS = $(OPT)
|
---|
| 335 | SOFLAGS = -shared -Wl,-x
|
---|
| 336 | endif
|
---|
| 337 |
|
---|
| 338 | ifeq ($(ARCH),freebsd7)
|
---|
| 339 | # FreeBSD with libc
|
---|
| 340 | CXX = g++
|
---|
| 341 | CXXFLAGS = $(OPT) -W -Wall -fPIC
|
---|
| 342 | LD = $(CXX)
|
---|
| 343 | LDFLAGS = $(OPT)
|
---|
| 344 | SOFLAGS = -shared -Wl,-x
|
---|
| 345 | endif
|
---|
| 346 |
|
---|
| 347 | ifeq ($(ARCH),openbsd)
|
---|
| 348 | # OpenBSD with libc
|
---|
| 349 | CXX = g++
|
---|
| 350 | CXXFLAGS = $(OPT) -pipe -W -Wall -fPIC
|
---|
| 351 | LD = g++
|
---|
| 352 | LDFLAGS = $(OPT)
|
---|
| 353 | SOFLAGS = -shared -Wl,-x
|
---|
| 354 | endif
|
---|
| 355 |
|
---|
| 356 | ifeq ($(ARCH),macosx)
|
---|
| 357 | # MacOS X with cc (GNU cc 2.95.2 and gcc 3.3)
|
---|
| 358 | CXX = g++
|
---|
| 359 | CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
|
---|
| 360 | LD = g++
|
---|
| 361 | LDFLAGS = $(OPT2) -mmacosx-version-min=$(MACOSXTARGET)
|
---|
| 362 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 363 | # The SOFLAGS will be used to create the .dylib,
|
---|
| 364 | # the .so will be created separately
|
---|
| 365 | ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 366 | DllSuf = so
|
---|
| 367 | else
|
---|
| 368 | DllSuf = dylib
|
---|
| 369 | endif
|
---|
| 370 | ifneq ($(subst $(MACOSX_MINOR),,12),12)
|
---|
| 371 | LD = g++
|
---|
| 372 | endif
|
---|
| 373 | SOFLAGS = -dynamiclib -single_module -install_name $(CURDIR)/
|
---|
| 374 | endif
|
---|
| 375 |
|
---|
| 376 | ifeq ($(ARCH),macosxicc)
|
---|
| 377 | # MacOS X with Intel icc compiler
|
---|
| 378 | ifeq ($(MACOSX_MINOR),5)
|
---|
| 379 | MACOSX_MINOR := 4
|
---|
| 380 | endif
|
---|
| 381 | CXX = icc
|
---|
| 382 | CXXFLAGS = $(OPT) -fPIC -wd1476
|
---|
| 383 | LD = icpc
|
---|
| 384 | LDFLAGS = $(OPT2) -mmacosx-version-min=$(MACOSXTARGET)
|
---|
| 385 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 386 | # The SOFLAGS will be used to create the .dylib,
|
---|
| 387 | # the .so will be created separately
|
---|
| 388 | ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 389 | DllSuf = so
|
---|
| 390 | else
|
---|
| 391 | DllSuf = dylib
|
---|
| 392 | endif
|
---|
| 393 | SOFLAGS = -dynamiclib -single_module -install_name $(CURDIR)/
|
---|
| 394 | endif
|
---|
| 395 |
|
---|
| 396 | ifeq ($(ARCH),macosx64)
|
---|
| 397 | # MacOS X >= 10.4 with gcc 64 bit mode (GNU gcc 4.*)
|
---|
| 398 | # Only specific option (-m64) comes from root-config
|
---|
| 399 | CXX = g++
|
---|
| 400 | CXXFLAGS = $(OPT2) -pipe -Wall -W -Woverloaded-virtual
|
---|
| 401 | LD = g++
|
---|
| 402 | LDFLAGS = $(OPT2) -mmacosx-version-min=$(MACOSXTARGET)
|
---|
| 403 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 404 | # The SOFLAGS will be used to create the .dylib,
|
---|
| 405 | # the .so will be created separately
|
---|
| 406 | ifeq ($(subst $(MACOSX_MINOR),,1234),1234)
|
---|
| 407 | DllSuf = so
|
---|
| 408 | else
|
---|
| 409 | DllSuf = dylib
|
---|
| 410 | endif
|
---|
| 411 | SOFLAGS = -dynamiclib -single_module -install_name $(CURDIR)/
|
---|
| 412 | endif
|
---|
| 413 |
|
---|
| 414 | ifeq ($(ARCH),win32)
|
---|
| 415 | # Windows with the VC++ compiler
|
---|
| 416 | VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$(NF-2) }' | \
|
---|
| 417 | cut -d'.' -f1)
|
---|
| 418 | ObjSuf = obj
|
---|
| 419 | SrcSuf = cxx
|
---|
| 420 | ExeSuf = .exe
|
---|
| 421 | DllSuf = dll
|
---|
| 422 | OutPutOpt = -out:
|
---|
| 423 | CXX = cl
|
---|
| 424 | ifeq (debug,$(findstring debug,$(ROOTBUILD)))
|
---|
| 425 | CXXOPT = -Z7
|
---|
| 426 | LDOPT = -debug
|
---|
| 427 | else
|
---|
| 428 | ifneq ($(findstring debug, $(strip $(shell $(RC) --config))),)
|
---|
| 429 | CXXOPT = -Z7
|
---|
| 430 | LDOPT = -debug
|
---|
| 431 | else
|
---|
| 432 | CXXOPT = -O2
|
---|
| 433 | LDOPT = -opt:ref
|
---|
| 434 | endif
|
---|
| 435 | endif
|
---|
| 436 | ROOTINCDIR := -I$(shell cygpath -m `$(RC) --incdir`)
|
---|
| 437 | CXXFLAGS = $(CXXOPT) -nologo $(ROOTINCDIR) -FIw32pragma.h
|
---|
| 438 | LD = link
|
---|
| 439 | LDFLAGS = $(LDOPT) -nologo
|
---|
| 440 | SOFLAGS = -DLL
|
---|
| 441 |
|
---|
| 442 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 443 | ifneq (,$(findstring $(VC_MAJOR),14 15))
|
---|
| 444 | MT_EXE = mt -nologo -manifest $@.manifest -outputresource:$@\;1; rm -f $@.manifest
|
---|
| 445 | MT_DLL = mt -nologo -manifest $@.manifest -outputresource:$@\;2; rm -f $@.manifest
|
---|
| 446 | else
|
---|
| 447 | MT_EXE =
|
---|
| 448 | MT_DLL =
|
---|
| 449 | endif
|
---|
| 450 | endif
|
---|
| 451 |
|
---|
| 452 | ifeq ($(ARCH),win32gcc)
|
---|
| 453 | # Windows with gcc
|
---|
| 454 | DllSuf = dll
|
---|
| 455 | ExeSuf = .exe
|
---|
| 456 | CXX = g++
|
---|
| 457 | CXXFLAGS = $(OPT) -pipe -Wall -Woverloaded-virtual -I/usr/X11R6/include
|
---|
| 458 | LD = g++
|
---|
| 459 | LDFLAGS = $(OPT) -Wl,--enable-auto-import \
|
---|
| 460 | -Wl,--enable-runtime-pseudo-reloc \
|
---|
| 461 | -L/usr/X11R6/lib
|
---|
| 462 | SOFLAGS = -shared -Wl,--enable-auto-image-base \
|
---|
| 463 | -Wl,--export-all-symbols
|
---|
| 464 | EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
|
---|
| 465 | endif
|
---|
| 466 |
|
---|
| 467 | ifeq ($(CXX),)
|
---|
| 468 | $(error $(ARCH) invalid architecture)
|
---|
| 469 | endif
|
---|
| 470 |
|
---|
| 471 | CXXFLAGS += $(ROOTCFLAGS)
|
---|
| 472 | LDFLAGS += $(ROOTLDFLAGS)
|
---|
| 473 | LIBS = $(ROOTLIBS) $(SYSLIBS)
|
---|
| 474 | GLIBS = $(ROOTGLIBS) $(SYSLIBS)
|
---|
| 475 |
|
---|
| 476 | ifneq ($(ALTCC),)
|
---|
| 477 | CC = $(ALTCC)
|
---|
| 478 | endif
|
---|
| 479 | ifneq ($(ALTCXX),)
|
---|
| 480 | CXX = $(ALTCXX)
|
---|
| 481 | endif
|
---|
| 482 | ifneq ($(ALTF77),)
|
---|
| 483 | F77 = $(ALTF77)
|
---|
| 484 | endif
|
---|
| 485 | ifneq ($(ALTLD),)
|
---|
| 486 | LD = $(ALTLD)
|
---|
| 487 | endif
|
---|
| 488 |
|
---|
| 489 | ifneq ($(findstring g++, $(CXX)),)
|
---|
| 490 | GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1)
|
---|
| 491 | GCC_MINOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f2)
|
---|
| 492 | endif
|
---|