From 566dc80134a61ef7909315ddc902da511741e5f1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 9 Nov 2002 12:02:04 +0000 Subject: *** empty log message *** --- perl_checker.src/Makefile | 84 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 perl_checker.src/Makefile (limited to 'perl_checker.src/Makefile') diff --git a/perl_checker.src/Makefile b/perl_checker.src/Makefile new file mode 100644 index 0000000..0dc65c2 --- /dev/null +++ b/perl_checker.src/Makefile @@ -0,0 +1,84 @@ +CSLC = ocamlcp -p a +CSLC = ocamlc +CSLOPT = ocamlopt +CSLDEP = ocamldep +CSLLEX = ocamllex +CSLYACC = ocamlyacc +CSLFLAGS = -w A -g +CSLOPTFLAGS = + +LEX_FILES = $(wildcard *.mll) +YACC_FILES = $(wildcard *.mly) +TMP_MLFILES = $(YACC_FILES:%.mly=%.ml) $(LEX_FILES:%.mll=%.ml) +TMP_MLIFILES = $(YACC_FILES:%.mly=%.mli) + +ALL_PROGS = perl_checker + +PROG_OBJS_WITH_CMI = parser.cmo print.cmo perl_checker.cmo +PROG_OBJS = common.cmo flags.cmo info.cmo $(LEX_FILES:%.mll=%.cmo) $(PROG_OBJS_WITH_CMI) +CMA_FILES = + +PROG_OBJX_WITH_CMI = $(PROG_OBJS_WITH_CMI:%.cmo=%.cmx) +PROG_OBJX = $(PROG_OBJS:%.cmo=%.cmx) +CMXA_FILES = $(CMA_FILES:%.cma=%.cmxa) + +.PHONY: depend tags clean + +default: .compiling TAGS $(ALL_PROGS) + rm -f .compiling + +all: perl_checker + +perl_checker: .depend $(PROG_OBJS) + $(CSLC) -custom $(CSLFLAGS) $(LIBDIRS) -o $@ $(CMA_FILES) $(PROG_OBJS) + cp -f perl_checker perl_checker_debug + +perl_checker_opt: .depend $(PROG_OBJX) + $(CSLOPT) $(CSLOPTFLAGS) $(LIBDIRS) -o $@ $(CMXA_FILES) $(PROG_OBJX) + +.compiling: + touch $@ + +# Common rules +.SUFFIXES: .ml .mli .cmo .cmi .cmx .mll .mly + +%.ml: %.mll types.cmi parser.cmi + $(CSLLEX) $< + +%.mli %.ml: %.mly + $(CSLYACC) $< + +$(PROG_OBJS_WITH_CMI): %.cmo: %.cmi + +$(PROG_OBJX_WITH_CMI): %.cmx: %.cmi + +%.cmo: %.ml + $(CSLC) $(CSLFLAGS) -c $< + +%.cmx: %.ml + $(CSLOPT) $(CSLOPTFLAGS) -c $< + +.mli.cmi: + $(CSLC) $(CSLFLAGS) -c $< + +clean: + rm -f $(ALL_PROGS) *~ *.o *.cm[iox] $(TMP_MLIFILES) $(TMP_MLFILES) .depend .compiling TAGS gmon.out ocamlprof.dump + +tags: + ocamltags *.ml + +TAGS: + ocamltags *.ml + +# Dependencies +depend: .depend +.depend: + $(CSLDEP) $(INCLUDES) *.mli *.mll *.ml > .depend + +# missing dependencies: +perl_checker.cmo: lexer.cmi +perl_checker.cmx: lexer.cmi +lexer.cmx: common.cmi +lexer.cmo: common.cmi + +-include .depend -- cgit v1.2.1