# # ------ MacOS-X ------ # MacOS 10.3 gcc-3.3 # MacOS 10.4 gcc-4.0 # # Original author: Helmut Burkhardt - CERN # Revisions: Guy Barrand - LAL # Gabriele Cosmo - CERN # ifeq ($(G4SYSTEM),Darwin-g++) CXX := g++ CXXFLAGS := -Wall -ansi -pedantic -Wno-non-virtual-dtor -Wno-long-long CXXFLAGS += -Wwrite-strings -Wpointer-arith -Woverloaded-virtual -pipe ifdef G4OPTIMISE CXXFLAGS += -O2 FCFLAGS := -O2 CCFLAGS := -O2 else ifdef G4DEBUG CXXFLAGS += -g FCFLAGS := -g CCFLAGS := -g endif endif ifdef G4PROFILE CXXFLAGS += -pg FCFLAGS += -pg CCFLAGS += -pg endif FC := g77 FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore LDFLAGS += -bind_at_load FCLIBS := -lg2c -lnsl SHEXT := dylib ifndef X11FLAGS X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11 endif ifndef X11LIBS X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lXi -lSM -lICE endif ifndef XMFLAGS XMFLAGS := -I/sw/include # XMFLAGS := -I/usr/X11R6/include ##### some installations. endif ifndef XMLIBS XMLIBS := -L/sw/lib -lXm -lXpm # XMLIBS := -L/usr/X11R6/lib -lXm -lXpm ##### some installations. endif ifndef QTHOME QTHOME := /sw endif ifndef QTFLAGS QTFLAGS := -I$(QTHOME)/include/Qt -I$(QTHOME)/include MOC := $(QTHOME)/bin/moc endif ifndef QTLIBS QT3LIBS := -L$(QTHOME)/lib -lqt -lqui QT4LIBS := -F$(QTHOME)/lib -framework QtCore -framework QtGui QT4LIBS += -framework QtOpenGL -framework QtSql -framework QtXml QTLIBS := $(shell test -f $(QTHOME)/lib/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS)) endif ifndef XAWFLAGS XAWFLAGS := -I/sw/include # XAWFLAGS := -I/usr/X11R6/include ##### some installations. endif ifndef XAWLIBS XAWLIBS := -lXaw endif DLDLIBS := -ldl ifndef OGLHOME OGLHOME := /usr/X11R6 endif ifndef OGLFLAGS OGLFLAGS := -I$(OGLHOME)/include endif ifndef OGLLIBS OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL endif define build-granular-shared-lib @libdir=`(cd $(@D);/bin/pwd)`; \ cd $(G4TMPDIR); \ g++ -dynamiclib -single_module -undefined dynamic_lookup \ -o $$libdir/$(@F) $(INTYLIBS) *.o endef define build-global-shared-lib @libdir=`(cd $(@D);/bin/pwd)`; \ cd $(G4TMP)/$(G4SYSTEM); \ g++ -dynamiclib -single_module -undefined dynamic_lookup \ -o $$libdir/$(@F) $(INTYLIBS) $(foreach dir,$(SUBLIBS),$(dir)/*.o); endef endif