Changeset 766 for trunk/geant4/config/common.gmk
- Timestamp:
- Apr 15, 2008, 3:38:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/config/common.gmk
r761 r766 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 Qt moc rule, L.Garnier 15/2/08. 7 8 8 9 ifndef G4LIBDIR … … 14 15 15 16 ifneq ($(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) 17 20 endif 18 21 … … 65 68 endif 66 69 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 67 91 68 92 ############################################################################### … … 81 105 # .PHONY targets are executed regardless of time-stamp of any file of 82 106 # same name. 83 .PHONY: all obj lib clean clean_libs includes107 .PHONY: all moc_inc obj lib clean clean_libs includes 84 108 85 109 obj: $(G4TMPDIR)/obj.last
Note: See TracChangeset
for help on using the changeset viewer.