1. Paweł Wieczorek
  2. Opifex

Source

Opifex / Makefile

OCAMLBUILD=ocamlbuild -use-ocamlfind
OCAMLDIRS=\
	-Is src\
	-Is src/Lib\
	-Is src/Lib/Util\
	-Is src/Lib/Algebra\
	-Is src/Language\
	-Is src/Language/While\
	-Is src/Language/MiniML\
	-Is src/Language/CWCPS\
	-Is src/Language/Common\
	-Is src/Analysis/While\
	-Is src/Analysis/MiniML\
	-Is src/Analysis/CWCPS\
	-Is src/Transformation/While\
	-Is src/Transformation/MiniML\
	-Is src/Transformation/CWCPS\

OCAMLLIBS=#-libs unix

PROGRAM=Opifex

SRCS_ALL=${SRCS1} ${PARSERS} ${LEXERS} ${SRCS2}
VERBOSE?=@

.PHONY: clean
.SUFFIXES: .cma

all: ${PROGRAM}

ob:

${PROGRAM}: src/Autogen.ml
	${VERBOSE}${OCAMLBUILD} ${OCAMLLIBS} ${OCAMLDIRS} src/${PROGRAM}.byte

src/Autogen.ml: Makefile 
	@echo "	AUTOGEN		Autogen.ml"
	${VERBOSE}(DATE=`date`; echo "let current_date = \"$${DATE}\"" > src/Autogen.ml)

clean:
	${VERBOSE}${OCAMLBUILD} ${OCAMLDIRS} src/${PROGRAM}.native -clean

%.cma: %.ml
	${VERBOSE}${OCAMLBUILD} ${OCAMLLIBS} ${OCAMLDIRS} $@