Changeset 643 for trunk/geant4/config
- Timestamp:
- Dec 7, 2007, 2:57:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/config/common.gmk
r593 r643 11 11 G4TMPDIR := $(G4TMP)/$(G4SYSTEM)/$(name) 12 12 13 all : moc ; 14 moc : lib ; 13 15 sources := $(wildcard src/*.cc) 14 16 objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources)) … … 33 35 # Actual gmake targets. 34 36 # 35 36 37 lib: $(g4libraries_to_build) 37 38 … … 62 63 ############################################################################### 63 64 # 65 # Actual moc files for qt files 66 # 67 # moc sources and headers: used for Qt signal/slot constructs in ui code 68 # - all headers which use signals/slots have the macro "Q_OBJECT" present 69 # in the class definitions; these all need to be processed by the 70 # "meta object compiler (moc)" which generates extra source code to 71 # implement the signal/slots, i.e., if "foo.h" contains the token "Q_OBJECT" 72 # it will be used by moc to generate the file "foo.moc.cpp" (the .moc. is 73 # just an arbitrary extension to make it easier to identify sources 74 # generated by moc). Use 'grep -l' to list all the files containing the token 75 76 MOC_HDRS = $(shell grep -l "Q_OBJECT" include/*.hh ) 77 MOC_SRCS = $(patsubst include/%.hh, src/%_moc_tmp.cc, $(MOC_HDRS)) 78 moc : $(MOC_SRCS) 79 80 MOC = $(QTHOME)/bin/moc 81 82 src/%_moc_tmp.cc: include/%.hh 83 @echo Making moc file for $< ... 84 @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 4" | wc -l ` -gt 0 ]; then \ 85 $(MOC) -o $@ $<;\ 86 else $(MOC) $(MOC_MACRO) -o $@ $<; \ 87 fi; 88 89 # @echo Making moc file for $< ... 90 # @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \ 91 # @$(MOC) -o $@ $<;\ 92 # else @$(MOC) $(MOC_MACRO) -o $@ $<; 93 # fi; 94 95 ############################################################################### 96 # 64 97 # Actual targets for .o, .d files 65 98 # … … 69 102 $(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc 70 103 else 71 @echo Compiling $*.cc ... 104 @echo Compiling $*.cc ... 72 105 @$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $(OUT_OBJ)$(G4TMPDIR)/$(*F).o src/$*.cc 73 106 endif … … 104 137 105 138 $(G4TMPDIR)/%.d: src/%.cc 106 @echo Making dependency for file $< ...139 @echo Making dependency for file $< 107 140 @if [ ! -d $(G4TMPDIR) ] ; then mkdir -p $(G4TMPDIR) ;fi 108 141 @set -e;\
Note: See TracChangeset
for help on using the changeset viewer.