/[PAMELA software]/chewbacca/Makefile
ViewVC logotype

Contents of /chewbacca/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (show annotations) (download)
Thu Feb 11 09:02:06 2010 UTC (14 years, 9 months ago) by mocchiut
Branch: MAIN
CVS Tags: v10RED, v9r00, v9r01, HEAD
Changes since 1.14: +4 -4 lines
9R bugs fixed

1 #
2 #
3 #
4 export debug=0
5 export release=1
6 #
7 export RED='\E[1;31;40m'
8 export GREEN='\E[1;32;40m'
9 export YELLOW='\E[1;33;40m'
10 export BLUE='\E[1;34;40m'
11 export WHITE='\E[1;37;40m'
12 export VIOLET='\E[1;35;40m'
13 export CYAN='\E[1;36;40m'
14 # Here the echo definition to use them
15 export EVIOLET=echo -e ${VIOLET}
16 export ECYAN=echo -e ${CYAN}
17 export ERED=echo -e ${RED}
18 export EGREEN=echo -e ${GREEN}
19 export EYELLOW=echo -e ${YELLOW}
20 export EBLUE=echo -e ${BLUE}
21 export EWHITE=echo -e ${WHITE}
22 # Reset the terminal
23 export RESET=tput sgr0
24 #
25 export BASEDIR=$(shell echo `pwd`)
26 #export LD_LIBRARY_PATH+=:$(BASEDIR)/event/
27 #
28 export LDFLAGS+=$(PAM_BIT)
29 export CFLAGS+=$(PAM_BIT)
30 export FFLAGS+=$(PAM_BIT)
31 #
32 ifeq ($(GCC4),)
33 export GCCVERS=$(shell echo `gcc -dumpversion | sed 's/\./\ /g'`)
34 export GCCVERMAJ=$(word 1,$(GCCVERS))
35 export GCC4=$(shell echo `echo "${GCCVERMAJ} > 3" |bc -l`)
36 endif
37 #
38 DIRS=event PamOffLineSW YodaProfiler
39 #
40 all:
41 ifeq ($(verbose),)
42 @for sub_dir in $(DIRS) ; do \
43 ( cd $$sub_dir &>/dev/null && (${EGREEN} "Make all in $$sub_dir "; ${RESET}) && make -s BASEDIR=$(BASEDIR)) ; \
44 done
45 else
46 for sub_dir in $(DIRS) ; do \
47 ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \
48 done
49 endif
50
51 YodaProfiler: YodaProfiler/inc/* YodaProfiler/src/*
52 ifeq ($(verbose),)
53 @for sub_dir in "YodaProfiler" ; do \
54 ( cd $$sub_dir &>/dev/null && (${EGREEN} "Make all in $$sub_dir "; ${RESET}) && make -s BASEDIR=$(BASEDIR)) ; \
55 done
56 else
57 for sub_dir in "YodaProfiler" ; do \
58 ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \
59 done
60 endif
61
62 distclean:
63 ifeq ($(verbose),)
64 @for sub_dir in $(DIRS) ; do \
65 ( cd $$sub_dir &>/dev/null && (${EGREEN} "Make distclean in $$sub_dir "; ${RESET}) && make -s distclean) ; \
66 done
67 @for sub_dir in `find ./ -name obj` ; do \
68 rm -rf $$sub_dir ; \
69 done
70 else
71 for sub_dir in $(DIRS) ; do \
72 ( cd $$sub_dir && make distclean) ; \
73 done
74 for sub_dir in `find ./ -name obj` ; do \
75 rm -rf $$sub_dir ; \
76 done
77 endif
78
79 install:
80 ifeq ($(verbose),)
81 @(${EGREEN} " Creating PAMELA environment "; ${RESET})
82 @if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \
83 (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \
84 (${ERED} ""; ${RESET}); \
85 exit; fi
86 @if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi
87 @if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi
88 @if [ ! -d $(PAM_LIB) ]; then mkdir $(PAM_LIB); fi
89 @if [ ! -d $(PAM_INC) ]; then mkdir $(PAM_INC); fi
90 @ln -sf $(PAM_SOFTWARE)/inc $(PAM_SOFTWARE)/include
91 @if [ ! -d $(PAM_BIN) ]; then mkdir $(PAM_BIN); fi
92 @if [ ! -d $(PAM_DOC) ]; then mkdir $(PAM_DOC); fi
93 @if [ ! -d $(PAM_MACROS) ]; then mkdir $(PAM_MACROS); fi
94 @if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi
95 @if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi
96 @if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi
97 @(${EGREEN} " Installing: library "${WHITE}"libyoda.so "; ${RESET})
98 @cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/
99 @(cd $(PAM_LIB) &>/dev/null && ln -sf libyoda.so.0.0.0 libyoda.so && cd - &>/dev/null)
100 @(cd $(PAM_LIB) &>/dev/null && ln -sf libyoda.so.0.0.0 libyoda.so.0 && cd - &>/dev/null)
101 # @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so
102 # @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0
103 @(${EGREEN} " Installing: exec file "${WHITE}"chewbacca"; ${RESET})
104 @cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/
105 @(${EGREEN} " Installing: "${WHITE}"yoda headers";${RESET})
106 @(cd $(BASEDIR)/event/ &>/dev/null && make -s distclean)
107 @rm -rf $(PAM_INC)/yoda/
108 @cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda
109 @cp -rf $(PAM_LIB)/libyoda.so.0.0.0 $(BASEDIR)/event/
110 @ln -sf $(BASEDIR)/event/libyoda.so.0.0.0 $(BASEDIR)/event/libyoda.so
111 @(${EGREEN}"")
112 @(cd YodaProfiler &>/dev/null && make -s forceinstall)
113 else
114 (${EGREEN} " Creating PAMELA environment "; ${RESET})
115 if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \
116 (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \
117 (${ERED} ""; ${RESET}); \
118 exit; fi
119 if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi
120 if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi
121 if [ ! -d $(PAM_LIB) ]; then mkdir $(PAM_LIB); fi
122 if [ ! -d $(PAM_INC) ]; then mkdir $(PAM_INC); fi
123 ln -sf $(PAM_SOFTWARE)/inc $(PAM_SOFTWARE)/include
124 if [ ! -d $(PAM_BIN) ]; then mkdir $(PAM_BIN); fi
125 if [ ! -d $(PAM_DOC) ]; then mkdir $(PAM_DOC); fi
126 if [ ! -d $(PAM_MACROS) ]; then mkdir $(PAM_MACROS); fi
127 if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi
128 if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi
129 if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi
130 (${EGREEN} " Installing "${EWHITE}"libyoda.so "; ${RESET})
131 cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/
132 cd $(PAM_LIB) && ln -sf libyoda.so.0.0.0 libyoda.so && cd -
133 cd $(PAM_LIB) && ln -sf libyoda.so.0.0.0 libyoda.so.0 && cd -
134 (${EGREEN} " Installing exec file "${EWHITE}"chewbacca"; ${RESET})
135 cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/
136 (${EGREEN} " Installing "${EWHITE}"yoda headers";${RESET})
137 (cd $(BASEDIR)/event/ && make distclean)
138 rm -rf $(PAM_INC)/yoda/
139 cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda
140 cp -rf $(PAM_LIB)/libyoda.so $(BASEDIR)/event/
141 ln -sf $(BASEDIR)/event/libyoda.so.0.0.0 $(BASEDIR)/event/libyoda.so
142 (${EGREEN}"")
143 (cd YodaProfiler && make forceinstall)
144 endif

  ViewVC Help
Powered by ViewVC 1.1.23