#
# Copyright (c) 1989, 1990, 1991, 1992, 1993
# by Helsinki University of Technology, Digital Systems Laboratory.
# All rights reserved.
#
# Authors of prodfile: Marko Rauhamaa, James Reilly,
#                      and Kimmo Varpaaniemi
#
# Current version:
#     $Id$
#
# Description:
#     prodfile is the default command file of PROD's program prod.
#     User can select another file instead by using "-p" option.
#     For each "$*.suffix:" in the command file, prod executes the
#     commands in the corresponding block for each argument (command
#     line argument of prod) having the suffix in question.
#
# Version history:
#     $Log$

$(BIN)=$(CHEMINATELIER)/bin/#
$(CURDIR)=./#
$(INCLUDE)=$(CHEMINATELIER)/include#
$(LIB)=$(CHEMINATELIER)/bin/lib/#
$(O)=.o#
$(COMPILE)=cc -c -DOWNALLOC -DUNIX -g -I$(INCLUDE)#
$(DELETE)=/bin/rm -f#
$(LINK)=cc -g -o#
$(WRITE)=echo#
$(WRITELN)=echo#

$*.net:
  @$(WRITE) Compiling...
  @$(BIN)prpp -DUNIX -I$(INCLUDE) -L -u1000 $*.net
  @$(COMPILE) $*.c
  @$(DELETE) $*.exe
  @$(LINK) $*.exe $*$(O) $(LIB)*$(O)
  @$(WRITELN)
  @$(WRITE) Generating reachability graph
  @$(CURDIR)$*.exe $(OPTIONPOINT) $(OPTIONGENERATION) $(OPTIONNBNOEUD) $(OPTIONGRAINE) $*.gph
  @$(WRITE) Computing strongly connected components...
  @$(BIN)strong $*.gph
;
$*.exe:
  @$(WRITE) Generating reachability graph
  @$(CURDIR)$*.exe $(OPTIONPOINT) $(OPTIONGENERATION) $(OPTIONNBNOEUD) $(OPTIONGRAINE) $*.gph
  @$(WRITE) Computing strongly connected components...
  @$(BIN)strong $*.gph
;
$*.gph:
  @$(BIN)probe -. -l$(CHEMINATELIER)/ctl.prb -l$*.def -h$(CHEMINATELIER)/probhelp $*.gph
