76 lines
1.9 KiB
Plaintext
76 lines
1.9 KiB
Plaintext
#
|
|
# ------ MacOS-X ------ !!! not generally supported !!!
|
|
#
|
|
# MacOS 10.1 GNU-gcc 2.92.2
|
|
# MacOS 10.2 there is g++2 and g++3, choose consistently one,
|
|
# like g++2 which is 2.95.2
|
|
# use echo -n (there is not the echo -e option of Linux)
|
|
#
|
|
# Helmut Burkhardt - CERN
|
|
#
|
|
ifeq ($(G4SYSTEM),Darwin-g++)
|
|
# choice of GNU compilers:
|
|
CXX := g++2
|
|
# CXX := g++3
|
|
GNU_GCC = 1
|
|
CXXFLAGS := -Wall -ansi -pedantic -pipe -fno-for-scope -DGNU_GCC
|
|
# optionally add verbose flag
|
|
# CXXFLAGS += -v
|
|
ifdef G4OPTIMISE
|
|
CXXFLAGS += -O
|
|
FCFLAGS := -O
|
|
CCFLAGS := -O
|
|
else
|
|
ifdef G4DEBUG
|
|
CXXFLAGS += -g
|
|
FCFLAGS := -g
|
|
CCFLAGS := -g
|
|
endif
|
|
endif
|
|
ifdef G4PROFILE
|
|
CXXFLAGS += -pg
|
|
FCFLAGS += -pg
|
|
CCFLAGS += -pg
|
|
endif
|
|
ifdef G4LIB_BUILD_SHARED
|
|
CXXFLAGS += -fPIC
|
|
FCFLAGS += -fPIC
|
|
CCFLAGS += -fPIC
|
|
endif
|
|
G4RUNPATHOPTION := -Wl,-rpath
|
|
FC := g77
|
|
FCFLAGS += -fno-automatic -fno-backslash -fno-second-underscore
|
|
FCLIBS := -lg2c -lnsl
|
|
ECHO := /bin/echo -n
|
|
SHEXT := so
|
|
X11FLAGS := -I/usr/include/X11/extensions -I/usr/include/X11
|
|
X11LIBS := -L/usr/X11R6/lib -lXmu -lXt -lXext -lX11 -lSM -lICE
|
|
XMFLAGS := -I/usr/X11R6/include
|
|
XMLIBS := -lXm -lXpm
|
|
DLDLIBS := -ldl
|
|
ifndef OGLHOME
|
|
OGLHOME := /usr/X11R6
|
|
endif
|
|
ifndef OGLFLAGS
|
|
OGLFLAGS := -I$(OGLHOME)/include
|
|
endif
|
|
ifndef OGLLIBS
|
|
OGLLIBS := -L$(OGLHOME)/lib -lGLU -lGL
|
|
endif
|
|
OIVFLAGS += -I$(OIHOME)/include
|
|
G4USE_STD_NAMESPACE := yes
|
|
CPPFLAGS += -DG4USE_STD_NAMESPACE
|
|
define build-granular-shared-lib
|
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
|
cd $(G4TMPDIR); \
|
|
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) *.o
|
|
endef
|
|
define build-global-shared-lib
|
|
@libdir=`(cd $(@D);/bin/pwd)`; \
|
|
cd $(G4TMP)/$(G4SYSTEM); \
|
|
$(CXX) -Wl,-soname,$(@F) -shared -o $$libdir/$(@F) \
|
|
$(foreach dir,$(SUBLIBS),$(dir)/*.o);
|
|
endef
|
|
|
|
endif
|