https://gitorious.org/ocamlp3l/ocamlp3l_cvs.git
Revision 1802f09130f30875586dcd8f7b60b9204973d103 authored by weis on 02 May 2006, 12:34:19 UTC, committed by weis on 02 May 2006, 12:34:19 UTC
1 parent 70722f5
Tip revision: 1802f09130f30875586dcd8f7b60b9204973d103 authored by weis on 02 May 2006, 12:34:19 UTC
Adding proper compile flags to the Caml compilers.
Adding proper compile flags to the Caml compilers.
Tip revision: 1802f09
makefile
#
# Modify the following variables according to the installation
# directory you choose
#
INSTALLDIR=/usr/local/ocamlp3l
INSTALLBINDIR=/usr/local/bin
###
# You should not have to modify anything below this line!
###
VERSION=2.01
LIBDIR=$(INSTALLDIR)/lib
BINDIR=$(INSTALLDIR)/bin
#
# Top level makefile to build and install everything for OcamlP3L
#
OCAMLC=ocamlc -warn-error A -g
OCAMLOPT=ocamlopt -warn-error A -inline 10000 -noassert
MKFILES=Makefile
SOURCE=$(notdir $(wildcard Source/*.ml Source/*.ml?))
MODELS=thread process
MODELPREFIX=v
MODELDIRS=$(MODELS:%=$(MODELPREFIX)%)
MODELMKFILES=$(foreach modeldir, $(MODELDIRS), $(addprefix $(modeldir)/, $(MKFILES)))
MODELSOURCE=$(foreach modeldir, $(MODELDIRS), $(addprefix $(modeldir)/, $(SOURCE)))
TOOLDIR=Tools
define insidemake
for i in $(MODELS); do \
(mkdir -p $(MODELPREFIX)$$i; cd $(MODELPREFIX)$$i; \
${MAKE} $@ LIBDIR=$(LIBDIR)/$(MODELPREFIX)$$i MODEL=$$i "OCAMLC=$(OCAMLC)" "OCAMLOPT=$(OCAMLOPT)"); \
done
cd $(TOOLDIR); $(MAKE) $@ "BINDIR=$(BINDIR)" "INSTALLBINDIR=$(INSTALLBINDIR)" "OCAMLC=$(OCAMLC)" "OCAMLOPT=$(OCAMLOPT)"
endef
.PHONY: all install installopt installbin clean makefiles
all: makefiles
$(insidemake)
install:
$(insidemake)
installopt:
$(insidemake)
clean:
$(insidemake)
#installbin: makefiles
# if [ ! -d $(BINSTALLDIR) ]; then mkdir -p $(BINSTALLDIR); fi
# cp ocamlp3lcc $(BINSTALLDIR)
# (cd $(BINSTALLDIR); eval "$(PERL) -i -pe 's/###VERSION###/$(VERSION)/;s%###INSTALLDIR###%$(INSTALLDIR)%;s%###PERL###%$(PERL)%;' ocamlp3lcc"; chmod 755 ocamlp3lcc)
makefiles: $(MODELDIRS) $(MODELMKFILES) $(MODELSOURCE)
$(MODELDIRS):
mkdir $(MODELDIRS)
$(MODELMKFILES):
ln -s ../Source/$(@F) $@
$(MODELSOURCE):
ln -s ../Source/$(@F) $@
uninstall:
rm -rf $(INSTALLDIR)
rm -f $(INSTALLBINDIR)/ocamlp3l*
rm -rf $(MODELDIRS)
Computing file changes ...