1 |
mocchiut |
1.1 |
# |
2 |
|
|
# |
3 |
|
|
# |
4 |
|
|
|
5 |
|
|
|
6 |
|
|
ifndef BASEDIR |
7 |
|
|
BASEDIR =$(shell pwd) |
8 |
|
|
endif |
9 |
|
|
|
10 |
|
|
ifdef release |
11 |
|
|
debug = 0 |
12 |
|
|
release = 1 |
13 |
|
|
endif |
14 |
|
|
|
15 |
|
|
ifndef release |
16 |
|
|
debug = 1 |
17 |
|
|
release = 0 |
18 |
|
|
endif |
19 |
|
|
|
20 |
mocchiut |
1.2 |
export LDFLAGS+=$(PAM_BIT) |
21 |
|
|
export CFLAGS+=$(PAM_BIT) |
22 |
|
|
export FFLAGS+=$(PAM_BIT) |
23 |
mocchiut |
1.1 |
|
24 |
|
|
DIRS=event PamOffLineSW YodaProfiler |
25 |
|
|
|
26 |
|
|
|
27 |
|
|
all: |
28 |
|
|
for sub_dir in $(DIRS) ; do \ |
29 |
|
|
( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \ |
30 |
|
|
done |
31 |
|
|
|
32 |
|
|
distclean: |
33 |
|
|
for sub_dir in $(DIRS) ; do \ |
34 |
|
|
( cd $$sub_dir && make distclean) ; \ |
35 |
|
|
done |
36 |
mocchiut |
1.3 |
for sub_dir in `find ./ -name obj` ; do \ |
37 |
|
|
rm -rf $$sub_dir ; \ |
38 |
|
|
done |
39 |
mocchiut |
1.1 |
|
40 |
|
|
install: |
41 |
mocchiut |
1.4 |
@echo " Creating PAMELA environment " |
42 |
|
|
@if [ "$(PAM_SOFTWARE)" == "" ]; then echo "";\ |
43 |
mocchiut |
1.1 |
echo "PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING";\ |
44 |
|
|
echo ""; \ |
45 |
|
|
exit; fi |
46 |
mocchiut |
1.4 |
@if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi |
47 |
|
|
@if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi |
48 |
|
|
@if [ ! -d $(PAM_LIB) ]; then mkdir $(PAM_LIB); fi |
49 |
|
|
@if [ ! -d $(PAM_INC) ]; then mkdir $(PAM_INC); fi |
50 |
|
|
@ln -sf $(PAM_SOFTWARE)/inc $(PAM_SOFTWARE)/include |
51 |
|
|
@if [ ! -d $(PAM_BIN) ]; then mkdir $(PAM_BIN); fi |
52 |
|
|
@if [ ! -d $(PAM_DOC) ]; then mkdir $(PAM_DOC); fi |
53 |
|
|
@if [ ! -d $(PAM_MACROS) ]; then mkdir $(PAM_MACROS); fi |
54 |
|
|
@if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi |
55 |
|
|
@if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi |
56 |
|
|
@if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi |
57 |
|
|
@echo " Installing libyoda.so " |
58 |
|
|
@cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/ |
59 |
|
|
@ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so |
60 |
|
|
@ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0 |
61 |
|
|
@echo " Installing chewbacca executable " |
62 |
|
|
@cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/ |
63 |
|
|
@echo " Installing yoda headers " |
64 |
|
|
@cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda/ |
65 |
|
|
@(cd YodaProfiler && make forceinstall) |