mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-31 03:57:45 +08:00
[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
This commit is contained in:
+7
-7
@@ -26,13 +26,13 @@ OCAML=ocaml
|
|||||||
OCAMLFIND=ocamlfind
|
OCAMLFIND=ocamlfind
|
||||||
OCAMLC=ocamlc
|
OCAMLC=ocamlc
|
||||||
OCAMLDEP=ocamldep
|
OCAMLDEP=ocamldep
|
||||||
LIBPPRZDIR=../lib/ocaml
|
LIBPPRZDIR=$(PAPARAZZI_SRC)/sw/lib/ocaml
|
||||||
INCLUDES=-I $(LIBPPRZDIR)
|
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
|
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
|
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
|
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)
|
gen_flight_plan.out : $(FP_CMO)
|
||||||
@echo OL $@
|
@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)
|
gen_srtm.out : gen_srtm.ml gen_common.cmo $(LIBPPRZCMA)
|
||||||
@echo OC $@
|
@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)
|
%.out : %.ml gen_common.cmo $(LIBPPRZCMA)
|
||||||
@echo OC $<
|
@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
|
# disable this for now and use the compiled bytecode
|
||||||
#@cat ../../pprz_src_test.sh > $@
|
#@cat ../../pprz_src_test.sh > $@
|
||||||
|
|||||||
Reference in New Issue
Block a user