2001-09-07 00:55:07 -07:00
|
|
|
# $Id$
|
|
|
|
|
|
|
|
include ../config/Makefile
|
|
|
|
|
|
|
|
SHELL=/bin/sh
|
|
|
|
|
|
|
|
INCLUDES=-I $(OTOP)/otherlibs/dynlink
|
2002-01-20 07:12:32 -08:00
|
|
|
OCAMLCFLAGS=-warn-error A $(INCLUDES)
|
2001-09-07 00:55:07 -07:00
|
|
|
LINKFLAGS=$(INCLUDES)
|
|
|
|
|
|
|
|
OBJS=odyl_config.cmo odyl_main.cmo
|
|
|
|
|
|
|
|
all: odyl$(EXE)
|
|
|
|
|
|
|
|
opt: odyl.cmxa odyl.cmx
|
|
|
|
|
|
|
|
odyl$(EXE): odyl.cma odyl.cmo
|
|
|
|
$(OCAMLC) odyl.cma odyl.cmo -o odyl$(EXE)
|
|
|
|
|
|
|
|
odyl.cma: $(OBJS)
|
|
|
|
$(OCAMLC) $(LINKFLAGS) dynlink.cma $(OBJS) -a -o odyl.cma
|
|
|
|
|
|
|
|
odyl.cmxa: $(OBJS:.cmo=.cmx)
|
|
|
|
$(OCAMLOPT) $(LINKFLAGS) $(OBJS:.cmo=.cmx) -a -o odyl.cmxa
|
|
|
|
|
2001-09-10 02:56:14 -07:00
|
|
|
odyl_main.cmx: odyl_main.ml
|
|
|
|
$(CAMLP4_COMM) -nolib -DOPT -o odyl_main.ppo odyl_main.ml
|
|
|
|
$(OCAMLOPT) -c -impl odyl_main.ppo
|
|
|
|
rm -f odyl_main.ppo
|
2001-09-07 00:55:07 -07:00
|
|
|
|
2001-10-03 04:50:08 -07:00
|
|
|
odyl_config.ml:
|
2001-09-07 00:55:07 -07:00
|
|
|
echo "let standard_library =" > odyl_config.ml
|
|
|
|
echo " try Sys.getenv \"CAMLP4LIB\" with" >> odyl_config.ml
|
2003-07-10 05:28:35 -07:00
|
|
|
echo " Not_found -> \"$(LIBDIR)/camlp4\"" | \
|
|
|
|
sed -e 's|\\|/|g' >> odyl_config.ml
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
clean::
|
2001-10-03 04:50:08 -07:00
|
|
|
rm -f *.cm* *.pp[io] *.o *.bak .*.bak *.out *.opt *.a
|
2001-09-07 00:55:07 -07:00
|
|
|
rm -f odyl_config.ml odyl$(EXE)
|
|
|
|
|
|
|
|
depend:
|
|
|
|
cp .depend .depend.bak
|
|
|
|
> .depend
|
|
|
|
@for i in *.mli *.ml; do \
|
2002-02-12 09:25:14 -08:00
|
|
|
../tools/apply.sh pr_depend.cmo -- $(INCLUDES) $$i | \
|
2002-02-12 09:31:31 -08:00
|
|
|
sed -e 's| $(OTOP)/otherlibs/dynlink/dynlink.cmx||' | \
|
2002-02-12 09:25:14 -08:00
|
|
|
sed -e 's| \.\./\.\.| $$(OTOP)|g' >> .depend; \
|
2001-09-07 00:55:07 -07:00
|
|
|
done
|
|
|
|
|
|
|
|
promote:
|
|
|
|
|
|
|
|
compare:
|
|
|
|
|
|
|
|
install:
|
2003-07-10 05:28:35 -07:00
|
|
|
-$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
|
2003-07-14 10:59:30 -07:00
|
|
|
cp odyl.cmo odyl.cma odyl_main.cmi $(LIBDIR)/camlp4/.
|
|
|
|
if test -f odyl.cmxa; then cp odyl.cmxa odyl.a $(LIBDIR)/camlp4/.; fi
|
2001-09-07 00:55:07 -07:00
|
|
|
|
|
|
|
include .depend
|