/[PAMELA software]/PamCut/makefile
ViewVC logotype

Contents of /PamCut/makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Wed Aug 26 16:34:13 2009 UTC (15 years, 3 months ago) by pam-fi
Branch: MAIN
Changes since 1.4: +1 -2 lines
*** empty log message ***

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
32 # Library flags
33 # Pamela software is modular, so some libraries may not be available in some istallations.
34 # To avoid linking problems, here you can define flags to exclude those parts of the
35 # PamCut software which make use of unavailable libraries. Remember to place
36 # the code to be excluded between proper preprocessor directives. See the documentation or the cut
37 # TofNucleiZCut for an example.
38
39 EXCLUSIONFLAGS = -DNO_CALONUCLEI -DNO_TRKNUCLEI #-DNO_TOFNUCLEI -DNO_CALONUCLEI -DNO_TRKNUCLEI
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
66 @echo
67 @echo "**** Compiler version and compilation host ****"
68 @$(C++) --version | grep GCC
69 @hostname
70 @echo
71
72 # Tool invocations
73 libPamCut.so: $(OBJS) $(USER_OBJS)
74 @echo 'Building target: $@'
75 @echo 'Invoking: GCC C++ Linker'
76 $(C++) -shared -o"libPamCut.so" $(OBJS)
77 @echo 'Finished building target: $@'
78 @echo ' '
79
80 # Other Targets
81 clean:
82 -$(RM) $(CPP_DEPS) $(OBJS) libPamCut.so
83 -@echo ' '
84
85 distclean:
86 @rm -f ${PAM_LIB}/libPamCut.so
87 @rm -rf ${PAM_INC}/PamCut
88 @echo Installed files successfully removed.
89
90 install:
91 @if [[ "${PAM_INC}" == "" || "${PAM_LIB}" == "" ]]; then \
92 echo Pamela environment not set. ; \
93 else \
94 rootdir=`pwd`; \
95 for file in `find -name "*.h"`; do \
96 dir=`dirname $${file} | sed 's/.\///'`; \
97 mkdir -p ${PAM_INC}/PamCut/$${dir}; \
98 cp -u $${file} ${PAM_INC}/PamCut/$${dir}; \
99 done; \
100 cp -u libPamCut.so ${PAM_LIB}; \
101 fi
102 @echo PamCut installed.
103
104 .PHONY: all clean distclean install
105

  ViewVC Help
Powered by ViewVC 1.1.23