Changeset 766 for trunk/geant4/config


Ignore:
Timestamp:
Apr 15, 2008, 3:38:47 PM (16 years ago)
Author:
garnier
Message:

remise à jour de config

Location:
trunk/geant4/config
Files:
6 edited

Legend:

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

    r593 r766  
    6565  LOAD_QT   = 1
    6666  CPPFLAGS += -DG4UI_USE_QT
     67  INTYLIBS += -DG4UI_USE_QT
     68else
     69  INTYLIBS += -DNO_G4VIS_USE_OIQT
    6770endif
    6871
  • trunk/geant4/config/G4VIS_USE.gmk

    r761 r766  
    6262  VISLIBS += -lG4OpenGL_moc
    6363  INC_QT   = 1
     64  LOAD_GLQT   = 1
     65  INTYLIBS += -DG4VIS_USE_OIQT
     66else
     67  INTYLIBS += -DNO_G4VIS_USE_OIQT
    6468endif
    6569ifdef G4VIS_USE_OPENGLWIN32
     
    8791  CPPFLAGS += -DG4VIS_USE_OIQT
    8892  INC_QT   = 1
    89   LOAD_QT   = 1
     93  LOAD_GLQT   = 1
    9094endif
    9195ifdef G4VIS_USE_OIWIN32
  • trunk/geant4/config/common.gmk

    r761 r766  
    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.
    78
    89ifndef G4LIBDIR
     
    1415
    1516ifneq ($(G4INTY_BUILD_QT),)
    16   sources += $(moc_sources)
     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)
    1720endif
    1821
     
    6568endif
    6669
     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
     83ifneq ($(G4INTY_BUILD_QT),)
     84src/%_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;
     90endif
    6791
    6892###############################################################################
     
    81105# .PHONY targets are executed regardless of time-stamp of any file of
    82106# same name.
    83 .PHONY: all obj lib clean clean_libs includes
     107.PHONY: all moc_inc obj lib clean clean_libs includes
    84108
    85109obj: $(G4TMPDIR)/obj.last
  • trunk/geant4/config/interactivity.gmk

    r758 r766  
    3333endif
    3434
     35########################### Open GL Qt ###############################
     36# Should be before X11.
     37ifdef LOAD_GLQT
     38  INTYLIBS += $(GLQTLIBS)
     39endif
     40
    3541########################### OpenGL ###############################
    3642
     
    3945endif
    4046ifdef LOAD_GL
    41   INTYLIBS += $(OGLLIBS)
     47  INTYLIBS += -D_LOAD_GL $(OGLLIBS) -D_LOAD_GL
     48else
     49  INTYLIBS += -D_NO_LOAD_GL
    4250endif
    4351
  • trunk/geant4/config/moc.gmk

    r762 r766  
    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.
     7# Introduced Qt moc rule, L.Garnier 16/2/08.
    88
    99ifndef G4LIBDIR
     
    1313
    1414ifneq ($(G4INTY_BUILD_QT),)
    15 #  dirMoc := OpenGL
    16   moc_dir_name := $(patsubst G4%_moc, ../%, $(name))
    17   moc_inc := $(shell grep -l "Q_OBJECT" ../$(dirMoc)/include/*.hh)
     15  moc_inc := $(shell (grep -l "Q_OBJECT" ../$(dirMoc)/include/*.hh))
     16  moc_tst := $(shell ls -al testMoc.gmk)
    1817  moc_sources := $(patsubst ../$(dirMoc)/include/%.hh, src/%_moc.cc, $(moc_inc))
    1918
    20 #  moc_inc := $(shell grep -l "Q_OBJECT" $(moc_dir_name)/include/*.hh)
     19#  moc_dir_name := $(patsubst G4%_moc, %, $(name))
     20#  moc_tst := $(shell ls -al ../$(moc_dir_name) >/Users/garnier/tst)
     21#  moc_inc := $(shell (grep -l "Q_OBJECT" ../$(moc_dir_name)/include/*.hh))
    2122#  moc_tst := $(shell ls -al $(moc_inc) >/Users/garnier/tst)
    22 #  moc_sources := $(patsubst $(moc_dir_name)/include/%.hh, src/%_moc.cc, $(moc_inc))
     23#  moc_sources := $(patsubst ../$(moc_dir_name)/include/%.hh, src/%_moc.cc, $(moc_inc))
    2324endif
    2425
     
    3940
    4041ifneq ($(G4INTY_BUILD_QT),)
    41 src/%_moc.cc: include/%.hh
     42src/%_moc.cc: ../$(dirMoc)/include/%.hh
    4243        @echo Making moc file for $< ...
    4344        @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
     
    4647        fi;
    4748
    48 src/%.cc: src/%_moc.cc
     49src/%.cc:
    4950        @echo Making toto $< ...
    5051        @if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR)  ;fi
  • trunk/geant4/config/sys/Darwin-g++.gmk

    r758 r766  
    8080    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    8181    QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
     82    QT4LIBS    += -framework -framework QtSql -framework QtXml
     83    QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     84  endif
     85
     86  ifndef GLQTLIBS
     87    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
     88    QT4LIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
    8289    QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
    83     QTLIBS     := $(shell test -f $(QTHOME)/lib/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     90    QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
    8491  endif
    8592
     
    8794    @libdir=`(cd $(@D);/bin/pwd)`; \
    8895     cd $(G4TMPDIR); \
     96     echo $(INTYLIBS); \
    8997     g++ -dynamiclib -single_module -undefined dynamic_lookup \
    9098         -o $$libdir/$(@F) $(INTYLIBS) *.o
Note: See TracChangeset for help on using the changeset viewer.