From f662d2e81821f81309dc6d5ed13d4064cbbb1605 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Wed, 20 Feb 2013 02:58:18 +0100 Subject: [PATCH] [ocaml][tools] don't use custom runtime for ocaml, instead load shared libraries in ocamlrun since the ivy-ocaml lib currently can't be found with ocamlfind and libpprz is not installed system-wide, specify the paths directly with -dllpath --- sw/tools/Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sw/tools/Makefile b/sw/tools/Makefile index ec51976748..bf724257fe 100644 --- a/sw/tools/Makefile +++ b/sw/tools/Makefile @@ -26,13 +26,13 @@ OCAML=ocaml OCAMLFIND=ocamlfind OCAMLC=ocamlc OCAMLDEP=ocamldep -LIBPPRZDIR=../lib/ocaml +LIBPPRZDIR=$(PAPARAZZI_SRC)/sw/lib/ocaml INCLUDES=-I $(LIBPPRZDIR) -# $(shell ocamlfind query -r -i-format xml-light) -#OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient) -#OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient) LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma +# since the ivy-ocaml lib currently can't be found with ocamlfind, specify the path directly with -dllpath +LIBIVYDIR=/usr/lib/ocaml + all: gen_common.cmo gen_aircraft.out gen_airframe.out gen_messages2.out gen_messages.out gen_ubx.out gen_mtk.out gen_flight_plan.out gen_radio.out gen_periodic.out gen_settings.out gen_xsens.out gen_modules.out gen_autopilot.out gen_abi.out find_free_msg_id.out gen_srtm.out mergelogs FP_CMO = fp_proc.cmo gen_flight_plan.cmo @@ -40,15 +40,15 @@ ABS_FP = $(FP_CMO:%=$$PAPARAZZI_SRC/sw/tools/%) gen_flight_plan.out : $(FP_CMO) @echo OL $@ - $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -custom -o $@ -package unix,str,xml-light -linkpkg ivy-ocaml.cma lib-pprz.cma $^ + $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -o $@ -package unix,str,xml-light -linkpkg -dllpath $(LIBIVYDIR) ivy-ocaml.cma -dllpath $(LIBPPRZDIR) lib-pprz.cma $^ gen_srtm.out : gen_srtm.ml gen_common.cmo $(LIBPPRZCMA) @echo OC $@ - $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -custom -o $@ -package unix,str,xml-light,netclient -linkpkg ivy-ocaml.cma lib-pprz.cma $< + $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -o $@ -package unix,str,xml-light,netclient -linkpkg -dllpath $(LIBIVYDIR) ivy-ocaml.cma -dllpath $(LIBPPRZDIR) lib-pprz.cma $< %.out : %.ml gen_common.cmo $(LIBPPRZCMA) @echo OC $< - $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -custom -o $@ -package unix,str,xml-light -linkpkg ivy-ocaml.cma lib-pprz.cma gen_common.cmo $< + $(Q)$(OCAMLFIND) $(OCAMLC) $(INCLUDES) -o $@ -package unix,str,xml-light -linkpkg -dllpath $(LIBIVYDIR) ivy-ocaml.cma -dllpath $(LIBPPRZDIR) lib-pprz.cma gen_common.cmo $< # disable this for now and use the compiled bytecode #@cat ../../pprz_src_test.sh > $@