view lib/Makefile @ 1:b683d796e07e tip basis

Added generated Keiko files
author Mike Spivey <mike@cs.ox.ac.uk>
date Mon, 10 Sep 2018 20:34:00 +0100
parents 5dd13b8deb54
children
line wrap: on
line source
all: common.cma

LIB = print.cmo source.cmo growvect.cmo

# Get OCaml version in the form 402 for ocaml 4.02.1 etc.
VER := $(shell ocamlc -v | sed -n '1s/.*\([0-9]\)\.\([0-9][0-9]\).*/\1\2/p')

# Define NEEDBYTES unless version >= 4.02
NEEDBYTES := $(shell test $(VER) -ge 402 || echo 1)

ifdef NEEDBYTES
    LIB += bytes.cmo
endif

common.cma: $(LIB)
	ocamlc -a $^ -o $@ 

%.cmi: %.mli
	ocamlc -c $< -o $@

%.cmo: %.ml
	ocamlc -c $< -o $@

clean: force
	rm -f *.cmi *.cmo common.cma

force:

###

print.cmo: print.cmi
source.cmo: source.cmi
growvect.cmo: growvect.cmi