#(*************************************************************************)
#(*                                                                       *)
#(*                     Projet      Formel                                *)
#(*                                                                       *)
#(*                            CAML                                       *)
#(*                                                                       *)
#(*************************************************************************)
#(*                                                                       *)
#(*                            Inria                                      *)
#(*                      Domaine de Voluceau                              *)
#(*                      78150  Rocquencourt                              *)
#(*                            France                                     *)
#(*                                                                       *)
#(*************************************************************************)

# Makefile to install the CAML system (try the caml_install command first)
# BEFORE running this makefile, you should set your SHELL environment
# variable to /bin/sh
#

# Use SZCORE=big in order to get a Caml core image with a bigger code size
# Use SZCORE=small for a smaller core image.

SZCORE=
# Change TYPEMACHINE if necessary
TYPEMACHINE=sun
###########################################################################
LISPNAME = camlisp
CAMLCOM = /usr/local/bin/caml
DIR = /usr/local/caml
VERSION = V2-6.1
NAME='Sainte_Flora'
CAMLIBDIR = $(DIR)/$(VERSION)/lib
CAMLODIR = $(DIR)/$(VERSION)/lo
CAMLDIR = $(CAMLODIR)/$(TYPEMACHINE)
CAML = $(CAMLDIR)/caml
CAMLISPDIR = $(DIR)/$(VERSION)/$(LISPNAME)/$(TYPEMACHINE)
CAMLISP = $(CAMLISPDIR)/$(LISPNAME)$(SZCORE)
CAMLISPCORE = $(CAMLISP)$(SZCORE).core
CAMLCORE = $(CAML)$(SZCORE).core
PWD = `/bin/pwd`
STAR = $$*

caml: $(CAMLISPCORE) $(CAMLCORE)

$(DIR):
	ln -s $(PWD)/.. $(DIR)

$(CAMLISPCORE): $(CAMLISPDIR)/Makefile $(CAMLISPDIR)/camlispbin
	cd $(CAMLISPDIR); make $(MFLAGS) -f Makefile camlisp$(SZCORE)

$(CAMLCORE): $(CAMLISPCORE)
#	-find $(CAMLISPDIR)/.. -exec /bin/chmod 755 {} \;
#	-find $(CAMLODIR) -exec /bin/chmod 755 {} \;
#	-find $(CAMLIBDIR) -exec /bin/chmod 755 {} \;
#	-touch $(CAMLIBDIR)/*.lo
	./make-leml $(NAME) $(CAMLISP) caml$(SZCORE) $(CAMLDIR)/

touch:
	touch $(CAMLISPCORE)
