#!/bin/csh

# ****************************************************************************
#  FILE     : cleanup
#  SHORTNAME: cleanup

#  PURPOSE  : Shell scipt to call "make clean" in
#	      1) kernel in the directory kernel/source
#	      2) X user interface in xgui/source
#	      3) compiler in compiler/source (commented out )
#	      4) tools in tools/source

#  AUTHOR   : Tilman Sommer, Niels Mache, Thomas Korb, Ralf Huebner
#  VERSION  : 2.1
#  DATE     : 1.1.1991

#  MODIFICATIONS:
#  19.08.93: tools added (R. Huebner)

#             Copyright (c) 1990-1995  SNNS Group, IPVR, Univ. Stuttgart, FRG
#
# ****************************************************************************



echo "************************************************"
echo "*                                              *"
echo "*  SNNS  - Stuttgart Neural Network Simulator  *"
echo "*                                              *"
echo "*         cleaning SNNS version 4.0 ...        *"
echo "*                                              *"
echo "************************************************"
echo ""
echo ""
set rootdir = `echo $cwd`
if ( $1 == 'all' || $1 == 'kernel' || $1 == 'sim') then
	echo "Cleaning kernel ... "
	cd kernel/sources
	echo "Deleting all object files ..."
	make clean
	cd ../.. 
	echo "Done."
	echo ""
else
endif

if ( $1 == 'all' || $1 == 'xgui' || $1 == 'sim') then
	echo "Cleaning XGUI ... "
	cd xgui/sources
	make clean 
	cd ../.. 
	echo "Done."
	echo ""
else
endif

#if ( $1 == 'all' || $1 == 'compiler') then
#	echo "Cleaning compiler ... "
#	cd compiler/sources 
#	echo "Deleting all object files ..."
#	make clean
#	cd ../.. 
#	echo "Done."
#	echo ""
#else
#endif

if ( $1 == 'all' || $1 == 'rpc' ) then
	echo "Cleaning rpc ... "
	cd rpc/sources
	make clean 
	cd ../.. 
	echo "Done."
	echo ""
else
endif

if ( $1 == 'all' || $1 == 'tools' ) then
	echo "Cleaning Tools ... "
	cd tools/sources
	make clean 
	cd ../.. 
	echo "Done."
	echo ""
else
endif




