#! /bin/csh -f

#	###-----------------------------------------------------------###
#	#   TOP is the absolute path where Alliance is to be installed.	#
#	# Sources are read in $TOP/tools/*/sce				#
#	###-----------------------------------------------------------###

setenv TOP /alliance

#	###-----------------------------------------------------------###
#	#   MACHINE defines the architecture on which Alliance is	#
#	# compiled. Supported architectures are :			#
#	#	sparc	for SparcStation				#
#	#	dec	for Decsystem 5100				#
#	#	sun	for Sun3					#
#	#	pc	for 386-pc under Linux				#
#	###-----------------------------------------------------------###

setenv MACHINE sparc

#	###-----------------------------------------------------------###
#	#   create the architecture if it deos not exist. Link the	#
#	# source file for each tool for that particular architecture	#
#	###-----------------------------------------------------------###

if (! -d $TOP/archi/$MACHINE ) then
  mkdir $TOP/archi/$MACHINE
  mkdir $TOP/archi/$MACHINE/lib
  mkdir $TOP/archi/$MACHINE/include
  mkdir $TOP/archi/$MACHINE/bin

  foreach TOOL (tools/*)
    echo "-------- creating object directories for $TOOL -------"
    mkdir $TOOL/archi/$MACHINE
    mkdir $TOOL/archi/$MACHINE/obj
    mkdir $TOOL/archi/$MACHINE/lib
    mkdir $TOOL/archi/$MACHINE/include
    mkdir $TOOL/archi/$MACHINE/bin
    Linkarchi $TOOL/sce $TOOL/archi/$MACHINE/obj
  end

endif 

#	###-----------------------------------------------------------###
#	#   install Alliance tools :					#
#	#								#
#	#   if you want ALL Alliance tools be installed just uncomment	#
#	#       the line "make all" (remove the # (sharp) from the	#
#	#       first column)						#
#	#								#
#	#   otherwise, for each tool you want to be installed,		#
#	#       uncomment the corresponding line :			#
#	#								#
#	#   alligator   : logic synthesis tool for FPGA			#
#	#   amg         : multiplier generator				#
#	#   asimut      : VHDL simulator                            (1)	#
#	#   bbr         : router between 2 blocks                   (2)	#
#	#   bsg         : barrel shifter genertor                   (2)	#
#	#   cheops      : floor plan router                         (4) #
#	#   desb        : functional absractor                      (1)	#
#	#   dlx_asm     : DLX assembler                             (2)	#
#	#   dpr         : data-path place & route                   (2)	#
#	#   dreal       : real layout viewer                        (3) #
#	#   druc        : design rule checker                       (1)	#
#	#   fpgen       : procedural data-path generation language  (2)	#
#	#   genlib      : procedural net-list generation language	#
#	#   genpat      : procedural pattern generation language    (1)	#
#	#   genview     : interactive block genreator debugger		#
#	#   graal       : graphic layout editor                     (3)	#
#	#   grog        : rom generator					#
#	#   l2p         : layout to postcript translation tool		#
#	#   logic       : logic synthesis tool                      (1)	#
#	#   lvx         : net-list comparator                       (1)	#
#	#   lynx        : layout extractor                          (1)	#
#	#   netoptim    : net-list optimiser                        (1)	#
#	#   proof       : VHDL description's formal proover		#
#	#   rage        : ram generator					#
#	#   rfg         : register file generator                   (2)	#
#	#   ring        : router between core & pads                (1)	#
#	#   rsa         : fast adder generator                      (2)	#
#	#   s2r         : symbolic layout to real mask expander     (1)	#
#	#   scr         : standard cells place & route              (1)	#
#	#   syf         : finite state machine synthesis tool       (2)	#
#	#   tas         : static timing analyser                    (1) #
#	#								#
#	#        (1) : tool needed for all tutorials			#
#	#        (2) : tool needed for the DLXm tutorial		#
#	#        (3) : tool needing OSF/Motif				#
#	#        (4) : sources not available - executable on Sparc	#
#	###-----------------------------------------------------------###

make all

#make install-alligator
#make install-amg
#make install-asimut
#make install-bbr
#make install-bsg
#make install-cheops
#make install-desb
#make install-dlx_asm
#make install-dpr
#make install-dreal
#make install-druc
#make install-fpgen
#make install-genlib
#make install-genpat
#make install-genview
#make install-graal
#make install-grog
#make install-l2p
#make install-logic
#make install-lvx
#make install-lynx
#make install-netoptim
#make install-proof
#make install-rage
#make install-rfg
#make install-ring
#make install-rsa
#make install-s2r
#make install-scr
#make install-syf
#make install-tas

#	###-----------------------------------------------------------###
#	#   saving disk space :						#
#	#								#
#	#   once desired tools have been installed to save disk space	#
#	#   - keeping only source files -  uncomment the following line	#
#	#								#
#	#   If you do NOT want to keep source files just remove		#
#	#   recursively the $TOP/tools directory			#
#	###-----------------------------------------------------------###

#make clean-tools
