diff --git a/Makefile b/Makefile index 7b0a0aae52..a621d30525 100644 --- a/Makefile +++ b/Makefile @@ -41,9 +41,9 @@ all: static ac1 ac2 static : lib tools configurator cockpit tmtc multimon visu3d logalizer sim_static wind static_h ac1 : - make AIRCRAFT=Thon1 sim_ac -ac2 : - make AIRCRAFT=Thon2 sim_ac + make AIRCRAFT=Thon1 ac +ac2 : + make AIRCRAFT=Thon2 ac configure : configurator PAPARAZZI_DIR=`pwd` $(CONFIGURATOR)/configurator @@ -134,3 +134,5 @@ clean: find . -name Makefile -mindepth 2 -exec sh -c '$(MAKE) -C `dirname {}` $@' \; find . -name '*~' -exec rm -f {} \; +dist_clean : clean + rm -fr var diff --git a/Makefile.ac b/Makefile.ac index 022bcc6ba9..276cbd4e3a 100644 --- a/Makefile.ac +++ b/Makefile.ac @@ -28,9 +28,10 @@ ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT) AIRFRAME_H=$(ACINCLUDE)/airframe.h RADIO_H=$(ACINCLUDE)/radio.h FLIGHT_PLAN_H=$(ACINCLUDE)/flight_plan.h +FLIGHT_PLAN_XML=$(ACINCLUDE)/flight_plan.xml INFLIGHT_CALIB_H=$(ACINCLUDE)/inflight_calib.h -all: $(AIRFRAME_H) $(RADIO_H) $(FLIGHT_PLAN_H) $(INFLIGHT_CALIB_H) +all: $(AIRFRAME_H) $(RADIO_H) $(FLIGHT_PLAN_H) $(FLIGHT_PLAN_XML) $(INFLIGHT_CALIB_H) echo $(AIRFRAME_H) $(CONF)/$(AIRFRAME) $(AIRFRAME_H) : $(CONF)/$(AIRFRAME) $(CONF_XML) @@ -45,6 +46,10 @@ $(FLIGHT_PLAN_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_flight_plan.out $< > /tmp/fp.h mv /tmp/fp.h $@ +$(FLIGHT_PLAN_XML) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) + $(TOOLS)/gen_flight_plan.out -dump $< > /tmp/fp.xml + mv /tmp/fp.xml $@ + $(INFLIGHT_CALIB_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_calib.out $< > /tmp/c.h mv /tmp/c.h $@ diff --git a/conf/flight_plans/muret_mini.xml b/conf/flight_plans/muret_mini.xml new file mode 100644 index 0000000000..5efc87527d --- /dev/null +++ b/conf/flight_plans/muret_mini.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sw/airborne/autopilot/Makefile b/sw/airborne/autopilot/Makefile index 56e8f9f486..69b30762b8 100644 --- a/sw/airborne/autopilot/Makefile +++ b/sw/airborne/autopilot/Makefile @@ -94,4 +94,4 @@ wavecard_glib : wavecard_glib.c wavecard.c wavecard_glib_utils.c clean : avr_clean - rm -f *.out *.cm* messages.h flight_plan.h ubx_protocol.h inflight_calib.h + rm -f *.out *.cm* messages.h flight_plan.h ubx_protocol.h inflight_calib.h wavecard_glib diff --git a/sw/airborne/autopilot/main.c b/sw/airborne/autopilot/main.c index b3982c824b..b19919a264 100644 --- a/sw/airborne/autopilot/main.c +++ b/sw/airborne/autopilot/main.c @@ -479,7 +479,6 @@ inline void periodic_task( void ) { navigation_task(); break; /* default: */ - case 1: } switch (_20Hz) { case 0: diff --git a/sw/configurator/Makefile b/sw/configurator/Makefile index 098a0b9f64..c863eb666b 100644 --- a/sw/configurator/Makefile +++ b/sw/configurator/Makefile @@ -20,7 +20,7 @@ # Boston, MA 02111-1307, USA. # -OCAMLC=ocamlc -g -I +labltk -I +lablgtk2 -I +camlimages -I ../lib/ocaml -I +lablGL +OCAMLC=ocamlc -I +labltk -I ../lib/ocaml CMO = env_conf.cmo notebook.cmo tty.cmo varXml.cmo console.cmo tkXml.cmo flasher.cmo welcome.cmo hardware.cmo radio.cmo servos.cmo adc.cmo infrared.cmo attitude.cmo autopilot.cmo airframe.cmo flightplan.cmo upload.cmo simulator.cmo monitor.cmo logalizer.cmo main.ml @@ -30,16 +30,18 @@ ABS_CMO = $(CMO:%=$$PAPARAZZI_SRC/sw/configurator/%) all : configurator medit configurator : $(CMO) - $(OCAMLC) -custom -o /dev/null unix.cma str.cma xml-light.cma labltk.cma jpflib.cma lib-pprz.cma $^ # To check - cat ../../pprz_src_test.sh > $@ - echo 'ocaml -I +labltk -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/configurator unix.cma str.cma xml-light.cma labltk.cma jpflib.cma lib-pprz.cma $(ABS_CMO) $$*' >> $@ - chmod a+x $@ + $(OCAMLC) -custom -o $@ labltk.cma lib-pprz.cma jpflib.cma $^ + @cat ../../pprz_src_test.sh > $@ + @echo 'ocaml -I +labltk -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/configurator labltk.cma lib-pprz.cma jpflib.cma $(ABS_CMO) $$*' >> $@ + @chmod a+x $@ + +medit : OCAMLC=ocamlc -I +lablgtk2 -I +camlimages -I ../lib/ocaml -I +lablGL medit : medit.ml - $(OCAMLC) -o /dev/null str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lablgnomecanvas.cma lablgl.cma gtkInit.cmo lib-pprz.cma xlib-pprz.cma ci_core.cma ci_png.cma $^ # To check - cat ../../pprz_src_test.sh > $@ - echo 'lablgtk2 -I +camlimages -I $$PAPARAZZI_SRC/sw/lib/ocaml str.cma unix.cma xml-light.cma glibivy-ocaml.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma lib-pprz.cma xlib-pprz.cma $$PAPARAZZI_SRC/sw/configurator/$< $$*' >> $@ - chmod a+x $@ + $(OCAMLC) -o $@ glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lablgnomecanvas.cma lablgl.cma gtkInit.cmo lib-pprz.cma xlib-pprz.cma ci_core.cma ci_png.cma $^ + @cat ../../pprz_src_test.sh > $@ + @echo 'lablgtk2 -I +camlimages -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma lib-pprz.cma xlib-pprz.cma $$PAPARAZZI_SRC/sw/configurator/$< $$*' >> $@ + @chmod a+x $@ diff --git a/sw/ground_segment/cockpit/Makefile b/sw/ground_segment/cockpit/Makefile index b562385c95..6bf4ed9a3d 100644 --- a/sw/ground_segment/cockpit/Makefile +++ b/sw/ground_segment/cockpit/Makefile @@ -11,7 +11,7 @@ all : map2d map2d : map2d.ml $(OCAMLC) -custom $(INCLUDES) $(LIBS) gtkInit.cmo $< -o /dev/null #to Check cat ../../../pprz_src_test.sh > $@ - echo 'lablgtk2 str.cma unix.cma xml-light.cma -I +camlimages glibivy-ocaml.cma ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma xlib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/cockpit/$< $$*' >> $@ + echo 'exec lablgtk2 -I +camlimages ci_core.cma ci_png.cma ci_gif.cma ci_jpeg.cma ci_tiff.cma ci_bmp.cma ci_ppm.cma ci_ps.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma xlib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/cockpit/$< $$*' >> $@ chmod a+x $@ @@ -25,4 +25,4 @@ map2d : map2d.ml $(OCAMLOPT) $(INCLUDES) -labels -w s -c $< clean: - rm -f *~* *.cm* *.o *.out *.opt + rm -f *~* *.cm* *.o *.out *.opt map2d diff --git a/sw/ground_segment/tmtc/Makefile b/sw/ground_segment/tmtc/Makefile index 72afa58418..dbb30ff299 100644 --- a/sw/ground_segment/tmtc/Makefile +++ b/sw/ground_segment/tmtc/Makefile @@ -22,7 +22,7 @@ include ../../../conf/Makefile.local -all: hw_modem_listen wavecard_connect receive messages listen.opt +all: hw_modem_listen receive messages clean: rm -f hw_modem_listen wavecard_connect receive messages *.bak *~ core *.o .depend *.opt *.out *.cm* @@ -31,37 +31,28 @@ OCAMLC = ocamlc OCAMLOPT = ocamlopt INCLUDES= -I ../../lib/ocaml -I +lablgtk2 -#messages: messages.ml -# $(OCAMLC) $(INCLUDES) -o /dev/null unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma gtkInit.cmo str.cma lib-pprz.cma $^ # To check -# cat ../../../pprz_src_test.sh > $@ -# echo 'lablgtk2 str.cma ivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma -I $$PAPARAZZI_SRC/sw/ground_segment/tmtc $$PAPARAZZI_SRC/sw/ground_segment/tmtc/$< $$*' >> $@ -# chmod a+x $@ - -messages : messages.ml +messages.opt : messages.ml $(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa gtkInit.cmx lib-pprz.cmxa $^ strip $@ -hw_modem_listen : modem.cmo hw_modem_listen.ml ../../lib/ocaml/lib-pprz.cma - $(OCAMLC) $(INCLUDES) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lib-pprz.cma $^ #To check - cat ../../../pprz_src_test.sh > $@ - echo 'lablgtk2 str.cma glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma -I $$PAPARAZZI_SRC/sw/ground_segment/tmtc $$PAPARAZZI_SRC/sw/ground_segment/tmtc/modem.cmo $$PAPARAZZI_SRC/sw/ground_segment/tmtc/hw_modem_listen.ml $$*' >> $@ +messages : messages.ml + $(OCAMLC) $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $^ #To check + @cat ../../../pprz_src_test.sh > $@ + @echo 'exec lablgtk2 glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/messages.ml $$*' >> $@ chmod a+x $@ -wavecard_connect : modem.cmo wavecard_connect.ml - $(OCAMLC) $(INCLUDES) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lib-pprz.cma $^ #To check - cat ../../../pprz_src_test.sh > $@ - echo 'lablgtk2 str.cma glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/wavecard_connect.ml $$*' >> $@ - chmod a+x $@ + +hw_modem_listen : modem.cmo hw_modem_listen.ml ../../lib/ocaml/lib-pprz.cma + $(OCAMLC) $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $^ + @cat ../../../pprz_src_test.sh > $@ + @echo 'exec lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma lib-pprz.cma -I $$PAPARAZZI_SRC/sw/ground_segment/tmtc $$PAPARAZZI_SRC/sw/ground_segment/tmtc/modem.cmo $$PAPARAZZI_SRC/sw/ground_segment/tmtc/hw_modem_listen.ml $$*' >> $@ + @chmod a+x $@ receive : receive.ml ../../lib/ocaml/lib-pprz.cma - $(OCAMLC) $(INCLUDES) -o $@ str.cma unix.cma xml-light.cma glibivy-ocaml.cma -I +lablgtk2 lablgtk.cma lib-pprz.cma $^ #To check - cat ../../../pprz_src_test.sh > $@ - echo 'lablgtk2 str.cma glibivy-ocaml.cma -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/receive.ml $$*' >> $@ - chmod a+x $@ - -listen.opt : listen.ml - $(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa glibivy-ocaml.cmxa -I +lablgtk2 lablgtk.cmxa lib-pprz.cmxa $^ - strip $@ + $(OCAMLC) $(INCLUDES) -o $@ lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $^ + @cat ../../../pprz_src_test.sh > $@ + @echo 'exec lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/ground_segment/tmtc/receive.ml $$*' >> $@ + @chmod a+x $@ modem.cmo : modem.cmi diff --git a/sw/ground_segment/tmtc/hw_modem_listen.ml b/sw/ground_segment/tmtc/hw_modem_listen.ml index e42bfce539..e3d2171140 100644 --- a/sw/ground_segment/tmtc/hw_modem_listen.ml +++ b/sw/ground_segment/tmtc/hw_modem_listen.ml @@ -26,25 +26,28 @@ open Printf +(** Ivy messages are initially tagged "modem" and with the A/C +id as soon as it is identified (IDENT message) *) let ac_id = ref "modem" -let modem_msg_period = 1000 +let modem_msg_period = 1000 (** ms *) module ModemTransport = Serial.Transport(Modem.Protocol) module Tele_Class = struct let name = "telemetry_ap" end module Tele_Pprz = Pprz.Protocol(Tele_Class) module PprzTransport = Serial.Transport(Tele_Pprz) +(** Monitoring of the message reception *) type status = { mutable rx_byte : int; mutable rx_msg : int; mutable rx_err : int } - let status = { rx_byte = 0; rx_msg = 0; rx_err = 0 } -let use_pprz_message = fun () (msg_id, values) -> - status.rx_msg <- status.rx_msg + 1; +(** Callback for each decoded message *) +let use_pprz_message = fun (msg_id, values) -> + status.rx_msg <- status.rx_msg + 1; (** Monitoring update *) let msg = Tele_Pprz.message_of_id msg_id in if msg.Pprz.name = "IDENT" then ac_id := Pprz.string_assoc "id" values; @@ -84,8 +87,11 @@ let listen_pprz_modem = fun pprz_message_cb tty -> ignore (Glib.Io.add_watch [`IN] cb (Glib.Io.channel_of_descr fd)) +(** Modem monitoring messages *) let send_modem_msg = - let rx_msg = ref 0 and rx_byte = ref 0 and start = Unix.gettimeofday () in + let rx_msg = ref 0 + and rx_byte = ref 0 + and start = Unix.gettimeofday () in fun () -> let dt = float modem_msg_period /. 1000. in let t = int_of_float (Unix.gettimeofday () -. start) in @@ -125,8 +131,10 @@ let _ = Ivy.init "Paparazzi hw_modem_listen" "READY" (fun _ _ -> ()); Ivy.start !ivy_bus; - listen_pprz_modem (use_pprz_message ()) !port; + (** Listening on the given port (serial device or multimon fifo)*) + listen_pprz_modem use_pprz_message !port; + (** Sending periodically modem and downlink status messages *) ignore (Glib.Timeout.add modem_msg_period (fun () -> send_modem_msg (); true)); let loop = Glib.Main.create true in diff --git a/sw/lib/ocaml/Makefile b/sw/lib/ocaml/Makefile index 3b5c08c1ee..73a2628e10 100644 --- a/sw/lib/ocaml/Makefile +++ b/sw/lib/ocaml/Makefile @@ -20,7 +20,8 @@ # Boston, MA 02111-1307, USA. # -INCLUDES= -I +lablgl -I +camlimages -I +lablgtk2 +INCLUDES= +XINCLUDES= -I +lablgl -I +camlimages -I +lablgtk2 OCAMLC=ocamlc $(INCLUDES) OCAMLOPT=ocamlopt $(INCLUDES) @@ -33,13 +34,14 @@ XSRC = platform.ml gtkgl_Hack.ml ml_gtkgl_hack.o gtk_image.ml gtk_tools_icons.ml XCMO = $(XSRC:.ml=.cmo) XCMX = $(XSRC:.ml=.cmx) +$(XCMO) : INCLUDES=$(XINCLUDES) -all : lib-pprz.cma xlib-pprz.cma xml_get.out lib-pprz.cmxa -# lib-pprz.cmxa xlib-pprz.cmxa +all : lib-pprz.cma xlib-pprz.cma xml_get.out +# lib-pprz.cmxa xlib-pprz.cmxa lib-pprz.cma : $(CMO) - ocamlmklib -o lib-pprz str.cma unix.cma xml-light.cma ivy-ocaml.cma $^ + ocamlmklib -o lib-pprz str.cma unix.cma xml-light.cma $^ lib-pprz.cmxa : $(CMX) ocamlmklib -o lib-pprz $^ diff --git a/sw/simulator/Makefile b/sw/simulator/Makefile index 1c8a3c587b..bc87019ee0 100644 --- a/sw/simulator/Makefile +++ b/sw/simulator/Makefile @@ -38,7 +38,7 @@ SIMSA=sims.cma OCAMLC = ocamlc OCAMLOPT=ocamlopt -p -INCLUDES= -I +lablgtk2 -I $(SIMDIR)/../lib/ocaml +INCLUDES= -I +lablgtk2 -I ../lib/ocaml OCAMLCC = gcc -O2 -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -DUBX -DCTL_BRD_V1_2 -I $(OBJDIR) -I $(ACDIR) FBW = ../airborne/fly_by_wire @@ -68,23 +68,20 @@ sitl.cmxa : $(SIMSCMX) ocamlopt -o $@ -a $^ $(OBJDIR)/$(SIMSA) : $(SIMSO) - touch $(OBJDIR)/dummy.ml - cd $(OBJDIR); ocamlmklib -o sims $^ dummy.ml + @touch $(OBJDIR)/dummy.ml + @cd $(OBJDIR); ocamlmklib -o sims $^ dummy.ml $(OBJDIR)/simsitl : $(OBJDIR)/$(SIMSA) $(OBJDIR)/simsitl.ml - $(OCAMLC) $(INCLUDES) -o $@ glibivy-ocaml.cma xml-light.cma unix.cma lib-pprz.cma lablgtk.cma gtkInit.cmo -I $(OBJDIR) $(SIMSA) sitl.cma $(OBJDIR)/simsitl.ml # To check - cat ../../pprz_src_test.sh > $@ - echo 'lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $(OBJDIR) glibivy-ocaml.cma xml-light.cma lib-pprz.cma $(SIMSA) $$PAPARAZZI_SRC/sw/simulator/sitl.cma -I $$PAPARAZZI_SRC/sw/simulator $(OBJDIR)/simsitl.ml $$*' >> $@ - chmod a+x $@ + $(OCAMLC) $(INCLUDES) -o $@ glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo -I $(OBJDIR) $(SIMSA) sitl.cma $(OBJDIR)/simsitl.ml + @cat ../../pprz_src_test.sh > $@ + @echo 'exec lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $(OBJDIR) glibivy-ocaml.cma xml-light.cma lib-pprz.cma $(SIMSA) $$PAPARAZZI_SRC/sw/simulator/sitl.cma -I $$PAPARAZZI_SRC/sw/simulator $(OBJDIR)/simsitl.ml $$*' >> $@ + @chmod a+x $@ gaia : gaia.ml - $(OCAMLC) $(INCLUDES) -o $@ glibivy-ocaml.cma xml-light.cma unix.cma lib-pprz.cma lablgtk.cma gtkInit.cmo gaia.ml # To check - cat ../../pprz_src_test.sh > $@ - echo 'lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma xml-light.cma unix.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $$PAPARAZZI_SRC/sw/simulator/gaia.ml $$*' >> $@ - chmod a+x $@ - -$(OBJDIR)/simsitl.opt : $(SIMSO) $(OBJDIR)/simsitl.cmx - $(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa glibivy-ocaml.cmxa xml-light.cmxa unix.cmxa lib.cmxa lablgtk.cmxa gtkInit.cmx $(SIMSO) sitl.cmxa $(OBJDIR)/simsitl.cmx + $(OCAMLC) $(INCLUDES) -o $@ glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo gaia.ml + @cat ../../pprz_src_test.sh > $@ + @echo 'exec lablgtk2 -I $$PAPARAZZI_SRC/sw/lib/ocaml glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $$PAPARAZZI_SRC/sw/simulator/gaia.ml $$*' >> $@ + @chmod a+x $@ $(OBJDIR)/%.o : %.c $(OCAMLCC) -c -o $@ -I $(SIMDIR) -I $(FBW) -I $(AP) -I ../include -I $(VARINCLUDE) $< @@ -110,8 +107,8 @@ $(OBJDIR)/simsitl.cmx : $(OBJDIR)/simsitl.ml $(OCAMLOPT) $(INCLUDES) -c -o $@ $< $(OBJDIR)/simsitl.ml : simsitl.ml - echo "Sim.ac_name := \"$(AIRCRAFT)\"" > $@ - cat $< >> $@ + @echo "Sim.ac_name := \"$(AIRCRAFT)\"" > $@ + @cat $< >> $@ %.cmo : %.ml $(OCAMLC) $(INCLUDES) -c $< @@ -123,7 +120,7 @@ $(OBJDIR)/simsitl.ml : simsitl.ml $(OCAMLC) $(INCLUDES) -c $< clean : - \rm -f *.cm* *~ *.out .depend *.o *.a *.so + \rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia flightModel.cmo: flightModel.cmi hitl.cmo: hitl.cmi diff --git a/sw/tools/Makefile b/sw/tools/Makefile index d887a77c0a..6e09cd2dd5 100644 --- a/sw/tools/Makefile +++ b/sw/tools/Makefile @@ -1,5 +1,5 @@ OCAML=ocaml -OCAMLC=ocamlc -g -I ../lib/ocaml +OCAMLC=ocamlc -I ../lib/ocaml OCAMLLEX=ocamllex OCAMLYACC=ocamlyacc @@ -9,10 +9,10 @@ FP_CMO = fp_syntax.cmo fp_parser.cmo fp_lexer.cmo fp_proc.cmo gen_flight_plan.ml ABS_FP = $(FP_CMO:%=$$PAPARAZZI_SRC/sw/tools/%) gen_flight_plan.out : $(FP_CMO) - $(OCAMLC) -o /dev/null lib-pprz.cma $^ # To check - cat ../../pprz_src_test.sh > $@ - echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/tools lib-pprz.cma $(ABS_FP) $$*' >> $@ - chmod a+x $@ + $(OCAMLC) -o $@ ivy-ocaml.cma lib-pprz.cma $^ + @cat ../../pprz_src_test.sh > $@ + @echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml -I $$PAPARAZZI_SRC/sw/tools ivy-ocaml.cma lib-pprz.cma $(ABS_FP) $$*' >> $@ + @chmod a+x $@ fp_parser.cmo : fp_parser.cmi fp_syntax.cmi fp_parser.cmi : fp_parser.ml fp_syntax.cmi @@ -23,10 +23,10 @@ fp_syntax.cmo : fp_syntax.cmi %.out : %.ml - $(OCAMLC) -o /dev/null lib-pprz.cma $< # To check - cat ../../pprz_src_test.sh > $@ - echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml lib-pprz.cma $$PAPARAZZI_SRC/sw/tools/$< $$*' >> $@ - chmod a+x $@ + $(OCAMLC) -o $@ ivy-ocaml.cma lib-pprz.cma $< + @cat ../../pprz_src_test.sh > $@ + @echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/lib/ocaml ivy-ocaml.cma lib-pprz.cma $$PAPARAZZI_SRC/sw/tools/$< $$*' >> $@ + @chmod a+x $@ %.cmo : %.ml $(OCAMLC) -c $<