/[PAMELA software]/PamCAL/Makefile
ViewVC logotype

Contents of /PamCAL/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Nov 12 10:05:51 2007 UTC (17 years, 1 month ago) by nikolas
Branch: MAIN
CVS Tags: HEAD
Added files and directories

1 # $Id: Makefile,v 1.0 2007/06/01
2
3 ############################### geant4vmc Makefile ###########################
4
5
6 PACKAGE = PamVMC
7
8 ifeq ($(PLATFORM),)
9 PLATFORM = $(shell root-config --arch)
10 endif
11
12 TOPDIR = $(G4VMC_DIR)
13 BINDIR = $(G4WORKDIR)/tmp/tgt_$(PLATFORM)/$(PACKAGE)
14 LIBDIR = $(G4WORKDIR)/lib/tgt_$(PLATFORM)
15
16 ifeq ($(ROOTSYS),)
17 ROOT_INCDIR = $(shell root-config --incdir)
18 ROOT_BINDIR = $(shell root-config --prefix)/bin
19 else
20 ROOT_INCDIR = $(ROOTSYS)/include
21 ROOT_BINDIR = $(ROOTSYS)/bin
22 endif
23
24 include $(TOPDIR)/config/Makefile.$(PLATFORM)
25
26 ############################### Sources #######################################
27
28 # Rules
29 #
30 include $(TOPDIR)/config/MakeRules
31
32 # Dictionary
33 #
34 GDICT := $(BINDIR)/$(PACKAGE)Cint.cxx
35 GDICTH := $(GDICT:.cxx=.h)
36 GDICTO := $(patsubst %.cxx,$(BINDIR)/%.o,$(GDICT))
37
38 # Sources
39 #
40 CXXSRC := $(wildcard src/*.cxx)
41 SRCS := $(CXXSRC)
42
43 # C++ Headers
44 #
45 HDRS := $(wildcard include/*.h)
46 HDRS := $(filter-out include/$(PACKAGE)LinkDef.h,$(HDRS))
47 HDRS += include/$(PACKAGE)LinkDef.h
48
49 # Objects
50 #
51 CXXOBJ := $(patsubst %.cxx,$(BINDIR)/%.o,$(CXXSRC))
52 OBJS := $(CXXOBJ) $(GDICTO)
53
54 # PAMELA LIBS
55 #
56 PAMLIBS := -L${PAM_LIB} -lTrkLevel2
57 SHLIBS := ${PAMLIBS}
58 # Make include list
59 #
60 PAMINC := -I${PAM_INC} -I${PAM_INC}/yoda
61 INCDIR := -Iinclude -I$(PAMINC) \
62 -I$(TOPDIR)/include \
63 -I$(CLHEP_BASE_DIR)/include \
64 -Iinclude -I$(G4INCLUDE)
65
66 # C++ compilation flags
67 #
68 CXXFLAGS := $(CXXOPTS) -I. $(INCDIR) -I$(ROOT_INCDIR) ${PAMOPTS}
69
70 DEPINC += -I. -I$(ROOT_INCDIR) $(INCDIR)
71
72 ############################### Targets #######################################
73
74
75 SLIBRARY = $(LIBDIR)/lib$(PACKAGE).$(SL)
76 ALIBRARY = $(LIBDIR)/lib$(PACKAGE).a
77
78 default: depend $(SLIBRARY)
79
80
81 $(LIBDIR)/lib$(PACKAGE).$(SL): $(OBJS)
82 $(LIBDIR)/lib$(PACKAGE).a: $(OBJS)
83
84 DICT:= $(GDICT)
85
86 $(DICT): $(HDRS)
87
88 depend: $(SRCS)
89
90 TOCLEAN = $(BINDIR)
91 TOCLEANALL = $(BINDIR) $(LIBDIR)
92
93 include $(TOPDIR)/config/MakeMacros
94
95 ############################### Dependencies ##################################
96
97 -include $(BINDIR)/Make-depend

  ViewVC Help
Powered by ViewVC 1.1.23