- Timestamp:
- Jun 4, 2008, 4:34:02 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/genMakefile.tcl
r2 r5 233 233 # Author: P. Demin - UCL, Louvain-la-Neuve 234 234 # 235 # multi-platform configuration is taken from ROOT (root/test/Makefile )235 # multi-platform configuration is taken from ROOT (root/test/Makefile.arch) 236 236 # 237 237 238 ARCH = $(shell root-config --arch) 239 240 CXX = 241 ObjSuf = o 238 include $(ROOTSYS)/test/Makefile.arch 239 240 ifeq ($(ARCH),macosx64) 241 UNDEFOPT = dynamic_lookup 242 endif 243 242 244 SrcSuf = cc 243 ExeSuf =244 DllSuf = so245 LibSuf = a246 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 = win32254 endif255 ifeq ($(ARCH),win32gdk)256 PLATFORM = win32257 endif258 259 ifeq ($(ARCH),hpux)260 # HP-UX with CC261 CXX = CC262 CXXFLAGS = -O +Z263 LD = CC264 LDFLAGS= -O +a1 -z265 SOFLAGS= -b266 DllSuf = sl267 endif268 269 ifeq ($(ARCH),hpuxacc)270 # HP-UX 10.x with aCC271 CXX = aCC272 CXXFLAGS = -O +Z273 LD = aCC274 LDFLAGS= -O -z275 SOFLAGS= -b276 endif277 278 ifeq ($(ARCH),hpuxia64acc)279 # HP-UX 11i 1.5 (IA-64) with aCC280 CXX = aCC281 CXXFLAGS = +DD64 -O +Z282 LD = aCC283 LDFLAGS= +DD64 -O -z284 SOFLAGS= -b285 endif286 287 ifeq ($(ARCH),hpuxegcs)288 # HP-UX 10.x with g++289 CXXFLAGS = -O -fPIC290 CXX = g++291 LD = g++292 LDFLAGS= -O293 SOFLAGS= -fPIC -shared294 endif295 296 297 ifeq ($(ARCH),hurddeb)298 # GNU/Hurd299 CXX = g++300 CXXFLAGS = -O -Wall -fPIC301 LD = g++302 LDFLAGS= -O303 SOFLAGS= -shared304 endif305 306 ifeq ($(ARCH),aix)307 # IBM AIX xlC 4.x308 CXX = xlC309 CXXFLAGS = -O310 LD = xlC311 LDFLAGS= -O312 SOFLAGS=313 ROOTLIBS := $(shell root-config --nonew --libs)314 ROOTGLIBS := $(shell root-config --nonew --glibs)315 endif316 317 ifeq ($(ARCH),aix5)318 # IBM AIX xlC 5.x319 CXX = xlC320 CXXFLAGS = -O321 LD = xlC322 LDFLAGS= -O323 SOFLAGS=324 ROOTLIBS := $(shell root-config --nonew --libs)325 ROOTGLIBS := $(shell root-config --nonew --glibs)326 endif327 328 ifeq ($(ARCH),aixegcs)329 # IBM AIX with GCC330 CXX = g++331 CXXFLAGS = -O332 LD = g++333 LDFLAGS= -O334 SOFLAGS= -shared335 endif336 337 ifeq ($(ARCH),solaris)338 # Solaris CC339 CXX = /opt/SUNWspro/bin/CC340 CXXFLAGS = -O -KPIC341 LD = /opt/SUNWspro/bin/CC342 LDFLAGS= -O343 SOFLAGS= -G344 endif345 346 ifeq ($(ARCH),solarisCC5)347 # Solaris CC 5.0348 CXX = CC349 CXXFLAGS = -O -KPIC350 LD = CC351 LDFLAGS= -O352 SOFLAGS= -G353 endif354 355 ifeq ($(ARCH),solarisegcs)356 # Solaris egcs357 CXX = g++358 CXXFLAGS = -O -fPIC359 LD = CC360 LDFLAGS= -O361 SOFLAGS= -shared362 endif363 364 ifeq ($(ARCH),solarisgcc)365 # Solaris gcc366 CXX = g++367 CXXFLAGS = -O -fPIC368 LD = g++369 LDFLAGS= -O370 SOFLAGS= -shared371 endif372 373 ifeq ($(ARCH),solariskcc)374 # Solaris kcc375 CXX = KCC --one_instantiation_per_object376 CXXFLAGS = -O4 -KPIC377 LD = KCC378 LDFLAGS= -O4379 SOFLAGS=380 endif381 382 ifeq ($(ARCH),solarisx86)383 # Solaris CC on Intel384 CXX = CC385 CXXFLAGS = -O -KPIC386 LD = CC387 LDFLAGS= -O388 SOFLAGS= -G389 endif390 391 ifeq ($(ARCH),sgicc)392 # SGI393 CXX = CC -n32 -I/usr/include/CC.sgi394 CXXFLAGS = -O395 LD = CC -n32 -I/usr/include/CC.sgi396 LDFLAGS= -O397 SOFLAGS= -shared398 endif399 400 ifeq ($(ARCH),sgiegcs)401 # SGI 6.x with EGCS402 CXX = g++403 CXXFLAGS = -O -Wall -fPIC404 LD = g++405 LDFLAGS= -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv406 SOFLAGS= -shared407 endif408 409 ifeq ($(ARCH),sgin32egcs)410 # SGI 6.x with EGCS for n32 ABI411 CXX = g++412 CXXFLAGS = -O -Wall -fPIC413 LD = g++414 LDFLAGS= -O -L/usr/lib32 -Wl,-woff,134415 SOFLAGS= -shared416 endif417 418 ifeq ($(ARCH),sgigcc)419 # SGI with GCC420 CXX = g++421 CXXFLAGS = -O -Wall -fPIC422 LD = g++423 LDFLAGS= -O -Wl,-u,__builtin_new -Wl,-u,__builtin_delete -Wl,-u,__nw__FUiPv424 SOFLAGS= -shared425 endif426 427 ifeq ($(ARCH),sgikcc)428 # SGI with KCC429 CXX = KCC -n32 --one_instantiation_per_object430 CXXFLAGS = -O431 LD = KCC -n32432 LDFLAGS= -O433 SOFLAGS=434 endif435 436 ifeq ($(ARCH),alphagcc)437 # Alpha/OSF with g++438 CXX = g++439 CXXFLAGS = -O -Wall -fPIC440 LD = g++441 LDFLAGS= -O442 SOFLAGS= -Wl,-expect_unresolved,* -shared443 endif444 445 ifeq ($(ARCH),alphaegcs)446 # Alpha/OSF with egcs447 CXX = g++448 CXXFLAGS = -O -Wall -fPIC449 LD = g++450 LDFLAGS= -O451 SOFLAGS= -Wl,-expect_unresolved,* -shared452 endif453 454 ifeq ($(ARCH),alphakcc)455 # Alpha/OSF with kai compiler (not yet valid)456 CXX = KCC --one_instantiation_per_object457 CXXFLAGS = -O -fPIC458 LD = KCC459 LDFLAGS= -O460 SOFLAGS= -Wl,-expect_unresolved,* -shared461 endif462 463 ifeq ($(ARCH),alphacxx6)464 # Alpha/OSF with cxx6465 CXX = cxx466 CXXFLAGS = -O467 LD = cxx468 LDFLAGS= -O469 SOFLAGS= -shared -nocxxstd -Wl,-expect_unresolved,*,-msym470 endif471 472 ifeq ($(ARCH),alphacxx)473 # Alpha/OSF with cxx5474 CXX = cxx475 CXXFLAGS = -O476 LD = cxx477 LDFLAGS= -O478 SOFLAGS= -Wl,-expect_unresolved,* -call_shared479 endif480 481 ifeq ($(ARCH),linuxrh51)482 # Linux with gcc 2.7.2.x483 CXX = g++484 CXXFLAGS = -O -Wall -fPIC485 LD = g++486 LDFLAGS= -O487 SOFLAGS= -shared488 AR = ar489 ARFLAGS = cru490 RANLIB = ranlib491 endif492 493 ifeq ($(ARCH),linuxrh42)494 # Linux with gcc 2.7.2.x (RedHat 4.2)495 CXX = g++496 CXXFLAGS = -O -Wall -fPIC497 LD = g++498 LDFLAGS= -O499 SOFLAGS= -shared500 AR = ar501 ARFLAGS = cru502 RANLIB = ranlib503 endif504 505 ifeq ($(ARCH),linuxdeb)506 # Linux with gcc 2.7.2.x507 CXX = g++508 CXXFLAGS = -O -Wall -fPIC509 LD = g++510 LDFLAGS= -O511 SOFLAGS= -shared512 AR = ar513 ARFLAGS = cru514 RANLIB = ranlib515 endif516 517 ifeq ($(ARCH),linuxdeb2)518 # Linux with gcc 2.7.2.x519 CXX = g++520 CXXFLAGS = -O -Wall -fPIC521 LD = g++522 LDFLAGS= -O523 SOFLAGS= -shared524 AR = ar525 ARFLAGS = cru526 RANLIB = ranlib527 endif528 529 ifeq ($(ARCH),linuxdeb2ppc)530 # Debian/Linux on the PowerPC531 CXX = g++532 CXXFLAGS = -O -Wall -fPIC533 LD = g++534 LDFLAGS= -O535 SOFLAGS= -shared536 AR = ar537 ARFLAGS = cru538 RANLIB = ranlib539 endif540 541 542 ifeq ($(ARCH),linuxsuse6)543 # Linux with gcc 2.7.2.x544 CXX = g++545 CXXFLAGS = -O -Wall -fPIC546 LD = g++547 LDFLAGS= -O548 SOFLAGS= -shared549 AR = ar550 ARFLAGS = cru551 RANLIB = ranlib552 endif553 554 ifeq ($(ARCH),linux)555 # Linux with egcs, gcc 2.9x, gcc 3.x (>= RedHat 5.2)556 CXX = g++557 CXXFLAGS = -O -Wall -fPIC558 LD = g++559 LDFLAGS= -O560 SOFLAGS= -shared561 AR = ar562 ARFLAGS = cru563 RANLIB = ranlib564 endif565 566 ifeq ($(ARCH),linuxkcc)567 # Linux with the KAI compiler568 CXX = KCC --one_instantiation_per_object569 CXXFLAGS = -fPIC +K0570 LD = KCC571 LDFLAGS= -O $(shell root-config --cflags)572 SOFLAGS=573 AR = ar574 ARFLAGS = cru575 RANLIB = ranlib576 endif577 578 ifeq ($(ARCH),linuxicc)579 # Linux with Intel icc compiler580 CXX = icc581 CXXFLAGS = -O582 LD = icc583 LDFLAGS= -O584 SOFLAGS= -shared585 AR = ar586 ARFLAGS = cru587 RANLIB = ranlib588 endif589 590 ifeq ($(ARCH),linuxppcegcs)591 # MkLinux with egcs/glibc592 CXX = g++593 CXXFLAGS = -O -Wall -fPIC594 LD = g++595 LDFLAGS= -O596 SOFLAGS= -shared597 AR = ar598 ARFLAGS = cru599 RANLIB = ranlib600 endif601 602 ifeq ($(ARCH),linuxia64gcc)603 # Itanium Linux with gcc 2.9x604 CXX = g++605 CXXFLAGS = -O -Wall -fPIC606 LD = g++607 LDFLAGS= -O608 SOFLAGS= -shared609 AR = ar610 ARFLAGS = cru611 RANLIB = ranlib612 endif613 614 ifeq ($(ARCH),linuxia64sgi)615 # Itanium Linux with sgiCC616 CXX = sgiCC617 CXXFLAGS = -O -Wall -fPIC618 LD = gsgiCC619 LDFLAGS= -O620 SOFLAGS= -shared621 AR = ar622 ARFLAGS = cru623 RANLIB = ranlib624 endif625 626 ifeq ($(ARCH),linuxia64ecc)627 # Itanium Linux with Intel ecc628 CXX = ecc629 CXXFLAGS = -O630 LD = ecc631 LDFLAGS= -O -i_dynamic632 SOFLAGS= -shared633 AR = ar634 ARFLAGS = cru635 RANLIB = ranlib636 endif637 638 ifeq ($(ARCH),linuxx8664gcc)639 # AMD Opteron (64 bit mode) Linux with gcc 3.x640 CXX = g++641 CXXFLAGS = -O -Wall -fPIC642 LD = g++643 LDFLAGS= -O644 SOFLAGS= -shared645 AR = ar646 ARFLAGS = cru647 RANLIB = ranlib648 endif649 650 ifeq ($(ARCH),linuxalphaegcs)651 # Alpha Linux with egcs652 CXX = g++653 CXXFLAGS = -O -Wall -fPIC654 LD = g++655 LDFLAGS= -O656 SOFLAGS= -shared657 AR = ar658 ARFLAGS = cru659 RANLIB = ranlib660 endif661 662 ifeq ($(ARCH),linuxarm)663 # ARM Linux with egcs664 CXX = g++665 CXXFLAGS = -O -Wall -fPIC666 LD = g++667 LDFLAGS= -O668 SOFLAGS= -shared669 AR = ar670 ARFLAGS = cru671 RANLIB = ranlib672 endif673 674 ifeq ($(ARCH),mklinux)675 # MkLinux with libc5676 CXX = g++677 CXXFLAGS = -O -Wall -fPIC678 LD = g++679 LDFLAGS= -O680 SOFLAGS= -shared681 AR = ar682 ARFLAGS = cru683 RANLIB = ranlib684 endif685 686 ifeq ($(ARCH),freebsd)687 # FreeBSD with libc5688 CXX = g++689 CXXFLAGS = -O -pipe -W -Wall -fPIC690 LD = g++691 LDFLAGS= -O692 SOFLAGS= -shared -Wl,-x693 AR = ar694 ARFLAGS = cru -crv695 RANLIB = ranlib696 endif697 698 ifeq ($(ARCH),freebsd4)699 # FreeBSD with glibc700 CXX = g++701 CXXFLAGS = -O -pipe -W -Wall -fPIC702 LD = g++703 LDFLAGS= -O704 SOFLAGS= -shared -Wl,-x705 AR = ar706 ARFLAGS = cru -crv707 RANLIB = ranlib708 endif709 710 ifeq ($(ARCH),macosx)711 # MacOS X with cc (GNU cc 2.95.2)712 CXX = c++713 CXXFLAGS = -O -pipe -Wall714 LD = c++715 LDFLAGS= -O -Xlinker -bind_at_load -flat_namespace716 # The SOFLAGS will be used to create the .dylib; the .so will717 # be created separately718 DllSuf = dylib719 SOFLAGS= -dynamiclib -flat_namespace -undefined suppress720 AR = ar721 ARFLAGS = cru -crv722 RANLIB = ranlib723 endif724 725 ifeq ($(ARCH),hiux)726 # Hitachi HIUX727 CXX = g++728 CXXFLAGS = -O2 -fPIC729 LD = g++730 LDFLAGS= -Wl,+s731 SOFLAGS= -Wl,-b,-E -nostdlib -nostartfiles732 DllSuf = sl733 endif734 735 ifeq ($(PLATFORM),win32)736 # Windows with the VC++ compiler737 ObjSuf = obj738 SrcSuf = cxx739 ExeSuf = .exe740 DllSuf = dll741 OutPutOpt = -out:742 CXX = cl743 CXXOPT = -O2744 #CXXOPT = -Z7745 CXXFLAGS = $(CXXOPT) -G5 -GR -GX -MD -DWIN32 -D_WINDOWS -nologo \746 -DVISUAL_CPLUSPLUS -D_X86_=1 -D_DLL747 LD = link748 LDOPT = -opt:ref749 #LDOPT = -debug750 LDFLAGS= $(LDOPT) -pdb:none -nologo751 SOFLAGS= -DLL752 753 ROOTLIBS := $(shell root-config --nonew --libs)754 ROOTGLIBS := $(shell root-config --nonew --glibs)755 EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)756 endif757 758 ifeq ($(ARCH),win32gcc)759 # Windows with gcc760 DllSuf = dll761 ExeSuf = .exe762 CXX = g++763 CXXFLAGS = -O -Wall -Woverloaded-virtual -I/usr/X11R6/include764 LD = g++765 LDFLAGS= -O -Wl,--enable-auto-import766 SOFLAGS= -shared -D_DLL -Wl,--export-all-symbols767 EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)768 AR = ar769 ARFLAGS = cru770 RANLIB = ranlib771 endif772 773 ifeq ($(CXX),)774 $(error $(ARCH) invalid architecture)775 endif776 245 777 246 CXXFLAGS += $(ROOTCFLAGS) -DDROP_CGAL -I. -Itcl -Imcfio -Istdhep -ICDFCones -ICDFCones/CDFcode 778 LIBS = $(ROOTLIBS) -lEG$(SYSLIBS)247 LIBS = $(ROOTLIBS) $(SYSLIBS) 779 248 GLIBS = $(ROOTGLIBS) $(SYSLIBS) 780 249 … … 822 291 823 292 $(SHARED): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) 824 825 293 @mkdir -p $(@D) 294 @echo ">> Building $@" 826 295 ifeq ($(ARCH),aix) 827 @/usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt)$@ $(LIBS) -p 0 $^296 @/usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^ 828 297 else 829 298 ifeq ($(ARCH),aix5) 830 @/usr/vacpp/bin/makeC++SharedLib $(OutPutOpt)$@ $(LIBS) -p 0 $^299 @/usr/vacpp/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^ 831 300 else 832 ifeq ($( ARCH),macosx)301 ifeq ($(PLATFORM),macosx) 833 302 # 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,$@) 837 305 else 838 306 ifeq ($(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) 844 311 else 845 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS) 312 @$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) $@ $(EXPLLINKLIBS) 313 @$(MT_DLL) 846 314 endif 847 315 endif … … 850 318 851 319 clean: 852 320 @rm -f $(PGS_DICT_OBJ) $(PGS_SOURCE_OBJ) $(PGS_OBJ) $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ) $(STDHEP_OBJ) core 853 321 854 322 distclean: clean 855 323 @rm -f $(SHARED) $(STATIC) $(EXECUTABLE) $(STDHEP_EXECUTABLE) 856 324 857 325 ###
Note:
See TracChangeset
for help on using the changeset viewer.