Changeset 761 for trunk/geant4/config/common.gmk
- Timestamp:
- Apr 8, 2008, 7:30:23 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/config/common.gmk
r758 r761 1 # $Id: common.gmk,v 1.5 0 2008/03/19 10:55:47 lgarnierExp $1 # $Id: common.gmk,v 1.51 2008/04/04 10:35:20 gcosmo 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 Qt moc rule, L.Garnier 15/2/08.8 7 9 8 ifndef G4LIBDIR … … 12 11 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name) 13 12 14 moc_inc = $(shell grep -l "Q_OBJECT" include/*.hh ) 15 moc_files := $(patsubst include/%.hh, src/%_moc.cc, $(moc_inc)) 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 13 sources := $(wildcard src/*.cc) 23 14 24 15 ifneq ($(G4INTY_BUILD_QT),) 25 sources := $(wildcard src/*.cc) 26 sources += $(moc_files) 16 sources += $(moc_sources) 27 17 endif 28 29 18 30 19 objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources)) … … 76 65 endif 77 66 78 ###############################################################################79 #80 # Actual moc files for Qt files81 #82 # moc sources and headers: used for Qt signal/slot83 # - all headers which use signals/slots have the macro "Q_OBJECT" present84 # in the class definitions; these all need to be processed by the85 # "meta object compiler (moc)" which generates extra source code to86 # 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. is88 # just an arbitrary extension to make it easier to identify sources89 # generated by moc).90 91 ifneq ($(G4INTY_BUILD_QT),)92 src/%_moc.cc: include/%.hh93 @echo Making moc file for $< ...94 @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \95 $(QTMOC) -o $@ $<;\96 else $(QTMOC) $(MOC_MACRO) -o $@ $<; \97 fi;98 endif99 100 67 101 68 ############################################################################### … … 114 81 # .PHONY targets are executed regardless of time-stamp of any file of 115 82 # same name. 116 .PHONY: all moc_incobj lib clean clean_libs includes83 .PHONY: all obj lib clean clean_libs includes 117 84 118 85 obj: $(G4TMPDIR)/obj.last
Note: See TracChangeset
for help on using the changeset viewer.