Files
geant4/config/sys/Darwin-g++.gmk
T
2016-06-09 14:44:26 +02:00

82 lines
2.2 KiB
Plaintext

#
# ------ 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
ECHO := /bin/echo -n
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 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