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.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /config/sys/Darwin-clang.gmk (Version 11.3.0) and /config/sys/Darwin-clang.gmk (Version 10.2.p3)


  1 #                                                   1 #
  2 # ------ macOS ------                          <<   2 # ------ MacOS-X ------
  3 #                                 macOS, Apple <<   3 #                                 MacOS 10.8/9/10/11, clang-3.6 and higher
  4 #                                                   4 #
  5 # Original author: Gabriele Cosmo - CERN            5 # Original author: Gabriele Cosmo - CERN
  6 #                                                   6 #
  7 ifeq ($(G4SYSTEM),Darwin-clang)                     7 ifeq ($(G4SYSTEM),Darwin-clang)
  8   CXX       := clang++                              8   CXX       := clang++
  9   CXXFLAGS  := -Wall -Wno-non-virtual-dtor -Wn      9   CXXFLAGS  := -Wall -Wno-non-virtual-dtor -Wno-long-long
 10   CXXFLAGS  += -Wwrite-strings -Wpointer-arith     10   CXXFLAGS  += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual
 11   CXXFLAGS  += -Wno-variadic-macros -Wshadow -     11   CXXFLAGS  += -Wno-variadic-macros -Wshadow -pipe
 12   CXXFLAGS  += -fno-trapping-math -ftree-vecto <<  12   ifdef G4USE_STD11
 13   CPPFLAGS  += -DGL_SILENCE_DEPRECATION        <<  13     CXXFLAGS  += -std=c++11
 14   CPPFLAGS  += -std=c++17                      <<  14   endif
 15   CXXFLAGS  += -std=c++17                      <<  15   ifdef G4USE_STD14
 16   G4USE_STD17 := 1                             <<  16     G4USE_STD11 := 1
                                                   >>  17     CPPFLAGS  += -std=c++14
                                                   >>  18     CXXFLAGS  += -std=c++14
                                                   >>  19   endif
                                                   >>  20   ifdef G4USE_STD17
                                                   >>  21     G4USE_STD11 := 1
                                                   >>  22     CPPFLAGS  += -std=c++17
                                                   >>  23     CXXFLAGS  += -std=c++17
                                                   >>  24   endif
 17   ifdef G4MULTITHREADED                            25   ifdef G4MULTITHREADED
 18     CXXFLAGS += -ftls-model=initial-exec -pthr     26     CXXFLAGS += -ftls-model=initial-exec -pthread
 19   endif                                            27   endif
 20   ifdef G4OPTIMISE                                 28   ifdef G4OPTIMISE
 21     CXXFLAGS  += -O3                           <<  29     CXXFLAGS  += -O2
 22     FCFLAGS   := -O3                           <<  30     FCFLAGS   := -O2
 23     CCFLAGS   := -O3                           <<  31     CCFLAGS   := -O2
 24   else                                             32   else
 25     ifdef G4DEBUG                                  33     ifdef G4DEBUG
 26       CXXFLAGS  += -g                              34       CXXFLAGS  += -g
 27       FCFLAGS   := -g                              35       FCFLAGS   := -g
 28       CCFLAGS   := -g                              36       CCFLAGS   := -g
 29     endif                                          37     endif
 30   endif                                            38   endif
 31   ifdef G4PROFILE                                  39   ifdef G4PROFILE
 32     CXXFLAGS  += -pg                               40     CXXFLAGS  += -pg
 33     FCFLAGS   += -pg                               41     FCFLAGS   += -pg
 34     CCFLAGS   += -pg                               42     CCFLAGS   += -pg
 35   endif                                            43   endif
 36   ifdef G4OPTDEBUG                                 44   ifdef G4OPTDEBUG
 37     CXXFLAGS  += -O2 -g                            45     CXXFLAGS  += -O2 -g
 38     FCFLAGS   += -O2 -g                            46     FCFLAGS   += -O2 -g
 39     CCFLAGS   += -O2 -g                            47     CCFLAGS   += -O2 -g
 40   endif                                            48   endif
 41   G4RUNPATHOPTION := -Wl,-rpath,               <<  49   ifdef G4LIB_BUILD_SHARED
 42 #  G4STATIC_MODE += -Wl,-force_load            <<  50     CXXFLAGS  += -fPIC
                                                   >>  51     FCFLAGS   += -fPIC
                                                   >>  52     CCFLAGS   += -fPIC
                                                   >>  53   endif
                                                   >>  54   G4RUNPATHOPTION := -Wl,-rpath 
                                                   >>  55   G4STATIC_MODE += -Wl,-force_load
 43   FC := gfortran                                   56   FC := gfortran
 44   FCFLAGS += -fno-automatic -fno-backslash -fn     57   FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
 45   LDFLAGS += -bind_at_load                         58   LDFLAGS += -bind_at_load
 46   FCLIBS := -lg2c -lnsl                            59   FCLIBS := -lg2c -lnsl
 47   SHEXT   := dylib                                 60   SHEXT   := dylib
 48   LOADLIBS += -lm                                  61   LOADLIBS += -lm
 49   ifndef X11FLAGS                                  62   ifndef X11FLAGS
 50     X11FLAGS  := -I/usr/X11/include                63     X11FLAGS  := -I/usr/X11/include
 51   endif                                            64   endif
 52   ifndef X11LIBS                                   65   ifndef X11LIBS
 53     X11LIBS   := -L/usr/X11/lib  -lXmu -lXt -l <<  66     X11LIBS   := -L/usr/X11/lib  -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE
 54   endif                                            67   endif
 55   ifndef XMFLAGS                                   68   ifndef XMFLAGS
 56     XMFLAGS   := -I/usr/local/include          <<  69     XMFLAGS   := -I/sw/include
 57 #   XMFLAGS   := -I/usr/X11/include          #     70 #   XMFLAGS   := -I/usr/X11/include          ##### some installations.
 58   endif                                            71   endif
 59   ifndef XMLIBS                                    72   ifndef XMLIBS
 60     XMLIBS    := -L/usr/local/lib -lXm -lXpm   <<  73     XMLIBS    := -L/sw/lib -lXm -lXpm
 61 #   XMLIBS    := -L/usr/X11/lib -lXm -lXpm   #     74 #   XMLIBS    := -L/usr/X11/lib -lXm -lXpm   ##### some installations.
 62   endif                                            75   endif
 63   ifndef XAWFLAGS                                  76   ifndef XAWFLAGS
 64     XAWFLAGS   := -I/usr/local/include         <<  77     XAWFLAGS   := -I/sw/include
 65 #   XAWFLAGS   := -I/usr/X11/include         #     78 #   XAWFLAGS   := -I/usr/X11/include         ##### some installations.
 66   endif                                            79   endif
 67   ifndef XAWLIBS                                   80   ifndef XAWLIBS
 68     XAWLIBS    := -lXaw                            81     XAWLIBS    := -lXaw
 69   endif                                            82   endif
 70   DLDLIBS   := -ldl                                83   DLDLIBS   := -ldl
 71   ifndef OGLHOME                                   84   ifndef OGLHOME
 72     OGLHOME  := /usr/X11                           85     OGLHOME  := /usr/X11
 73   endif                                            86   endif
 74   ifndef OGLFLAGS                                  87   ifndef OGLFLAGS
 75     OGLFLAGS  := -I$(OGLHOME)/include              88     OGLFLAGS  := -I$(OGLHOME)/include 
 76   endif                                            89   endif
 77   ifndef OGLLIBS                                   90   ifndef OGLLIBS
 78     OGLPATH  := $(shell test -f /Library/Frame <<  91     QTGLPATH  := $(shell test -f /System/Library/Frameworks/OpenGL.framework/OpenGL && echo "/System/Library/Frameworks/OpenGL.framework")
 79     ifneq ($(OGLPATH),/Library/Frameworks/Open <<  92     ifeq ($(QTGLPATH),/System/Library/Frameworks/OpenGL.framework)
 80       OGLPATH  := $(shell test -f /System/Libr <<  93       OGLLIBS := -F/System/Library/Frameworks -framework OpenGL -framework AGL 
 81     endif                                      <<  94       ifeq ($(G4VIS_USE_OPENGLX),1)
 82     ifneq ($(OGLPATH),)                        <<  95         OGLLIBS += -L$(OGLHOME)/lib -lGLU -lGL
 83       OGLLIBS := -F$(OGLPATH)/.. -framework Op <<  96       endif
 84     else                                           97     else
 85       OGLLIBS := -L$(OGLHOME)/lib -lGL         <<  98       OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
 86     endif                                          99     endif
 87   endif                                           100   endif
 88                                                   101 
 89 # ---- Qt Setup block ------------------------    102 # ---- Qt Setup block -------------------------------------------------------
 90                                                   103 
 91   ifndef QTHOME                                   104   ifndef QTHOME
 92     QTHOME := /Library/Frameworks                 105     QTHOME := /Library/Frameworks
 93   endif                                           106   endif
 94   ifndef QT_VERSION                            << 
 95     QT_VERSION := 5                            << 
 96   endif                                        << 
 97   ifeq ($(QTHOME),/Library/Frameworks)            107   ifeq ($(QTHOME),/Library/Frameworks)
 98     ifndef QTMOC                                  108     ifndef QTMOC
 99       QTMOC      := /usr/bin/moc                  109       QTMOC      := /usr/bin/moc
100     endif                                         110     endif
101     ifndef QTFLAGS                                111     ifndef QTFLAGS
102       QTFLAGS   := -I $(QTHOME)/QtCore.framewo << 112       QTFLAGS   := -I $(QTHOME)/QtCore.framework/Headers 
103       QTFLAGS   += -I $(QTHOME)/QtGui.framewor << 113       QTFLAGS   += -I $(QTHOME)/QtGui.framework/Headers 
104       QTFLAGS   += -I $(QTHOME)/QtWidgets.fram << 
105       QTFLAGS   += -I $(QTHOME)/QtOpenGL.frame    114       QTFLAGS   += -I $(QTHOME)/QtOpenGL.framework/Headers
106       QTFLAGS   += -I $(QTHOME)/Qt3DCore.frame << 
107       QTFLAGS   += -I $(QTHOME)/Qt3DExtras.fra << 
108       QTFLAGS   += -I $(QTHOME)/Qt3DRender.fra << 
109       ifeq ($(QT_VERSION),6)                   << 
110         QTFLAGS   += -I $(QTHOME)/QtOpenGLWidg << 
111       endif                                    << 
112       QTFLAGS   += -I $(QTHOME)/include/Qt -I$    115       QTFLAGS   += -I $(QTHOME)/include/Qt -I$(QTHOME)/include
113     endif                                         116     endif
114     ifndef QTLIBPATH                              117     ifndef QTLIBPATH
115       QTLPATH  := $(QTHOME)                       118       QTLPATH  := $(QTHOME)
116     endif                                         119     endif
117     QTLIBPATH  := -F$(QTLPATH)                    120     QTLIBPATH  := -F$(QTLPATH)
118     QT_AS_FRAMEWORK := $(shell test -d $(QTLPA    121     QT_AS_FRAMEWORK := $(shell test -d $(QTLPATH)/QtCore.framework && echo yes)
119     ifndef QTLIBS                                 122     ifndef QTLIBS
120       ifdef QT_AS_FRAMEWORK                       123       ifdef QT_AS_FRAMEWORK
121         QTLIBS    := $(QTLIBPATH) -framework Q    124         QTLIBS    := $(QTLIBPATH) -framework QtCore -framework QtGui
122       else                                        125       else
123         QTLIBS    := -L$(QTLPATH) -lQtCore -lQ    126         QTLIBS    := -L$(QTLPATH) -lQtCore -lQtGui
124       endif                                       127       endif   
125     endif                                         128     endif
126     ifndef QT3DLIBS                            << 
127       ifdef QT_AS_FRAMEWORK                    << 
128         QT3DLIBS  := $(QTLIBPATH) -framework Q << 
129         QT3DLIBS  += -framework QtWidgets -fra << 
130       else                                     << 
131         QT3DLIBS  := -L$(QTLPATH) -lQtCore -lQ << 
132         QT3DLIBS  += -lQtWidgets -lQt3DCore -l << 
133       endif                                    << 
134     endif                                      << 
135     ifndef GLQTLIBS                               129     ifndef GLQTLIBS  
136       ifdef QT_AS_FRAMEWORK                       130       ifdef QT_AS_FRAMEWORK
137         GLQTLIBS  := $(QTLIBPATH) -framework Q << 131         GLQTLIBS    := $(QTLIBPATH) -framework QtCore -framework QtGui
138         ifeq ($(QT_VERSION),6)                 << 132         GLQTLIBS    += -framework QtOpenGL
139           GLQTLIBS += -framework QtOpenGLWidge << 
140         endif                                  << 
141       else                                        133       else
142         GLQTLIBS  := -L$(QTLPATH) -lQtCore -lQ << 134         GLQTLIBS    := -L$(QTLPATH) -lQtCore -lQtGui -lQtOpenGL
143         ifeq ($(QT_VERSION),6)                 << 
144           GLQTLIBS += -lQtOpenGLWidgets        << 
145         endif                                  << 
146       endif                                       135       endif   
147     endif                                         136     endif
148   else                                            137   else
149     ifndef QTMOC                                  138     ifndef QTMOC
150       QTMOC      := $(QTHOME)/bin/moc             139       QTMOC      := $(QTHOME)/bin/moc
151     endif                                         140     endif
152     QTLPATH  := $(QTHOME)/lib                     141     QTLPATH  := $(QTHOME)/lib
153     ifndef QTFLAGS                             << 142     ifndef QTFLAGS                          # Qt5
154       QTFLAGS   := -I $(QTLPATH)/QtCore.framew    143       QTFLAGS   := -I $(QTLPATH)/QtCore.framework/Headers 
155       QTFLAGS   += -I $(QTLPATH)/QtGui.framewo    144       QTFLAGS   += -I $(QTLPATH)/QtGui.framework/Headers 
156       QTFLAGS   += -I $(QTLPATH)/QtWidgets.fra    145       QTFLAGS   += -I $(QTLPATH)/QtWidgets.framework/Headers
157       QTFLAGS   += -I $(QTLPATH)/QtOpenGL.fram    146       QTFLAGS   += -I $(QTLPATH)/QtOpenGL.framework/Headers
158       QTFLAGS   += -I $(QTLPATH)/Qt3DCore.fram << 147       QTFLAGS   += -I $(QTLPATH)/QtPrintSupport.framework/Headers
159       QTFLAGS   += -I $(QTLPATH)/Qt3DExtras.fr << 
160       QTFLAGS   += -I $(QTLPATH)/Qt3DRender.fr << 
161       QTFLAGS   += -I $(QTHOME)/include/Qt -I$    148       QTFLAGS   += -I $(QTHOME)/include/Qt -I$(QTHOME)/include
162       ifeq ($(QT_VERSION),6)                   << 
163         QTFLAGS   += -I $(QTHOME)/QtOpenGLWidg << 
164       endif                                    << 
165     endif                                         149     endif
166     ifndef QTLIBS                                 150     ifndef QTLIBS
167        QTLIBS    := -F$(QTLPATH) -framework Qt    151        QTLIBS    := -F$(QTLPATH) -framework QtCore -framework QtGui
168        QTLIBS    += -framework QtWidgets       << 152        QTLIBS    += -framework QtWidgets -framework QtPrintSupport
169     endif                                      << 
170     ifndef QT3DLIBS                            << 
171        QT3DLIBS    := -F$(QTLPATH) -framework  << 
172        QT3DLIBS    += -framework QtWidgets     << 
173        QT3DLIBS    += -framework Qt3DCore -fra << 
174     endif                                         153     endif   
175     ifndef GLQTLIBS                               154     ifndef GLQTLIBS  
176       GLQTLIBS    := -F$(QTLPATH) -framework Q    155       GLQTLIBS    := -F$(QTLPATH) -framework QtCore -framework QtGui
177       GLQTLIBS    += -framework QtWidgets         156       GLQTLIBS    += -framework QtWidgets
178       GLQTLIBS    += -framework QtOpenGL       << 157       GLQTLIBS    += -framework QtOpenGL -framework QtPrintSupport
179       ifeq ($(QT_VERSION),6)                   << 
180         GLQTLIBS  += -framework QtOpenGLWidget << 
181       endif                                    << 
182     endif                                         158     endif   
183   endif                                           159   endif
184                                                   160 
185 #------ Wt Setup block -----------------------    161 #------ Wt Setup block ------------------------------------------------------
186                                                   162 
187   ifndef WTHOME                                   163   ifndef WTHOME
188     WTHOME := /usr                                164     WTHOME := /usr
189   endif                                           165   endif
190   WTFLAGS := -I$(WTHOME)/include/boost -I$(WTH    166   WTFLAGS := -I$(WTHOME)/include/boost -I$(WTHOME)/include -DQT_NO_KEYWORDS 
191   WTLIBS  := -L$(WTHOME)/lib -lwt -lwtext -lwt    167   WTLIBS  := -L$(WTHOME)/lib -lwt -lwtext -lwthttp  -lboost_signals  -L/usr/lib -lz -lssl -lcrypto
192                                                   168 
193 #---------------------------------------------    169 #----------------------------------------------------------------------------
194                                                   170 
195   define build-granular-shared-lib                171   define build-granular-shared-lib
196     @libdir=`(cd $(@D);/bin/pwd)`; \              172     @libdir=`(cd $(@D);/bin/pwd)`; \
197      cd $(G4TMPDIR); \                            173      cd $(G4TMPDIR); \
198      $(CXX) -Wl,-w -dynamiclib -single_module  << 174      $(CXX) -dynamiclib -single_module -undefined dynamic_lookup \
199          -o $$libdir/$(@F) $(INTYLIBS) *.o        175          -o $$libdir/$(@F) $(INTYLIBS) *.o
200   endef                                           176   endef
201   define build-global-shared-lib                  177   define build-global-shared-lib
202     @libdir=`(cd $(@D);/bin/pwd)`; \              178     @libdir=`(cd $(@D);/bin/pwd)`; \
203      cd $(G4TMP)/$(G4SYSTEM); \                   179      cd $(G4TMP)/$(G4SYSTEM); \
204      $(CXX) -Wl,-w -dynamiclib -single_module  << 180      $(CXX) -dynamiclib -single_module -undefined dynamic_lookup \
205          -o $$libdir/$(@F) $(INTYLIBS) $(forea    181          -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o);
206   endef                                           182   endef
207                                                   183 
208 endif                                             184 endif