/[PAMELA software]/chewbacca/Makefile
ViewVC logotype

Contents of /chewbacca/Makefile

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10 - (show annotations) (download)
Thu Jul 30 08:16:20 2009 UTC (15 years, 4 months ago) by mocchiut
Branch: MAIN
Changes since 1.9: +5 -5 lines
Last compilation warnings 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 DIRS=event PamOffLineSW YodaProfiler
33 #
34 all:
35 ifeq ($(verbose),)
36 @for sub_dir in $(DIRS) ; do \
37 ( cd $$sub_dir &>/dev/null && (${EGREEN} "Make all in $$sub_dir "; ${RESET}) && make -s BASEDIR=$(BASEDIR)) ; \
38 done
39 else
40 for sub_dir in $(DIRS) ; do \
41 ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \
42 done
43 endif
44
45 distclean:
46 ifeq ($(verbose),)
47 @for sub_dir in $(DIRS) ; do \
48 ( cd $$sub_dir &>/dev/null && (${EGREEN} "Make distclean in $$sub_dir "; ${RESET}) && make -s distclean) ; \
49 done
50 @for sub_dir in `find ./ -name obj` ; do \
51 rm -rf $$sub_dir ; \
52 done
53 else
54 for sub_dir in $(DIRS) ; do \
55 ( cd $$sub_dir && make distclean) ; \
56 done
57 for sub_dir in `find ./ -name obj` ; do \
58 rm -rf $$sub_dir ; \
59 done
60 endif
61
62 install:
63 ifeq ($(verbose),)
64 @(${EGREEN} " Creating PAMELA environment "; ${RESET})
65 @if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \
66 (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \
67 (${ERED} ""; ${RESET}); \
68 exit; fi
69 @if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi
70 @if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi
71 @if [ ! -d $(PAM_LIB) ]; then mkdir $(PAM_LIB); fi
72 @if [ ! -d $(PAM_INC) ]; then mkdir $(PAM_INC); fi
73 @ln -sf $(PAM_SOFTWARE)/inc $(PAM_SOFTWARE)/include
74 @if [ ! -d $(PAM_BIN) ]; then mkdir $(PAM_BIN); fi
75 @if [ ! -d $(PAM_DOC) ]; then mkdir $(PAM_DOC); fi
76 @if [ ! -d $(PAM_MACROS) ]; then mkdir $(PAM_MACROS); fi
77 @if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi
78 @if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi
79 @if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi
80 @(${EGREEN} " Installing: library "${WHITE}"libyoda.so "; ${RESET})
81 @cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/
82 @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so
83 @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0
84 @(${EGREEN} " Installing: exec file "${WHITE}"chewbacca"; ${RESET})
85 @cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/
86 @(${EGREEN} " Installing: "${WHITE}"yoda headers";${RESET})
87 @(cd $(BASEDIR)/event/ &>/dev/null && make -s distclean)
88 @rm -rf $(PAM_INC)/yoda/
89 @cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda
90 @cp -rf $(PAM_LIB)/libyoda.so.0.0.0 $(BASEDIR)/event/
91 @(${EGREEN}"")
92 @(cd YodaProfiler &>/dev/null && make -s forceinstall)
93 else
94 (${EGREEN} " Creating PAMELA environment "; ${RESET})
95 if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \
96 (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \
97 (${ERED} ""; ${RESET}); \
98 exit; fi
99 if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi
100 if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi
101 if [ ! -d $(PAM_LIB) ]; then mkdir $(PAM_LIB); fi
102 if [ ! -d $(PAM_INC) ]; then mkdir $(PAM_INC); fi
103 ln -sf $(PAM_SOFTWARE)/inc $(PAM_SOFTWARE)/include
104 if [ ! -d $(PAM_BIN) ]; then mkdir $(PAM_BIN); fi
105 if [ ! -d $(PAM_DOC) ]; then mkdir $(PAM_DOC); fi
106 if [ ! -d $(PAM_MACROS) ]; then mkdir $(PAM_MACROS); fi
107 if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi
108 if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi
109 if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi
110 (${EGREEN} " Installing "${EWHITE}"libyoda.so "; ${RESET})
111 cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/
112 ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so
113 ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0
114 (${EGREEN} " Installing exec file "${EWHITE}"chewbacca"; ${RESET})
115 cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/
116 (${EGREEN} " Installing "${EWHITE}"yoda headers";${RESET})
117 (cd $(BASEDIR)/event/ && make distclean)
118 rm -rf $(PAM_INC)/yoda/
119 cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda
120 cp -rf $(PAM_LIB)/libyoda.so $(BASEDIR)/event/
121 (${EGREEN}"")
122 (cd YodaProfiler && make forceinstall)
123 endif

  ViewVC Help
Powered by ViewVC 1.1.23