/[PAMELA software]/chewbacca/Makefile
ViewVC logotype

Diff of /chewbacca/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by mocchiut, Wed Oct 1 10:04:49 2008 UTC revision 1.8 by mocchiut, Fri Apr 17 09:56:16 2009 UTC
# Line 1  Line 1 
1  #  #
2  #  #
3  #  #
4    export debug=0
5    export release=1
6  ifndef BASEDIR  #
7          BASEDIR =$(shell pwd)  export RED='\E[1;31;40m'
8  endif  export GREEN='\E[1;32;40m'
9    export YELLOW='\E[1;33;40m'
10  ifdef release  export BLUE='\E[1;34;40m'
11        debug = 0  export WHITE='\E[1;37;40m'
12        release = 1  export VIOLET='\E[1;35;40m'
13  endif  export CYAN='\E[1;36;40m'
14    # Here the echo definition to use them
15  ifndef release  export EVIOLET=echo -e ${VIOLET}
16       debug = 1  export ECYAN=echo -e ${CYAN}
17       release = 0  export ERED=echo -e ${RED}
18  endif  export EGREEN=echo -e ${GREEN}
19    export EYELLOW=echo -e ${YELLOW}
20  export LDFLAGS+=$(PAM_BIT)  export EBLUE=echo -e ${BLUE}
21  export CFLAGS+=$(PAM_BIT)  export EWHITE=echo -e ${WHITE}
22  export FFLAGS+=$(PAM_BIT)  # 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  DIRS=event PamOffLineSW YodaProfiler
33    #
   
34  all:  all:
35          for sub_dir in $(DIRS) ; do \          for sub_dir in $(DIRS) ; do \
36                  ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \                  ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \
# Line 38  distclean: Line 45  distclean:
45          done          done
46    
47  install:  install:
48          @echo " Creating PAMELA environment "          @(${EGREEN} " Creating PAMELA environment "; ${RESET})
49          @if [ "$(PAM_SOFTWARE)" == "" ]; then echo "";\          @if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \
50                  echo "PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING";\                  (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \
51                  echo ""; \                  (${ERED} ""; ${RESET}); \
52                  exit; fi                  exit; fi
53          @if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi          @if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi
54          @if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi          @if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi
# Line 54  install: Line 61  install:
61          @if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi          @if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi
62          @if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi          @if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi
63          @if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi          @if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi
64          @echo " Installing libyoda.so "          @(${EGREEN} " Installing "${EWHITE}"libyoda.so "; ${RESET})  
65          @cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/          @cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/
66          @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so          @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so
67          @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0          @ln -sf $(PAM_LIB)/libyoda.so.0.0.0 $(PAM_LIB)/libyoda.so.0
68          @echo " Installing chewbacca executable "          @(${EGREEN} " Installing exec file "${EWHITE}"chewbacca"; ${RESET})  
69          @cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/          @cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/
70          @echo " Installing yoda headers "          @(${EGREEN} " Installing "${EWHITE}"yoda headers";${RESET})  
71          @cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda/          @(cd $(BASEDIR)/event/ && make distclean)
72            @rm -rf $(PAM_INC)/yoda/
73            @cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda
74            @cp -rf $(PAM_LIB)/libyoda.so $(BASEDIR)/event/
75            @(${EGREEN}"")
76          @(cd YodaProfiler && make forceinstall)          @(cd YodaProfiler && make forceinstall)

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.23