1 # Interface to Perl from OCaml.
2 # Copyright (C) 2003 Merjis Ltd.
3 # $Id: Makefile,v 1.2 2003-10-12 10:52:00 rich Exp $
5 include Makefile.config
9 OCAMLMKLIB := ocamlmklib
12 OCAMLCFLAGS := -w s -g
16 CFLAGS := -Wall -Wno-unused -I$(PERLINCDIR)
22 perl.cma: perl.cmo perl_c.o
23 $(OCAMLMKLIB) -o perl $^ -lperl
25 perl.cmxa: perl.cmx perl_c.o
26 $(OCAMLMKLIB) -o perl $^ -lperl
29 $(OCAMLC) perl.cma $^ -o $@
32 $(OCAMLC) $(OCAMLCFLAGS) -c $<
35 $(OCAMLC) $(OCAMLCFLAGS) -c $<
38 $(OCAMLOPT) $(OCAMLOPTFLAGS) -c $<
40 .SUFFIXES: .mli .ml .cmi .cmo .cmx
45 rm -f core *~ *.bak *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so test
49 ifeq ($(wildcard .depend),.depend)
55 .depend: $(wildcard *.ml) $(wildcard *.mli)
56 $(OCAMLDEP) *.mli *.ml > .depend