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

remise à jour de config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.