Changeset 758 for trunk/geant4/config/common.gmk
- Timestamp:
- Mar 19, 2008, 11:59:41 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/config/common.gmk
r726 r758 1 # $Id: common.gmk,v 1. 44 2008/01/15 11:14:58lgarnier Exp $1 # $Id: common.gmk,v 1.50 2008/03/19 10:55:47 lgarnier Exp $ 2 2 # ---------------------------------------------------------------- 3 3 # Common part of GNUmakefile for libraries. John Allison, 5/7/95. … … 5 5 # Libraries are created according to G4SYSTEM. G.Cosmo, 11/6/96. 6 6 # Introduced G4LIBDIR and G4TMPDIR. G.Cosmo, 23/6/98. 7 # Introduced Q T moc rule,L. Garnier 12/6/07.7 # Introduced Qt moc rule, L.Garnier 15/2/08. 8 8 9 9 ifndef G4LIBDIR … … 14 14 moc_inc = $(shell grep -l "Q_OBJECT" include/*.hh ) 15 15 moc_files := $(patsubst include/%.hh, src/%_moc.cc, $(moc_inc)) 16 sources := $(wildcard src/*.cc) 17 sources += $(moc_files) 16 17 18 ifeq ($(G4INTY_BUILD_QT),) 19 # not so beautiful. In therory we should only remove theses files from sources 20 sources := $(shell rm -f $(moc_files)) 21 sources := $(wildcard src/*.cc) 22 endif 23 24 ifneq ($(G4INTY_BUILD_QT),) 25 sources := $(wildcard src/*.cc) 26 sources += $(moc_files) 27 endif 28 29 18 30 objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources)) 19 31 dependencies := $(patsubst src/%.cc,$(G4TMPDIR)/%.d,$(sources)) … … 66 78 ############################################################################### 67 79 # 68 # Actual moc files for qt files80 # Actual moc files for Qt files 69 81 # 70 82 # moc sources and headers: used for Qt signal/slot 71 83 # - all headers which use signals/slots have the macro "Q_OBJECT" present 72 # in the class definitions; these all need to be processed by the73 # "meta object compiler (moc)" which generates extra source code to74 # implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT"75 # it will be used by moc to generate the file "foo_moc.cpp" (the _moc. is84 # in the class definitions; these all need to be processed by the 85 # "meta object compiler (moc)" which generates extra source code to 86 # implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT" 87 # it will be used by moc to generate the file "foo_moc.cpp" (the _moc. is 76 88 # just an arbitrary extension to make it easier to identify sources 77 89 # generated by moc). 78 90 91 ifneq ($(G4INTY_BUILD_QT),) 79 92 src/%_moc.cc: include/%.hh 80 93 @echo Making moc file for $< ... … … 83 96 else $(QTMOC) $(MOC_MACRO) -o $@ $<; \ 84 97 fi; 98 endif 99 85 100 86 101 ###############################################################################
Note: See TracChangeset
for help on using the changeset viewer.