Ignore:
Timestamp:
Jun 4, 2008, 4:34:02 PM (16 years ago)
Author:
Pavel Demin
Message:

include root/test/Makefile.arch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/genMakefile.tcl

    r2 r5  
    233233# Author: P. Demin - UCL, Louvain-la-Neuve
    234234#
    235 # multi-platform configuration is taken from ROOT (root/test/Makefile)
     235# multi-platform configuration is taken from ROOT (root/test/Makefile.arch)
    236236#
    237237
    238 ARCH   = $(shell root-config --arch)
    239 
    240 CXX    =
    241 ObjSuf = o
     238include $(ROOTSYS)/test/Makefile.arch
     239
     240ifeq ($(ARCH),macosx64)
     241UNDEFOPT = dynamic_lookup
     242endif
     243
    242244SrcSuf = cc
    243 ExeSuf =
    244 DllSuf = so
    245 LibSuf = a
    246 OutPutOpt     = -o # keep whitespace after "-o"
    247 
    248 ROOTCFLAGS   := $(shell root-config --cflags)
    249 ROOTLIBS     := $(shell root-config --libs)
    250 ROOTGLIBS    := $(shell root-config --glibs)
    251 
    252 ifeq ($(ARCH),win32)
    253 PLATFORM      = win32
    254 endif
    255 ifeq ($(ARCH),win32gdk)
    256 PLATFORM      = win32
    257 endif
    258 
    259 ifeq ($(ARCH),hpux)
    260 # HP-UX with CC
    261 CXX    = CC
    262 CXXFLAGS      = -O +Z
    263 LD     = CC
    264 LDFLAGS= -O +a1 -z
    265 SOFLAGS= -b
    266 DllSuf = sl
    267 endif
    268 
    269 ifeq ($(ARCH),hpuxacc)
    270 # HP-UX 10.x with aCC
    271 CXX    = aCC
    272 CXXFLAGS      = -O +Z
    273 LD     = aCC
    274 LDFLAGS= -O -z
    275 SOFLAGS= -b
    276 endif
    277 
    278 ifeq ($(ARCH),hpuxia64acc)
    279 # HP-UX 11i 1.5 (IA-64) with aCC
    280 CXX    = aCC
    281 CXXFLAGS      = +DD64 -O +Z
    282 LD     = aCC
    283 LDFLAGS= +DD64 -O -z
    284 SOFLAGS= -b
    285 endif
    286 
    287 ifeq ($(ARCH),hpuxegcs)
    288 # HP-UX 10.x with g++
    289 CXXFLAGS      = -O -fPIC
    290 CXX    = g++
    291 LD     = g++
    292 LDFLAGS= -O
    293 SOFLAGS= -fPIC -shared
    294 endif
    295 
    296 
    297 ifeq ($(ARCH),hurddeb)
    298 # GNU/Hurd
    299 CXX    = g++
    300 CXXFLAGS      = -O -Wall -fPIC
    301 LD     = g++
    302 LDFLAGS= -O
    303 SOFLAGS= -shared
    304 endif
    305 
    306 ifeq ($(ARCH),aix)
    307 # IBM AIX xlC 4.x
    308 CXX    = xlC
    309 CXXFLAGS      = -O
    310 LD     = xlC
    311 LDFLAGS= -O
    312 SOFLAGS=
    313 ROOTLIBS     := $(shell root-config --nonew --libs)
    314 ROOTGLIBS    := $(shell root-config --nonew --glibs)
    315 endif
    316 
    317 ifeq ($(ARCH),aix5)
    318 # IBM AIX xlC 5.x
    319 CXX    = xlC
    320 CXXFLAGS      = -O
    321 LD     = xlC
    322 LDFLAGS= -O
    323 SOFLAGS=
    324 ROOTLIBS     := $(shell root-config --nonew --libs)
    325 ROOTGLIBS    := $(shell root-config --nonew --glibs)
    326 endif
    327 
    328 ifeq ($(ARCH),aixegcs)
    329 # IBM AIX with GCC
    330 CXX    = g++
    331 CXXFLAGS      = -O
    332 LD     = g++
    333 LDFLAGS= -O
    334 SOFLAGS= -shared
    335 endif
    336 
    337 ifeq ($(ARCH),solaris)
    338 # Solaris CC
    339 CXX    = /opt/SUNWspro/bin/CC
    340 CXXFLAGS      = -O -KPIC
    341 LD     = /opt/SUNWspro/bin/CC
    342 LDFLAGS= -O
    343 SOFLAGS= -G
    344 endif
    345 
    346 ifeq ($(ARCH),solarisCC5)
    347 # Solaris CC 5.0
    348 CXX    = CC
    349 CXXFLAGS      = -O -KPIC
    350 LD     = CC
    351 LDFLAGS= -O
    352 SOFLAGS= -G
    353 endif
    354 
    355 ifeq ($(ARCH),solarisegcs)
    356 # Solaris egcs
    357 CXX    = g++
    358 CXXFLAGS      = -O -fPIC
    359 LD     = CC
    360 LDFLAGS= -O
    361 SOFLAGS= -shared
    362 endif
    363 
    364 ifeq ($(ARCH),solarisgcc)
    365 # Solaris gcc
    366 CXX    = g++
    367 CXXFLAGS      = -O -fPIC
    368 LD     = g++
    369 LDFLAGS= -O
    370 SOFLAGS= -shared
    371 endif
    372 
    373 ifeq ($(ARCH),solariskcc)
    374 # Solaris kcc
    375 CXX    = KCC --one_instantiation_per_object
    376 CXXFLAGS      = -O4 -KPIC
    377 LD     = KCC
    378 LDFLAGS= -O4
    379 SOFLAGS=
    380 endif
    381 
    382 ifeq ($(ARCH),solarisx86)
    383 # Solaris CC on Intel
    384 CXX    = CC
    385 CXXFLAGS      = -O -KPIC
    386 LD     = CC
    387 LDFLAGS= -O
    388 SOFLAGS= -G
    389 endif
    390 
    391 ifeq ($(ARCH),sgicc)
    392 # SGI
    393 CXX    = CC -n32  -I/usr/include/CC.sgi
    394 CXXFLAGS      = -O
    395 LD     = CC -n32  -I/usr/include/CC.sgi
    396 LDFLAGS= -O
    397 SOFLAGS= -shared
    398 endif
    399 
    400 ifeq ($(ARCH),sgiegcs)
    401 # SGI 6.x with EGCS
    402 CXX    = g++
    403 CXXFLAGS      = -O -Wall -fPIC
    404 LD     = g++
    405 LDFLAGS= -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
    406 SOFLAGS= -shared
    407 endif
    408 
    409 ifeq ($(ARCH),sgin32egcs)
    410 # SGI 6.x with EGCS for n32 ABI
    411 CXX    = g++
    412 CXXFLAGS      = -O -Wall -fPIC
    413 LD     = g++
    414 LDFLAGS= -O -L/usr/lib32 -Wl,-woff,134
    415 SOFLAGS= -shared
    416 endif
    417 
    418 ifeq ($(ARCH),sgigcc)
    419 # SGI with GCC
    420 CXX    = g++
    421 CXXFLAGS      = -O -Wall -fPIC
    422 LD     = g++
    423 LDFLAGS= -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv
    424 SOFLAGS= -shared
    425 endif
    426 
    427 ifeq ($(ARCH),sgikcc)
    428 # SGI with KCC
    429 CXX    = KCC -n32 --one_instantiation_per_object
    430 CXXFLAGS      = -O
    431 LD     = KCC -n32
    432 LDFLAGS= -O
    433 SOFLAGS=
    434 endif
    435 
    436 ifeq ($(ARCH),alphagcc)
    437 # Alpha/OSF with g++
    438 CXX    = g++
    439 CXXFLAGS      = -O -Wall -fPIC
    440 LD     = g++
    441 LDFLAGS= -O
    442 SOFLAGS= -Wl,-expect_unresolved,* -shared
    443 endif
    444 
    445 ifeq ($(ARCH),alphaegcs)
    446 # Alpha/OSF with egcs
    447 CXX    = g++
    448 CXXFLAGS      = -O -Wall -fPIC
    449 LD     = g++
    450 LDFLAGS= -O
    451 SOFLAGS= -Wl,-expect_unresolved,* -shared
    452 endif
    453 
    454 ifeq ($(ARCH),alphakcc)
    455 # Alpha/OSF with kai compiler (not yet valid)
    456 CXX    = KCC --one_instantiation_per_object
    457 CXXFLAGS      = -O -fPIC
    458 LD     = KCC
    459 LDFLAGS= -O
    460 SOFLAGS= -Wl,-expect_unresolved,* -shared
    461 endif
    462 
    463 ifeq ($(ARCH),alphacxx6)
    464 # Alpha/OSF with cxx6
    465 CXX    = cxx
    466 CXXFLAGS      = -O
    467 LD     = cxx
    468 LDFLAGS= -O
    469 SOFLAGS= -shared -nocxxstd -Wl,-expect_unresolved,*,-msym
    470 endif
    471 
    472 ifeq ($(ARCH),alphacxx)
    473 # Alpha/OSF with cxx5
    474 CXX    = cxx
    475 CXXFLAGS      = -O
    476 LD     = cxx
    477 LDFLAGS= -O
    478 SOFLAGS= -Wl,-expect_unresolved,* -call_shared
    479 endif
    480 
    481 ifeq ($(ARCH),linuxrh51)
    482 # Linux with gcc 2.7.2.x
    483 CXX    = g++
    484 CXXFLAGS      = -O -Wall -fPIC
    485 LD     = g++
    486 LDFLAGS= -O
    487 SOFLAGS= -shared
    488 AR = ar
    489 ARFLAGS = cru
    490 RANLIB = ranlib
    491 endif
    492 
    493 ifeq ($(ARCH),linuxrh42)
    494 # Linux with gcc 2.7.2.x (RedHat 4.2)
    495 CXX    = g++
    496 CXXFLAGS      = -O -Wall -fPIC
    497 LD     = g++
    498 LDFLAGS= -O
    499 SOFLAGS= -shared
    500 AR = ar
    501 ARFLAGS = cru
    502 RANLIB = ranlib
    503 endif
    504 
    505 ifeq ($(ARCH),linuxdeb)
    506 # Linux with gcc 2.7.2.x
    507 CXX    = g++
    508 CXXFLAGS      = -O -Wall -fPIC
    509 LD     = g++
    510 LDFLAGS= -O
    511 SOFLAGS= -shared
    512 AR = ar
    513 ARFLAGS = cru
    514 RANLIB = ranlib
    515 endif
    516 
    517 ifeq ($(ARCH),linuxdeb2)
    518 # Linux with gcc 2.7.2.x
    519 CXX    = g++
    520 CXXFLAGS      = -O -Wall -fPIC
    521 LD     = g++
    522 LDFLAGS= -O
    523 SOFLAGS= -shared
    524 AR = ar
    525 ARFLAGS = cru
    526 RANLIB = ranlib
    527 endif
    528 
    529 ifeq ($(ARCH),linuxdeb2ppc)
    530 # Debian/Linux on the PowerPC
    531 CXX    = g++
    532 CXXFLAGS      = -O -Wall -fPIC
    533 LD     = g++
    534 LDFLAGS= -O
    535 SOFLAGS= -shared
    536 AR = ar
    537 ARFLAGS = cru
    538 RANLIB = ranlib
    539 endif
    540 
    541 
    542 ifeq ($(ARCH),linuxsuse6)
    543 # Linux with gcc 2.7.2.x
    544 CXX    = g++
    545 CXXFLAGS      = -O -Wall -fPIC
    546 LD     = g++
    547 LDFLAGS= -O
    548 SOFLAGS= -shared
    549 AR = ar
    550 ARFLAGS = cru
    551 RANLIB = ranlib
    552 endif
    553 
    554 ifeq ($(ARCH),linux)
    555 # Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)
    556 CXX    = g++
    557 CXXFLAGS      = -O -Wall -fPIC
    558 LD     = g++
    559 LDFLAGS= -O
    560 SOFLAGS= -shared
    561 AR = ar
    562 ARFLAGS = cru
    563 RANLIB = ranlib
    564 endif
    565 
    566 ifeq ($(ARCH),linuxkcc)
    567 # Linux with the KAI compiler
    568 CXX    = KCC --one_instantiation_per_object
    569 CXXFLAGS      = -fPIC +K0
    570 LD     = KCC
    571 LDFLAGS= -O $(shell root-config --cflags)
    572 SOFLAGS=
    573 AR = ar
    574 ARFLAGS = cru
    575 RANLIB = ranlib
    576 endif
    577 
    578 ifeq ($(ARCH),linuxicc)
    579 # Linux with Intel icc compiler
    580 CXX    = icc
    581 CXXFLAGS      = -O
    582 LD     = icc
    583 LDFLAGS= -O
    584 SOFLAGS= -shared
    585 AR = ar
    586 ARFLAGS = cru
    587 RANLIB = ranlib
    588 endif
    589 
    590 ifeq ($(ARCH),linuxppcegcs)
    591 # MkLinux with egcs/glibc
    592 CXX    = g++
    593 CXXFLAGS      = -O -Wall -fPIC
    594 LD     = g++
    595 LDFLAGS= -O
    596 SOFLAGS= -shared
    597 AR = ar
    598 ARFLAGS = cru
    599 RANLIB = ranlib
    600 endif
    601 
    602 ifeq ($(ARCH),linuxia64gcc)
    603 # Itanium Linux with gcc 2.9x
    604 CXX    = g++
    605 CXXFLAGS      = -O -Wall -fPIC
    606 LD     = g++
    607 LDFLAGS= -O
    608 SOFLAGS= -shared
    609 AR = ar
    610 ARFLAGS = cru
    611 RANLIB = ranlib
    612 endif
    613 
    614 ifeq ($(ARCH),linuxia64sgi)
    615 # Itanium Linux with sgiCC
    616 CXX    = sgiCC
    617 CXXFLAGS      = -O -Wall -fPIC
    618 LD     = gsgiCC
    619 LDFLAGS= -O
    620 SOFLAGS= -shared
    621 AR = ar
    622 ARFLAGS = cru
    623 RANLIB = ranlib
    624 endif
    625 
    626 ifeq ($(ARCH),linuxia64ecc)
    627 # Itanium Linux with Intel ecc
    628 CXX    = ecc
    629 CXXFLAGS      = -O
    630 LD     = ecc
    631 LDFLAGS= -O -i_dynamic
    632 SOFLAGS= -shared
    633 AR = ar
    634 ARFLAGS = cru
    635 RANLIB = ranlib
    636 endif
    637 
    638 ifeq ($(ARCH),linuxx8664gcc)
    639 # AMD Opteron (64 bit mode) Linux with gcc 3.x
    640 CXX    = g++
    641 CXXFLAGS      = -O -Wall -fPIC
    642 LD     = g++
    643 LDFLAGS= -O
    644 SOFLAGS= -shared
    645 AR = ar
    646 ARFLAGS = cru
    647 RANLIB = ranlib
    648 endif
    649 
    650 ifeq ($(ARCH),linuxalphaegcs)
    651 # Alpha Linux with egcs
    652 CXX    = g++
    653 CXXFLAGS      = -O -Wall -fPIC
    654 LD     = g++
    655 LDFLAGS= -O
    656 SOFLAGS= -shared
    657 AR = ar
    658 ARFLAGS = cru
    659 RANLIB = ranlib
    660 endif
    661 
    662 ifeq ($(ARCH),linuxarm)
    663 # ARM Linux with egcs
    664 CXX    = g++
    665 CXXFLAGS      = -O -Wall -fPIC
    666 LD     = g++
    667 LDFLAGS= -O
    668 SOFLAGS= -shared
    669 AR = ar
    670 ARFLAGS = cru
    671 RANLIB = ranlib
    672 endif
    673 
    674 ifeq ($(ARCH),mklinux)
    675 # MkLinux with libc5
    676 CXX    = g++
    677 CXXFLAGS      = -O -Wall -fPIC
    678 LD     = g++
    679 LDFLAGS= -O
    680 SOFLAGS= -shared
    681 AR = ar
    682 ARFLAGS = cru
    683 RANLIB = ranlib
    684 endif
    685 
    686 ifeq ($(ARCH),freebsd)
    687 # FreeBSD with libc5
    688 CXX    = g++
    689 CXXFLAGS      = -O -pipe -W -Wall -fPIC
    690 LD     = g++
    691 LDFLAGS= -O
    692 SOFLAGS= -shared -Wl,-x
    693 AR = ar
    694 ARFLAGS = cru -crv
    695 RANLIB = ranlib
    696 endif
    697 
    698 ifeq ($(ARCH),freebsd4)
    699 # FreeBSD with glibc
    700 CXX    = g++
    701 CXXFLAGS      = -O -pipe -W -Wall -fPIC
    702 LD     = g++
    703 LDFLAGS= -O
    704 SOFLAGS= -shared -Wl,-x
    705 AR = ar
    706 ARFLAGS = cru -crv
    707 RANLIB = ranlib
    708 endif
    709 
    710 ifeq ($(ARCH),macosx)
    711 # MacOS X with cc (GNU cc 2.95.2)
    712 CXX    = c++
    713 CXXFLAGS      = -O -pipe -Wall
    714 LD     = c++
    715 LDFLAGS= -O -Xlinker -bind_at_load -flat_namespace
    716 # The SOFLAGS will be used to create the .dylib; the .so will
    717 # be created separately
    718 DllSuf = dylib
    719 SOFLAGS= -dynamiclib -flat_namespace -undefined suppress
    720 AR = ar
    721 ARFLAGS = cru -crv
    722 RANLIB = ranlib
    723 endif
    724 
    725 ifeq ($(ARCH),hiux)
    726 # Hitachi HIUX
    727 CXX    = g++
    728 CXXFLAGS      = -O2 -fPIC
    729 LD     = g++
    730 LDFLAGS= -Wl,+s
    731 SOFLAGS= -Wl,-b,-E -nostdlib -nostartfiles
    732 DllSuf = sl
    733 endif
    734 
    735 ifeq ($(PLATFORM),win32)
    736 # Windows with the VC++ compiler
    737 ObjSuf = obj
    738 SrcSuf = cxx
    739 ExeSuf = .exe
    740 DllSuf = dll
    741 OutPutOpt     = -out:
    742 CXX    = cl
    743 CXXOPT = -O2
    744 #CXXOPT = -Z7
    745 CXXFLAGS      = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \
    746   -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL
    747 LD     = link
    748 LDOPT  = -opt:ref
    749 #LDOPT  = -debug
    750 LDFLAGS= $(LDOPT) -pdb:none -nologo
    751 SOFLAGS= -DLL
    752 
    753 ROOTLIBS     := $(shell root-config --nonew --libs)
    754 ROOTGLIBS    := $(shell root-config --nonew --glibs)
    755 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
    756 endif
    757 
    758 ifeq ($(ARCH),win32gcc)
    759 # Windows with gcc
    760 DllSuf = dll
    761 ExeSuf = .exe
    762 CXX    = g++
    763 CXXFLAGS      = -O -Wall -Woverloaded-virtual -I/usr/X11R6/include
    764 LD     = g++
    765 LDFLAGS= -O -Wl,--enable-auto-import
    766 SOFLAGS= -shared -D_DLL -Wl,--export-all-symbols
    767 EXPLLINKLIBS  = $(ROOTLIBS) $(ROOTGLIBS)
    768 AR = ar
    769 ARFLAGS = cru
    770 RANLIB = ranlib
    771 endif
    772 
    773 ifeq ($(CXX),)
    774 $(error $(ARCH) invalid architecture)
    775 endif
    776245
    777246CXXFLAGS += $(ROOTCFLAGS) -DDROP_CGAL -I. -Itcl -Imcfio -Istdhep -ICDFCones -ICDFCones/CDFcode
    778 LIBS = $(ROOTLIBS) -lEG $(SYSLIBS)
     247LIBS = $(ROOTLIBS) $(SYSLIBS)
    779248GLIBS = $(ROOTGLIBS) $(SYSLIBS)
    780249       
     
    822291
    823292$(SHARED): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
    824                 @mkdir -p $(@D)
    825                 @echo ">> Building $@"
     293        @mkdir -p $(@D)
     294        @echo ">> Building $@"
    826295ifeq ($(ARCH),aix)
    827                 @/usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt)$@ $(LIBS) -p 0 $^
     296        @/usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^
    828297else
    829298ifeq ($(ARCH),aix5)
    830                 @/usr/vacpp/bin/makeC++SharedLib $(OutPutOpt)$@ $(LIBS) -p 0 $^
     299        @/usr/vacpp/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^
    831300else
    832 ifeq ($(ARCH),macosx)
     301ifeq ($(PLATFORM),macosx)
    833302# We need to make both the .dylib and the .so
    834                 @$(LD) $(SOFLAGS) $^ $(OutPutOpt)$@
    835                 @$(LD) -bundle -undefined suppress $(LDFLAGS) $^ $(LIBS) \
    836                    $(OutPutOpt)$(subst .$(DllSuf),.so,$@)
     303        @$(LD) $(SOFLAGS) $^ $(OutPutOpt) $@
     304        @$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
    837305else
    838306ifeq ($(PLATFORM),win32)
    839                 @bindexplib $* $^ > $*.def
    840                 @lib -nologo -MACHINE:IX86 $^ -def:$*.def \
    841                    $(OutPutOpt)$(EVENTLIB)
    842                 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) \
    843                    $(OutPutOpt)$@
     307        @bindexplib $* $^ > $*.def
     308        @lib -nologo -MACHINE:IX86 $^ -def:$*.def $(OutPutOpt)$(EVENTLIB)
     309        @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(LIBS) $(OutPutOpt)$@
     310        @$(MT_DLL)
    844311else
    845                 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
     312        @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS)
     313        @$(MT_DLL)
    846314endif
    847315endif
     
    850318
    851319clean:
    852                 @rm -f $(PGS_DICT_OBJ) $(PGS_SOURCE_OBJ) $(PGS_OBJ) $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) $(STDHEP_OBJ) core
     320        @rm -f $(PGS_DICT_OBJ) $(PGS_SOURCE_OBJ) $(PGS_OBJ) $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) $(STDHEP_OBJ) core
    853321
    854322distclean: clean
    855                 @rm -f $(SHARED) $(STATIC) $(EXECUTABLE) $(STDHEP_EXECUTABLE)
     323        @rm -f $(SHARED) $(STATIC) $(EXECUTABLE) $(STDHEP_EXECUTABLE)
    856324
    857325###
Note: See TracChangeset for help on using the changeset viewer.