annotate lib/Makefile @ 1:b5139af1a420 tip basis

Fixed permissions on compile scripts
author Mike Spivey <mike@cs.ox.ac.uk>
date Fri, 13 Oct 2017 17:27:58 +0100
parents bfdcc3820b32
children
rev   line source
mike@0 1 all: common.cma
mike@0 2
mike@0 3 LIB = print.cmo source.cmo growvect.cmo
mike@0 4
mike@0 5 # Get OCaml version in the form 402 for ocaml 4.02.1 etc.
mike@0 6 VER := $(shell ocamlc -v | sed -n '1s/.*\([0-9]\)\.\([0-9][0-9]\).*/\1\2/p')
mike@0 7
mike@0 8 # Define NEEDBYTES unless version >= 4.02
mike@0 9 NEEDBYTES := $(shell test $(VER) -ge 402 || echo 1)
mike@0 10
mike@0 11 ifdef NEEDBYTES
mike@0 12 LIB += bytes.cmo
mike@0 13 endif
mike@0 14
mike@0 15 common.cma: $(LIB)
mike@0 16 ocamlc -a $^ -o $@
mike@0 17
mike@0 18 %.cmi: %.mli
mike@0 19 ocamlc -c $< -o $@
mike@0 20
mike@0 21 %.cmo: %.ml
mike@0 22 ocamlc -c $< -o $@
mike@0 23
mike@0 24 clean: force
mike@0 25 rm -f *.cmi *.cmo common.cma
mike@0 26
mike@0 27 force:
mike@0 28
mike@0 29 ###
mike@0 30
mike@0 31 print.cmo: print.cmi
mike@0 32 source.cmo: source.cmi
mike@0 33 growvect.cmo: growvect.cmi