# Generated automatically from Makefile.in by configure.
# 
# The LOOP Project
# 
# The LOOP Team, Dresden University and Nijmegen University
# 
# Copyright (C) 2002
# 
# This program 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.
# 
# This program 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 in file COPYING in this or one of the
# parent directories for more details.
# 
# Created 23.1.02 by Hendrik
# 
# Time-stamp: <Monday 8 October 01 17:58:00 tews@ithif51>
# 
# Top level Makefile
# 
# $Id: Makefile,v 1.5 2002/05/03 15:01:02 tews Exp $
# 


######################################################################
#
# CONFIGURE SECTION
#
######################################################################


# Autoconf uses both prefix and exec_prefix. 
# Here both should be identified. If configuring manually 
# delete (or uncomment) prefix and configure exec_prefix.
prefix=/usr/local

# prefix for BINDIR and LIBDIR, set this to /usr/local,
# or leave it and set BINDIR and LIBDIR individually
exec_prefix=${prefix}


# Directory for executables. 
# This is where ccslc (and optionally ccslc.opt) will be installed
BINDIR=${exec_prefix}/bin

# Library directory.
# This is where the PVS fixedpoints library will be installed.
LIBDIR=${exec_prefix}/lib/ccsl/pvs

# Man page directory.
# the manpages will be installed in MANDIR/man1
MANDIR=${prefix}/man

# Set the names of the ocaml compilers. Does not need a change 
# under normal circumstances. 
# Using the .opt versions saves you about just as much time as
# you need to read this.
OCAMLC_NAME=ocamlc
OCAMLOPT_NAME=ocamlopt
#OCAMLC_NAME=ocamlc.opt
#OCAMLOPT_NAME=ocamlopt.opt

######################################################################
#
# END OF CONFIGURE SECTION
#
######################################################################

# There should be no need to change anything below.

# OCAMLDIR holds the directory where the ocaml executables can be found
# In all normal circumstances these executables are found via the 
# the search path and OCAMLDIR should stay empty.
OCAMLDIR=
#
# If the executables are not in the search path, then set the variable 
# like
#OCAMLDIR=/usr/local/ocaml-2.04/bin

# The programm used for installing
INSTALL=./install-sh -c
#INSTALL=./install-sh -c

# insert -g here for compiling with debugging support
export COMPFLAGS=


#append a slash to OCAMLDIR
OCAMLDIR1=$(subst //,/,$(if $(OCAMLDIR),$(OCAMLDIR)/,))

# names of the ocaml binaries

export OCAMLLEX=$(OCAMLDIR1)ocamllex
export OCAMLYACC=$(OCAMLDIR1)ocamlyacc
export OCAMLCP=$(OCAMLDIR1)ocamlcp
export OCAMLDEP=$(OCAMLDIR1)ocamldep
export OCAMLMKTOP=$(OCAMLDIR1)ocamlmktop

export OCAMLC=$(OCAMLDIR1)$(OCAMLC_NAME)
export OCAMLOPT=$(OCAMLDIR1)$(OCAMLOPT_NAME)


PVSLIBDIR=$(LIBDIR)


all: 
	$(MAKE) -C Keywords -e
	$(MAKE) -C Common -e
	$(MAKE) -C Ccsl -e ccslc

opt: 
	$(MAKE) -C Common -e native
	$(MAKE) -C Ccsl -e ccslc.opt


install:
	$(INSTALL) -d $(BINDIR)
	$(INSTALL) -d $(PVSLIBDIR)
	$(INSTALL) -d $(MANDIR)/man1
	$(INSTALL) Ccsl/ccslc $(BINDIR)
	if test -f Ccsl/ccslc.opt ; then \
		$(INSTALL) Ccsl/ccslc.opt $(BINDIR) ; \
	fi
	for f in Lib/Pvs/* ; do \
		$(INSTALL) $$f $(PVSLIBDIR); \
	done
	$(INSTALL) Doc/ccslc.1 $(MANDIR)/man1
	$(INSTALL) Doc/ccslc.opt.1 $(MANDIR)/man1

uninstall:
	rm -f $(BINDIR)/ccsl
	rm -f $(BINDIR)/ccslc.opt
	rmdir $(BINDIR)
	for f in Lib/Pvs/* ; do \
		rm -f $(PVSLIBDIR)/$$f; \
	done
	rmdir $(PVSLIBDIR)


depend:
	for f in Keywords Common Ccsl ; do \
		touch $$f/.depend; \
	done
	$(MAKE) -C Keywords depend
	$(MAKE) -C Ccsl depend

clean:
	$(MAKE) -C Common cleanall
	$(MAKE) -C Doc clean


.PHONY: all opt clean install uninstall depend


### Local Variables: ***
### version-control: t ***
### kept-new-versions: 5 ***
### delete-old-versions: t ***
### time-stamp-line-limit: 30 ***
### End: ***
