/[PAMELA software]/PamCut/makefile
ViewVC logotype

Contents of /PamCut/makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jun 15 14:43:30 2009 UTC (15 years, 5 months ago) by pam-fi
Branch: MAIN
Changes since 1.2: +21 -1 lines
Added support for installation in Pamela standard environment.

1 #
2 # ************ PamCut makefile ************
3 #
4 # Author: Nicola Mori
5 #
6 # This makefile will produce a cut library libPamCut.so. In the "Build options"
7 # section the various compilation options can be set; they will propagate to the
8 # whole project.
9 #
10
11
12 # ------------------------------- Build options ----------------------------#
13 #
14 # Normally you will not have the necessity to modify what lies below, if you
15 # correctly specified the names for the submakefiles in include.mk. Modify
16 # the options below to set optimization flags, compiler name and so on.
17 #
18
19 # C++ compiler and linker
20 C++ = g++
21
22 # Optimization flags.
23 # 1) Use -O, -O1, -O2, -O3 to optimize for speed or -g, -g1, -g2, -g3
24 # for debugging (slower execution).
25 # 2) Uncomment -DDEBUGPAMCUT to enable debug sections in the .cpp code (these sections must be included between
26 # "#ifdef DEBUGPAMCUT" and "#endif"). Note that if you
27 # use debug instructions also in the .h code (headers) you will also have to add -DDEBUGPAMCUT
28 # to the compiler options for the main analysis program.
29 OPTIMIZE = -g3 #-DDEBUGPAMCUT
30
31 # Library flags
32 # Pamela software is modular, so some libraries may not be available in some istallations.
33 # To avoid linking problems, here you can define flags to exclude those parts of the
34 # PamCut software which make use of unavailable libraries. Remember to place
35 # the code to be excluded between proper preprocessor directives. See the documentation or the cut
36 # TofNucleiZCut for an example.
37 EXCLUSIONFLAGS = #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI
38
39
40
41 # Put below the files on which every .cpp must depend on, ie., those files that,
42 # if modified, will trigger a complete recompilation of the project.
43 COMMONDEPS = makefile
44
45 # The file include.mk contains the inclusion of all the sub-makefiles (subdir.mk)
46 # in the project. Includes for new cuts must be added there and not below...
47 -include include.mk
48
49 #-------------------------------- Make body --------------------------------#
50 #
51 # Below the make commands are defined. There are no options to set in this section,
52 # so it has to be modified only in case of radical changes to the make procedure.
53
54 # Remove command for clean
55 RM := rm -rf
56
57 # Additional dependencies from headers of other software (PAMELA, ROOT)
58 ifneq ($(MAKECMDGOALS),clean)
59 ifneq ($(strip $(CPP_DEPS)),)
60 -include $(CPP_DEPS)
61 endif
62 endif
63
64 # All Target
65 all: libPamCut.so version
66
67 # Tool invocations
68 libPamCut.so: $(OBJS) $(USER_OBJS)
69 @echo 'Building target: $@'
70 @echo 'Invoking: GCC C++ Linker'
71 $(C++) -shared -o"libPamCut.so" $(OBJS)
72 @echo 'Finished building target: $@'
73 @echo ' '
74
75 # Other Targets
76 clean:
77 -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so
78 -@echo ' '
79
80 distclean:
81 @rm -f ${PAM_LIB}/libPamCut.so
82 @rm -rf ${PAM_INC}/PamCut
83 @echo Installed files successfully removed.
84
85 install:
86 @if [[ "${PAM_INC}" == "" || "${PAM_LIB}" == "" ]]; then \
87 echo Pamela environment not set. ; \
88 else \
89 rootdir=`pwd`; \
90 for file in `find -name "*.h"`; do \
91 dir=`dirname $${file} | sed 's/.\///'`; \
92 mkdir -p ${PAM_INC}/PamCut/$${dir}; \
93 cp -u $${file} ${PAM_INC}/PamCut/$${dir}; \
94 done; \
95 cp -u libPamCut.so ${PAM_LIB}; \
96 fi
97 @echo PamCut installed.
98
99 version:
100 @echo
101 @echo "**** Compiler version and compilation host ****"
102 @$(C++) --version | grep GCC
103 @hostname
104 @echo
105
106 .PHONY: all clean distclean install dependents version
107

  ViewVC Help
Powered by ViewVC 1.1.23