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