Changeset 776 for trunk/geant4/config


Ignore:
Timestamp:
Apr 17, 2008, 11:32:32 AM (16 years ago)
Author:
garnier
Message:

r785@wl-72126: garnier | 2008-04-17 11:30:37 +0200
une version qui marche avec les moc

Location:
trunk/geant4/config
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/config/G4VIS_USE.gmk

    r766 r776  
    7676    CPPFLAGS += -I$(G4BASE)/visualization/OpenGL/include
    7777  endif
    78   VISLIBS  += -lG4OpenGL
     78  VISLIBS  += -lXX -lG4OpenGL -lXX
    7979  INC_GL    = 1
    8080  LOAD_GL   = 1
  • trunk/geant4/config/binmake.gmk

    r689 r776  
    242242          < $(G4LIB)/$(G4SYSTEM)/libname.map; fi)
    243243  else
    244     LDLIBS2 = $(shell \
     244    LDLIBS2 = -DNO_G4INCLUDE_EXEC $(shell \
    245245        G4TMP=$(G4TMP); export G4TMP; \
    246246        if [ \( -f $(G4LIB)/$(G4SYSTEM)/liblist \
     
    282282else
    283283# Again, do not use := or +=.  See note on LDLIBS2 above.
    284   LDLIBS_PREFINAL = $(LDLIBS1) $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
     284  LDLIBS_PREFINAL = $(LDLIBS1) -DLDLIBS2_END $(LDLIBS2) -DLDLIBS2_END $(LDLIBS2EXTRA) $(LDLIBS3)
    285285# Version leaving out EXTRALIBS
    286286  LDLIBS_KERNEL   = $(LDLIBS2) $(LDLIBS2EXTRA) $(LDLIBS3)
    287287endif
    288 LDLIBS_PREFINAL += $(LDLIBS4)
     288LDLIBS_PREFINAL += -DLDLIBS4 $(LDLIBS4) -DLDLIBS_END4
    289289LDLIBS_KERNEL   += $(LDLIBS4)
    290290
     
    308308else
    309309  # Unix
    310   LDLIBS = $(TARGETLIB) $(LDLIBS_PREFINAL)
     310  LDLIBS = $(TARGETLIB) -DLDLIBS_PREFINAL $(LDLIBS_PREFINAL) -DLDLIBS_PREFINAL_END
    311311  OUT   := -o
    312312endif
  • trunk/geant4/config/common.gmk

    r766 r776  
    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.
    87
    98ifndef G4LIBDIR
     
    1413sources := $(wildcard src/*.cc)
    1514
    16 ifneq ($(G4INTY_BUILD_QT),)
    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)
    20 endif
     15#ifneq ($(G4INTY_BUILD_QT),)
     16  sources += $(moc_sources)
     17#endif
    2118
    2219objects := $(patsubst src/%.cc,$(G4TMPDIR)/%.o,$(sources))
     20moc_tst := $(shell ls -al * >/Users/garnier/tst)
     21
    2322dependencies := $(patsubst src/%.cc,$(G4TMPDIR)/%.d,$(sources))
    2423
     
    6867endif
    6968
    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
    9169
    9270###############################################################################
     
    10583# .PHONY targets are executed regardless of time-stamp of any file of
    10684# same name.
    107 .PHONY: all moc_inc obj lib clean clean_libs includes
     85.PHONY: all obj lib clean clean_libs includes
    10886
    10987obj: $(G4TMPDIR)/obj.last
  • trunk/geant4/config/interactivity.gmk

    r766 r776  
    3636# Should be before X11.
    3737ifdef LOAD_GLQT
    38   INTYLIBS += $(GLQTLIBS)
     38  INTYLIBS += -D LOAD_GLQT $(GLQTLIBS) -D END_OF_LOAD_GLQT
    3939endif
    4040
  • trunk/geant4/config/moc.gmk

    r770 r776  
    4242src/%_moc.cc: ../$(dirMoc)/include/%.hh
    4343        @echo Making moc file for $< ...
    44         @if [ `$(QTHOME)/bin/moc -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
     44        @if [ `$(QTMOC) -v 2>&1 | grep "Qt 3" | wc -l ` -gt 0 ]; then \
    4545        $(QTMOC) -o $@ $<;\
    4646        else $(QTMOC) $(MOC_MACRO) -o $@ $<; \
  • trunk/geant4/config/sys/Darwin-g++.gmk

    r766 r776  
    7979  ifndef QTLIBS
    8080    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    81     QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
    82     QT4LIBS    += -framework -framework QtSql -framework QtXml
     81    QT4LIBS    := -D111 -F$(QTHOME)/lib -framework QtCore -framework QtGui -D111_END
     82    QT4LIBS    += -framework QtSql -framework QtXml
    8383    QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
    8484  endif
     
    8787    QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    8888    QT4LIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
    89     QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
    90     QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     89    QT4LIBS    += -D GLQTLIBS -framework QtOpenGL -framework QtSql -framework QtXml -D ENDOF_GLQTLIBS
     90    GLQTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
    9191  endif
    9292
Note: See TracChangeset for help on using the changeset viewer.