###############################################################################
#                                                                             #
#   Copyright 2005 University of Cambridge Computer Laboratory.               #
#                                                                             #
#   This file is part of Nprobe.                                              #
#                                                                             #
#   Nprobe is free software; you can redistribute it and/or modify            #
#   it under the terms of the GNU General Public License as published by      #
#   the Free Software Foundation; either version 2 of the License, or         #
#   (at your option) any later version.                                       #
#                                                                             #
#   Nprobe is distributed in the hope that it will be useful,                 #
#   but WITHOUT ANY WARRANTY; without even the implied warranty of            #
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             #
#   GNU General Public License for more details.                              #
#                                                                             #
#   You should have received a copy of the GNU General Public License         #
#   along with Nprobe; if not, write to the Free Software                     #
#   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA #
#                                                                             #
###############################################################################

#
# Where to find various stuff
#

# Archive root
NPROBE_ROOT = ../..

# Import all relative paths defined at top level
include $(NPROBE_ROOT)/Makefile.paths

###############################################################################

#
# Stuff to copy to install directories
#

# Callable top-level analysis scripts -> install/bin
ANAL_SCRIPTS = client_summary.py connsum.py log_ex.py np_nretrans.py \
	np_obtree.py np_read.py np_sperf.py np_tcp.py np_timesort.py \
	pagesum.py pagesum2.py pt_summary.py serverconns_summary.py \
	server_summary.py np_rets.py



###############################################################################

all: update_install

tidy:

clean:
	rm -f *.pyc

very_clean: clean 

clobber: clean
	@rm -vf $(addprefix $(INSTALL_BIN_DIR)/, $(ANAL_SCRIPTS))
	@rm -vf $(addprefix $(INSTALL_BIN_DIR)/, $(addsuffix .pyc, $(basename $(ANAL_SCRIPTS))))

# copy everything useful to install directories, or update as necessary
install: install_dirs
	@cp -uvf $(ANAL_SCRIPTS) $(INSTALL_BIN_DIR)
	@touch install_bin

update_install: install_dirs install_bin

install_bin: $(ANAL_SCRIPTS)
	@cp -fv $? $(INSTALL_BIN_DIR)
	@touch install_bin

# Create install dirs if necessary
install_dirs: 
	@if [ ! -d $(INSTALL_LIB_DIR) ]; \
		then \
			mkdir -p $(INSTALL_LIB_DIR); \
			echo Created $(INSTALL_LIB_DIR); \
	fi
	@if [ ! -d $(INSTALL_BIN_DIR) ]; \
		then \
			mkdir -p $(INSTALL_BIN_DIR); \
			echo Created $(INSTALL_BIN_DIR); \
	fi

depend:
