| 1 |
pam-fi |
1.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: version libPamCut.so |
| 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 |
|
|
version: |
| 81 |
|
|
@gcc --version | grep gcc; echo |
| 82 |
|
|
|
| 83 |
|
|
.PHONY: all clean dependents version |