Changeset 776 for trunk/geant4


Ignore:
Timestamp:
Apr 17, 2008, 11:32:32 AM (16 years ago)
Author:
garnier
Message:

r785@wl-72126: garnier | 2008-04-17 11:30:37 +0200
une version qui marche avec les moc

Location:
trunk/geant4
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/config/G4VIS_USE.gmk

    r766 r776  
    7676    CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
    7777  endif
    78   VISLIBS  += -lG4OpenGL
     78  VISLIBS  += -lXX -lG4OpenGL -lXX
    7979  INC_GL    = 1
    8080  LOAD_GL   = 1
  • trunk/geant4/config/binmake.gmk

    r689 r776  
    242242          < $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
    243243  else
    244     LDLIBS2 = $(shell \
     244    LDLIBS2 = -DNO_G4INCLUDE_EXEC $(shell \
    245245        G4TMP=$(G4TMP); export G4TMP; \
    246246        if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
     
    282282else
    283283# Again, do not use := or +=.  See note on LDLIBS2 above.
    284   LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
     284  LDLIBS_PREFINAL = $(LDLIBS1) -DLDLIBS2_END $(LDLIBS2) -DLDLIBS2_END $(LDLIBS2EXTRA) $(LDLIBS3)
    285285# Version leaving out EXTRALIBS
    286286  LDLIBS_KERNEL   = $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
    287287endif
    288 LDLIBS_PREFINAL += $(LDLIBS4)
     288LDLIBS_PREFINAL += -DLDLIBS4 $(LDLIBS4) -DLDLIBS_END4
    289289LDLIBS_KERNEL   += $(LDLIBS4)
    290290
     
    308308else
    309309  # Unix
    310   LDLIBS = $(TARGETLIB) $(LDLIBS_PREFINAL)
     310  LDLIBS = $(TARGETLIB) -DLDLIBS_PREFINAL $(LDLIBS_PREFINAL) -DLDLIBS_PREFINAL_END
    311311  OUT   := -o
    312312endif
  • trunk/geant4/config/common.gmk

    r766 r776  
    55# Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96.
    66# Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98.
    7 # Introduced Qt moc rule, L.Garnier 15/2/08.
    87
    98ifndef G4LIBDIR
     
    1413sources := $(wildcard src/*.cc)
    1514
    16 ifneq ($(G4INTY_BUILD_QT),)
    17   moc_inc = $(shell grep -l "Q_OBJECT" include/*.hh )
    18   moc_files := $(patsubst include/%.hh, src/%_moc.cc, $(moc_inc))
    19   sources += $(moc_files)
    20 endif
     15#ifneq ($(G4INTY_BUILD_QT),)
     16  sources += $(moc_sources)
     17#endif
    2118
    2219objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources))
     20moc_tst := $(shell ls -al * >/Users/garnier/tst)
     21
    2322dependencies := $(patsubst src/%.cc,$(G4TMPDIR)/%.d,$(sources))
    2423
     
    6867endif
    6968
    70 ###############################################################################
    71 #
    72 # Actual moc files for Qt files
    73 #
    74 # moc sources and headers: used for Qt signal/slot
    75 # - all headers which use signals/slots have the macro "Q_OBJECT" present
    76 #   in the class definitions; these all need to be processed by the
    77 #   "meta object compiler (moc)" which generates extra source code to
    78 #   implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT"
    79 #   it will be used by moc to generate the file "foo_moc.cpp" (the _moc. is
    80 #   just an arbitrary extension to make it easier to identify sources
    81 #   generated by moc).
    82 
    83 ifneq ($(G4INTY_BUILD_QT),)
    84 src/%_moc.cc: include/%.hh
    85         @echo Making moc file for $< ...
    86         @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
    87         $(QTMOC) -o $@ $<;\
    88         else $(QTMOC) $(MOC_MACRO) -o $@ $<; \
    89         fi;
    90 endif
    9169
    9270###############################################################################
     
    10583# .PHONY targets are executed regardless of time-stamp of any file of
    10684# same name.
    107 .PHONY: all moc_inc obj lib clean clean_libs includes
     85.PHONY: all obj lib clean clean_libs includes
    10886
    10987obj: $(G4TMPDIR)/obj.last
  • trunk/geant4/config/interactivity.gmk

    r766 r776  
    3636# Should be before X11.
    3737ifdef LOAD_GLQT
    38   INTYLIBS += $(GLQTLIBS)
     38  INTYLIBS += -D LOAD_GLQT $(GLQTLIBS) -D END_OF_LOAD_GLQT
    3939endif
    4040
  • trunk/geant4/config/moc.gmk

    r770 r776  
    4242src/%_moc.cc: ../$(dirMoc)/include/%.hh
    4343        @echo Making moc file for $< ...
    44         @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
     44        @if [ `$(QTMOC) -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
    4545        $(QTMOC) -o $@ $<;\
    4646        else $(QTMOC) $(MOC_MACRO) -o $@ $<; \
  • trunk/geant4/config/sys/Darwin-g++.gmk

    r766 r776  
    7979  ifndef QTLIBS
    8080    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    81     QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
    82     QT4LIBS    += -framework -framework QtSql -framework QtXml
     81    QT4LIBS    := -D111 -F$(QTHOME)/lib -framework QtCore -framework QtGui -D111_END
     82    QT4LIBS    += -framework QtSql -framework QtXml
    8383    QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
    8484  endif
     
    8787    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    8888    QT4LIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
    89     QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
    90     QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     89    QT4LIBS    += -D GLQTLIBS -framework QtOpenGL -framework QtSql -framework QtXml -D ENDOF_GLQTLIBS
     90    GLQTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
    9191  endif
    9292
  • trunk/geant4/specific-geant4-dev_10.5.sh

    r764 r776  
    3030#  export QTHOME=/usr/local/Qt/3.3.8
    3131  export QTHOME=/Library/Frameworks
    32 #  export QTMOC="/usr/bin/moc"
     32  export QTMOC="/usr/bin/moc"
    3333  export QTFLAGS="-I /Library/Frameworks/QtCore.framework/Headers -I /Library/Frameworks/QtGui.framework/Headers -I /Library/Frameworks/QtOpenGL.framework/Headers -I /Library/Frameworks/QtSql.framework/Headers -I /Library/Frameworks/QtXml.framework/Headers "
    34 #  export QTLIBS="-F/Library/Frameworks -framework QtCore -framework QtGui -framework QtOpenGL -framework QtSql -framework QtXml"
     34  export QTLIBS="-F/Library/Frameworks -framework QtCore -framework QtGui -framework QtSql -framework QtXml"
     35  export GLQTLIBS="-F/Library/Frameworks -framework QtCore -framework QtGui -framework QtOpenGL -framework QtSql -framework QtXml"
    3536
    3637  # ////////////////////////////////////////////////////////
     
    108109  # Set PYTHONPATH to access local scripts :
    109110  #  export PYTHONPATH ${PYTHONPATH}:.
    110 
  • trunk/geant4/visualization/GNUmakefile

    r763 r776  
    1 # $Id: GNUmakefile,v 1.7 2008/01/15 11:05:08 lgarnier Exp $
     1# $Id: GNUmakefile,v 1.21 2005/06/04 14:53:18 gcosmo Exp $
     2# -----------------------------------------------------------------------
     3# GNUmakefile for visualization and modeling.  John Allison, 5/7/95.
     4# Modeling is always made.  Others by environment.  John Allison  4/7/98.
     5# -----------------------------------------------------------------------
    26
    3 name := G4OpenGL_moc
    4 dirMoc := OpenGL
    5 mocFiles := ../OpenGL/
     7MAKEFLAGS= --no-print-directory
     8
     9name := G4visualization
    610
    711ifndef G4INSTALL
    8   G4INSTALL = ../../..
     12  G4INSTALL = ../..
    913endif
    10 
    11 # Definition of macro for moc files (for Qt use only)
    12 MOC_MACRO = -DG4VIS_BUILD_OPENGLQT_DRIVER
    13 
    14 GLOBLIBS  = libG4vis_management.lib libG4modeling.lib
    15 GLOBLIBS += libG4interfaces.lib libG4run.lib libG4event.lib
    16 GLOBLIBS += libG4tracking.lib libG4processes.lib libG4digits_hits.lib
    17 GLOBLIBS += libG4track.lib libG4particles.lib libG4geometry.lib
    18 GLOBLIBS += libG4materials.lib libG4graphics_reps.lib
    19 GLOBLIBS += libG4intercoms.lib libG4global.lib
    2014
    2115include $(G4INSTALL)/config/architecture.gmk
     
    2317include $(G4INSTALL)/config/interactivity.gmk
    2418
    25 CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
    26 CPPFLAGS += -I$(G4BASE)/visualization/management/include
    27 CPPFLAGS += -I$(G4BASE)/visualization/modeling/include
    28 CPPFLAGS += -I$(G4BASE)/global/management/include
    29 CPPFLAGS += -I$(G4BASE)/global/HEPGeometry/include
    30 CPPFLAGS += -I$(G4BASE)/geometry/solids/CSG/include
    31 CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include
    32 CPPFLAGS += -I$(G4BASE)/graphics_reps/include
    33 CPPFLAGS += -I$(G4BASE)/geometry/management/include
    34 CPPFLAGS += -I$(G4BASE)/intercoms/include
    35 CPPFLAGS += -I$(G4BASE)/interfaces/common/include
    36 CPPFLAGS += -I$(G4BASE)/tracking/include
    37 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
     19SUBDIRS := modeling
     20SUBLIBS := G4modeling
    3821
    39 moc_tst := $(shell ls -al litMoc.gmk)
    40 include $(G4INSTALL)/config/moc.gmk
    41 moc_tst := $(shell ls -al litCommon.gmk)
    42 include $(G4INSTALL)/config/common.gmk
    43 moc_tst := $(shell ls -al FIN)
     22ifdef G4LIB_BUILD_ZLIB
     23  SUBDIRS += externals/zlib
     24  SUBLIBS += G4zlib
     25endif
     26
     27# Libraries which can be used without external packages or libraries...
     28ifdef G4VIS_BUILD
     29  SUBDIRS += management
     30  SUBLIBS += G4vis_management
     31  SUBDIRS += FukuiRenderer
     32  SUBLIBS += G4FR
     33  SUBDIRS += HepRep
     34  SUBLIBS += G4visHepRep
     35  SUBDIRS += RayTracer
     36  SUBLIBS += G4RayTracer
     37  SUBDIRS += VRML
     38  SUBLIBS += G4VRML
     39  SUBDIRS += Tree
     40  SUBLIBS += G4Tree
     41  SUBDIRS += XXX
     42  SUBLIBS += G4visXXX
     43
     44ifdef G4VIS_BUILD_OPENGL_DRIVER
     45  SUBDIRS += OpenGL
     46  SUBLIBS += G4OpenGL
     47endif
     48ifdef G4VIS_BUILD_OPENGLQT_DRIVER
     49  SUBDIRS += OpenGL_moc
     50  SUBLIBS += G4OpenGL_moc
     51endif
     52ifdef G4VIS_BUILD_OI_DRIVER
     53  SUBDIRS += OpenInventor
     54  SUBLIBS += G4OpenInventor
     55endif
     56endif #G4VIS_BUILD
     57
     58.PHONY: granular glob global clean
     59
     60glob global: granular
     61
     62granular:
     63        @for dir in $(SUBDIRS); do (cd $$dir; $(MAKE)); done
     64
     65includes:
     66        @for dir in $(SUBDIRS); do (cd $$dir && $(MAKE) $@ ); done
     67
     68clean clean_libs:
     69        @for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@); done
  • trunk/geant4/visualization/History

    r688 r776  
    1 $Id: History,v 1.419 2008/01/04 22:17:08 allison Exp $
     1$Id: History,v 1.420 2008/01/29 22:39:52 allison Exp $
    22-------------------------------------------------------------------
    33
     
    2424History file for visualization category
    2525---------------------------------------
     26
     2729th January 2008  John Allison  (vis-V09-01-01)
     28- visman-V09-01-01: Re-instated G4DAWNFILE (somehow got lost!!)
    2629
    27304th January 2008  John Allison  (vis-V09-01-00 with greps-V09-01-00)
  • trunk/geant4/visualization/OpenGL/GNUmakefile

    r688 r776  
    66  G4INSTALL = ../../..
    77endif
    8 
    9 # Definition of macro for moc files (for Qt use only)
    10 MOC_MACRO = -DG4VIS_BUILD_OPENGLQT_DRIVER
    118
    129GLOBLIBS  = libG4vis_management.lib libG4modeling.lib
  • trunk/geant4/visualization/OpenGL/History

    r714 r776  
    1 $Id: History,v 1.108 2008/01/30 11:16:42 lgarnier Exp $
     1$Id: History,v 1.111 2008/03/11 16:05:56 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    2121-------------------------------------
    2222
    23 5th February 2008, Laurent Garnier
    24  - Fix a bug on moving step when moving camera. It is now the same screen
    25    step even when we are zooming on scene.
    26  - Improvment : When mouse move the camera, it now follow exactly the scene.
     2311th March 2008, Laurent Garnier
     24 - Resolve QT3 compilation errors
     25
     2610th March 2008, Laurent Garnier
     27 - Add a dialog panel to make movies (Right button->Actions->Movie parameters)
     28 - Add ability to "auto rotate" volume launched with quick mouse move
     29 - Lots of improvments for Qt3
     30 - Improvments on moving steps with shortcuts
     31 - Could now select between orthogonal/perspective view mode
     32
     331st February 2008  John Allison
     34 - G4OpenGLQtViewer.cc: Fix #ifdef QT protection.
     35 - G4OpenGLSceneHandler.cc: Small improvement to logic of setting GL_LIGHTING.
    2736
    283730th January 2008, Laurent Garnier
  • trunk/geant4/visualization/OpenGL_moc/GNUmakefile

    r763 r776  
    33name := G4OpenGL_moc
    44dirMoc := OpenGL
    5 mocFiles := ../OpenGL/
    65
    76ifndef G4INSTALL
     
    3736CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include
    3837
    39 moc_tst := $(shell ls -al litMoc.gmk)
    4038include $(G4INSTALL)/config/moc.gmk
    41 moc_tst := $(shell ls -al litCommon.gmk)
    4239include $(G4INSTALL)/config/common.gmk
    43 moc_tst := $(shell ls -al FIN)
Note: See TracChangeset for help on using the changeset viewer.