--- chewbacca/Makefile 2008/10/01 10:04:49 1.4 +++ chewbacca/Makefile 2008/12/30 14:21:16 1.7 @@ -1,29 +1,36 @@ # # # - - -ifndef BASEDIR - BASEDIR =$(shell pwd) -endif - -ifdef release - debug = 0 - release = 1 -endif - -ifndef release - debug = 1 - release = 0 -endif - -export LDFLAGS+=$(PAM_BIT) -export CFLAGS+=$(PAM_BIT) -export FFLAGS+=$(PAM_BIT) - +export debug=0 +export release=1 +# +export RED='\E[1;31;40m' +export GREEN='\E[1;32;40m' +export YELLOW='\E[1;33;40m' +export BLUE='\E[1;34;40m' +export WHITE='\E[1;37;40m' +export VIOLET='\E[1;35;40m' +export CYAN='\E[1;36;40m' +# Here the echo definition to use them +export EVIOLET=echo -e ${VIOLET} +export ECYAN=echo -e ${CYAN} +export ERED=echo -e ${RED} +export EGREEN=echo -e ${GREEN} +export EYELLOW=echo -e ${YELLOW} +export EBLUE=echo -e ${BLUE} +export EWHITE=echo -e ${WHITE} +# Reset the terminal +export RESET=tput sgr0 +# +export BASEDIR=$(shell echo `pwd`) +export LD_LIBRARY_PATH+=$(BASEDIR)/event +# +export LDFLAGS+=$(PAM_BIT) +export CFLAGS+=$(PAM_BIT) +export FFLAGS+=$(PAM_BIT) +# DIRS=event PamOffLineSW YodaProfiler - - +# all: for sub_dir in $(DIRS) ; do \ ( cd $$sub_dir && make BASEDIR=$(BASEDIR)) ; \ @@ -38,10 +45,10 @@ done install: - @echo " Creating PAMELA environment " - @if [ "$(PAM_SOFTWARE)" == "" ]; then echo "";\ - echo "PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING";\ - echo ""; \ + @(${EGREEN} " Creating PAMELA environment "; ${RESET}) + @if [ "$(PAM_SOFTWARE)" == "" ]; then (${ERED} ""; ${RESET}); \ + (${ERED} " PLEASE SET THE PAMELA ENVIRONMENT BEFORE INSTALLING "; ${RESET}); \ + (${ERED} ""; ${RESET}); \ exit; fi @if [ ! -d $(PAM_HOME) ]; then mkdir $(PAM_HOME); fi @if [ ! -d $(PAM_SOFTWARE) ]; then mkdir $(PAM_SOFTWARE); fi @@ -54,12 +61,16 @@ @if [ ! -d $(PAM_SRC) ]; then mkdir $(PAM_SRC); fi @if [ ! -d $(PAM_CALIB) ]; then mkdir $(PAM_CALIB); fi @if [ ! -d $(FEV_PLUGIN) ]&&[ "$(FEV_PLUGIN)" != "" ]; then mkdir $(FEV_PLUGIN); fi - @echo " Installing libyoda.so " + @(${EGREEN} " Installing "${EWHITE}"libyoda.so "; ${RESET}) @cp -f $(BASEDIR)/event/libyoda.so.0.0.0 $(PAM_LIB)/ @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.0 - @echo " Installing chewbacca executable " + @(${EGREEN} " Installing exec file "${EWHITE}"chewbacca"; ${RESET}) @cp -f $(BASEDIR)/PamOffLineSW/chewbacca $(PAM_BIN)/ - @echo " Installing yoda headers " + @(${EGREEN} " Installing "${EWHITE}"yoda headers";${RESET}) + @(cd $(BASEDIR)/event/ && make distclean) + @rm -rf $(PAM_INC)/yoda/ @cp -rf $(BASEDIR)/event/ $(PAM_INC)/yoda/ + @cp -rf $(PAM_LIB)/libyoda.so $(BASEDIR)/event/ + @(${EGREEN}"") @(cd YodaProfiler && make forceinstall)