| 1 |
# $Id: Makefile,v 1.3 2006/12/12 16:21:38 brun Exp $ |
# $Id: Makefile 306 2007-11-19 16:15:32Z rdm $ |
| 2 |
|
|
| 3 |
############################### geant4_vmc Makefile ########################### |
############################### geant4_vmc Makefile ########################### |
| 4 |
|
|
| 8 |
PLATFORM = $(shell root-config --arch) |
PLATFORM = $(shell root-config --arch) |
| 9 |
endif |
endif |
| 10 |
|
|
| 11 |
TOPDIR = $(G4VMC_DIR) |
|
| 12 |
BINDIR = $(G4WORKDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE) |
TOPDIR = $(PWD) |
| 13 |
LIBDIR = $(G4WORKDIR)/lib/tgt_$(PLATFORM) |
BINDIR = $(TOPDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE) |
| 14 |
|
LIBDIR = $(TOPDIR)/lib/tgt_$(PLATFORM) |
| 15 |
|
|
| 16 |
|
|
| 17 |
ifeq ($(ROOTSYS),) |
ifeq ($(ROOTSYS),) |
| 18 |
ROOT_INCDIR = $(shell root-config --incdir) |
ROOT_INCDIR = $(shell root-config --incdir) |
| 19 |
ROOT_BINDIR = $(shell root-config --prefix)/bin |
ROOT_BINDIR = $(shell root-config --prefix)/bin |
| 20 |
|
ROOT_ETCDIR = $(shell root-config --prefix)/etc/vmc |
| 21 |
else |
else |
| 22 |
ROOT_INCDIR = $(ROOTSYS)/include |
ROOT_INCDIR = $(ROOTSYS)/include |
| 23 |
ROOT_BINDIR = $(ROOTSYS)/bin |
ROOT_BINDIR = $(ROOTSYS)/bin |
| 24 |
|
ROOT_ETCDIR = $(ROOTSYS)/etc/vmc |
| 25 |
endif |
endif |
| 26 |
|
|
| 27 |
include $(TOPDIR)/config/Makefile.$(PLATFORM) |
include $(ROOT_ETCDIR)/Makefile.$(PLATFORM) |
| 28 |
|
|
| 29 |
############################### Sources ####################################### |
############################### Sources ####################################### |
| 30 |
|
|
| 31 |
# Rules |
# Rules |
| 32 |
# |
# |
| 33 |
include $(TOPDIR)/config/MakeRules |
include $(ROOT_ETCDIR)/MakeRules |
| 34 |
|
|
| 35 |
# Dictionary |
# Dictionary |
| 36 |
# |
# |
| 37 |
GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx |
GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx |
| 38 |
GDICTH := $(GDICT:.cxx=.h) |
GDICTH := $(GDICT:.cxx=.h) |
| 39 |
GDICTO := $(patsubst %.cxx,$(BINDIR)/%.o,$(GDICT)) |
GDICTO := $(patsubst %.cxx,%.o,$(GDICT)) |
| 40 |
|
|
| 41 |
# Sources |
# Sources |
| 42 |
# |
# |
| 45 |
|
|
| 46 |
# C++ Headers processed by CINT |
# C++ Headers processed by CINT |
| 47 |
# |
# |
| 48 |
HDRS := inc/PamG4RunConfiguration.h \ |
HDRS := include/PamG4RunConfiguration.h \ |
| 49 |
inc/$(PACKAGE)LinkDef.h |
# include/PamG4RangeCutsPhysicsList.h \ |
| 50 |
|
# include/PamG4RangeCutsPhysics.h \ |
| 51 |
|
include/$(PACKAGE)LinkDef.h |
| 52 |
|
|
| 53 |
# Objects |
# Objects |
| 54 |
# |
# |
| 58 |
# Make include list |
# Make include list |
| 59 |
# |
# |
| 60 |
ifndef G4INCLUDE |
ifndef G4INCLUDE |
| 61 |
G4INCLUDE := $(G4LIB)../../include |
G4INCLUDE := $(G4INSTALL)/include |
| 62 |
endif |
endif |
| 63 |
|
|
| 64 |
INCDIR := -Iinc -I$(G4INCLUDE) \ |
INCDIR := -Iinclude -I$(G4INCLUDE) \ |
| 65 |
-I$(CLHEP_BASE_DIR)/include \ |
-I$(CLHEP_BASE_DIR)/include \ |
| 66 |
-I$(G4INSTALL)/source/physics_lists/hadronic/LHEP_BIC_HP/include \ |
-I$(G4INSTALL)/physics_lists/hadronic/LHEP_BERT/include \ |
| 67 |
-I$(G4INSTALL)/source/physics_lists/hadronic/Packaging/include \ |
-I$(G4INSTALL)/physics_lists/hadronic/Packaging/include \ |
| 68 |
-I$(G4INSTALL)/examples/novice/N03/include \ |
-I$(G4INSTALL)/examples/novice/N03/include \ |
| 69 |
|
-I$(G4VMC_DIR)/include \ |
| 70 |
-I$(TOPDIR)/include |
-I$(TOPDIR)/include |
| 71 |
|
|
| 72 |
ifneq ($(USE_VGM),) |
ifneq ($(USE_VGM),) |
| 162 |
############################### Targets ####################################### |
############################### Targets ####################################### |
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL) |
SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL) |
| 167 |
ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a |
ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a |
| 168 |
|
|
| 169 |
|
LIBDIRUP = ../lib/tgt_$(PLATFORM) |
| 170 |
|
CP_FILE=$(shell mkdir -p ${LIBDIRUP})\ |
| 171 |
|
$(shell cp -rf $(LIBDIR)/lib$(PACKAGE).$(SL) ${LIBDIRUP}/) |
| 172 |
|
|
| 173 |
|
|
| 174 |
|
|
| 175 |
default: depend $(SLIBRARY) |
default: depend $(SLIBRARY) |
| 176 |
all: default includes |
all: default includes |
| 177 |
|
|
| 178 |
|
|
| 179 |
$(LIBDIR)/lib$(PACKAGE).$(SL): $(OBJS) |
$(LIBDIR)/lib$(PACKAGE).$(SL): $(OBJS) $(CP_FILE) |
| 180 |
$(LIBDIR)/lib$(PACKAGE).a: $(OBJS) |
$(LIBDIR)/lib$(PACKAGE).a: $(OBJS) $(CP_FILE) |
| 181 |
|
|
| 182 |
DICT:= $(GDICT) |
DICT:= $(GDICT) |
| 183 |
|
|
| 185 |
|
|
| 186 |
depend: $(SRCS) |
depend: $(SRCS) |
| 187 |
|
|
| 188 |
TOCLEAN = $(BINDIR) $(TOPDIR)/include |
TOCLEAN = $(BINDIR) |
| 189 |
TOCLEANALL = $(BINDIR) $(TOPDIR)/include $(LIBDIR) |
TOCLEANALL = $(BINDIR) $(LIBDIR) |
| 190 |
|
|
| 191 |
MAKEDIST = ../config/makedist.sh lib |
MAKEDIST = ../config/makedist.sh lib |
| 192 |
MAKEDISTSRC = ../config/makedist.sh |
MAKEDISTSRC = ../config/makedist.sh |
| 193 |
|
|
| 194 |
include $(TOPDIR)/config/MakeMacros |
include $(ROOT_ETCDIR)/MakeMacros |
| 195 |
|
|
| 196 |
############################### Dependencies ################################## |
############################### Dependencies ################################## |
| 197 |
|
|