mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 17:06:31 +08:00
Merge branch 'ocamlfind_no_custom'
- Use findlib (ocamlfind) for ocaml packages. - Create META file for pprz ocaml lib. - Link dynamically instead of statically (no -custom), which also results in faster build times. - Use mktemp to properly create temporary files. - More makefile cleanup... closes #274
This commit is contained in:
@@ -118,6 +118,7 @@
|
|||||||
/sw/lib/ocaml/expr_parser.mli
|
/sw/lib/ocaml/expr_parser.mli
|
||||||
/sw/lib/ocaml/gtk_papget_led_editor.ml
|
/sw/lib/ocaml/gtk_papget_led_editor.ml
|
||||||
/sw/lib/ocaml/expr_lexer.ml
|
/sw/lib/ocaml/expr_lexer.ml
|
||||||
|
/sw/lib/ocaml/META.pprz
|
||||||
|
|
||||||
# /sw/logalizer/
|
# /sw/logalizer/
|
||||||
/sw/logalizer/plot
|
/sw/logalizer/plot
|
||||||
|
|||||||
@@ -45,6 +45,14 @@ OCAML=$(shell which ocaml)
|
|||||||
OCAMLRUN=$(shell which ocamlrun)
|
OCAMLRUN=$(shell which ocamlrun)
|
||||||
BUILD_DATETIME:=$(shell date +%Y%m%d-%H%M%S)
|
BUILD_DATETIME:=$(shell date +%Y%m%d-%H%M%S)
|
||||||
|
|
||||||
|
# default mktemp in OS X doesn't work, use gmktemp with macports coreutils
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
MKTEMP = gmktemp
|
||||||
|
else
|
||||||
|
MKTEMP = mktemp
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# define some paths
|
# define some paths
|
||||||
#
|
#
|
||||||
@@ -57,6 +65,7 @@ MULTIMON=sw/ground_segment/multimon
|
|||||||
COCKPIT=sw/ground_segment/cockpit
|
COCKPIT=sw/ground_segment/cockpit
|
||||||
TMTC=sw/ground_segment/tmtc
|
TMTC=sw/ground_segment/tmtc
|
||||||
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
||||||
|
JOYSTICK=sw/ground_segment/joystick
|
||||||
EXT=sw/ext
|
EXT=sw/ext
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -92,9 +101,6 @@ ABI_MESSAGES_H=$(STATICINCLUDE)/abi_messages.h
|
|||||||
GEN_HEADERS = $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(DL_PROTOCOL2_H) $(ABI_MESSAGES_H)
|
GEN_HEADERS = $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(DL_PROTOCOL2_H) $(ABI_MESSAGES_H)
|
||||||
|
|
||||||
|
|
||||||
# default directory for temporary files
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
|
|
||||||
all: ground_segment ext lpctools
|
all: ground_segment ext lpctools
|
||||||
|
|
||||||
print_build_version:
|
print_build_version:
|
||||||
@@ -111,26 +117,29 @@ conf/%.xml :conf/%.xml.example
|
|||||||
[ -L $@ ] || [ -f $@ ] || cp $< $@
|
[ -L $@ ] || [ -f $@ ] || cp $< $@
|
||||||
|
|
||||||
|
|
||||||
ground_segment: print_build_version update_google_version conf lib subdirs commands static
|
ground_segment: print_build_version update_google_version conf libpprz subdirs commands static
|
||||||
|
|
||||||
static: cockpit tmtc tools sim_static static_h
|
static: cockpit tmtc tools sim_static joystick static_h
|
||||||
|
|
||||||
lib:
|
libpprz:
|
||||||
$(MAKE) -C $(LIB)/ocaml
|
$(MAKE) -C $(LIB)/ocaml
|
||||||
|
|
||||||
multimon:
|
multimon:
|
||||||
$(MAKE) -C $(MULTIMON)
|
$(MAKE) -C $(MULTIMON)
|
||||||
|
|
||||||
cockpit: lib
|
cockpit: libpprz
|
||||||
$(MAKE) -C $(COCKPIT)
|
$(MAKE) -C $(COCKPIT)
|
||||||
|
|
||||||
tmtc: lib cockpit multimon
|
tmtc: libpprz cockpit multimon
|
||||||
$(MAKE) -C $(TMTC)
|
$(MAKE) -C $(TMTC)
|
||||||
|
|
||||||
tools: lib
|
tools: libpprz
|
||||||
$(MAKE) -C $(TOOLS)
|
$(MAKE) -C $(TOOLS)
|
||||||
|
|
||||||
sim_static: lib
|
joystick: libpprz
|
||||||
|
$(MAKE) -C $(JOYSTICK)
|
||||||
|
|
||||||
|
sim_static: libpprz
|
||||||
$(MAKE) -C $(SIMULATOR)
|
$(MAKE) -C $(SIMULATOR)
|
||||||
|
|
||||||
ext:
|
ext:
|
||||||
@@ -144,56 +153,70 @@ subdirs: $(SUBDIRS)
|
|||||||
$(SUBDIRS):
|
$(SUBDIRS):
|
||||||
$(MAKE) -C $@
|
$(MAKE) -C $@
|
||||||
|
|
||||||
$(PPRZCENTER): lib
|
$(PPRZCENTER): libpprz
|
||||||
|
|
||||||
$(LOGALIZER): lib
|
$(LOGALIZER): libpprz
|
||||||
|
|
||||||
|
|
||||||
static_h: $(GEN_HEADERS)
|
static_h: $(GEN_HEADERS)
|
||||||
|
|
||||||
$(MESSAGES_H) : $(MESSAGES_XML) tools
|
$(MESSAGES_H) : $(MESSAGES_XML) tools
|
||||||
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< telemetry > $(TMPDIR)/msg.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/msg.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< telemetry > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(MESSAGES2_H) : $(MESSAGES_XML) tools
|
$(MESSAGES2_H) : $(MESSAGES_XML) tools
|
||||||
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< telemetry > $(TMPDIR)/msg2.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/msg2.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< telemetry > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(UBX_PROTOCOL_H) : $(UBX_XML) tools
|
$(UBX_PROTOCOL_H) : $(UBX_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_ubx.out $< > $(TMPDIR)/ubx.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/ubx.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_ubx.out $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(MTK_PROTOCOL_H) : $(MTK_XML) tools
|
$(MTK_PROTOCOL_H) : $(MTK_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_mtk.out $< > $(TMPDIR)/mtk.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/mtk.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_mtk.out $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(XSENS_PROTOCOL_H) : $(XSENS_XML) tools
|
$(XSENS_PROTOCOL_H) : $(XSENS_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_xsens.out $< > $(TMPDIR)/xsens.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/xsens.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_xsens.out $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(DL_PROTOCOL_H) : $(MESSAGES_XML) tools
|
$(DL_PROTOCOL_H) : $(MESSAGES_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< datalink > $(TMPDIR)/dl.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/dl.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< datalink > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(DL_PROTOCOL2_H) : $(MESSAGES_XML) tools
|
$(DL_PROTOCOL2_H) : $(MESSAGES_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< datalink > $(TMPDIR)/dl2.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/dl2.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< datalink > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(ABI_MESSAGES_H) : $(MESSAGES_XML) tools
|
$(ABI_MESSAGES_H) : $(MESSAGES_XML) tools
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_abi.out $< airborne > $(TMPDIR)/abi.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/abi.h $@
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_abi.out $< airborne > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
|
|
||||||
include Makefile.ac
|
include Makefile.ac
|
||||||
@@ -218,10 +241,10 @@ paparazzi:
|
|||||||
chmod a+x $@
|
chmod a+x $@
|
||||||
|
|
||||||
|
|
||||||
install :
|
install: all
|
||||||
$(MAKE) -f Makefile.install PREFIX=$(PREFIX)
|
$(MAKE) -f Makefile.install PREFIX=$(PREFIX)
|
||||||
|
|
||||||
uninstall :
|
uninstall:
|
||||||
$(MAKE) -f Makefile.install PREFIX=$(PREFIX) uninstall
|
$(MAKE) -f Makefile.install PREFIX=$(PREFIX) uninstall
|
||||||
|
|
||||||
|
|
||||||
@@ -274,7 +297,7 @@ test: all replace_current_conf_xml run_tests restore_conf_xml
|
|||||||
|
|
||||||
|
|
||||||
.PHONY: all print_build_version update_google_version ground_segment \
|
.PHONY: all print_build_version update_google_version ground_segment \
|
||||||
subdirs $(SUBDIRS) conf ext lib multimon cockpit tmtc tools\
|
subdirs $(SUBDIRS) conf ext libpprz multimon cockpit tmtc tools\
|
||||||
static sim_static lpctools commands install uninstall \
|
static sim_static lpctools commands install uninstall \
|
||||||
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
|
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
|
||||||
test replace_current_conf_xml run_tests restore_conf_xml
|
test replace_current_conf_xml run_tests restore_conf_xml
|
||||||
|
|||||||
+41
-23
@@ -49,6 +49,13 @@ MODULES_DIR=$(PAPARAZZI_HOME)/conf/modules/
|
|||||||
AUTOPILOT_H=$(AC_GENERATED)/autopilot_core.h
|
AUTOPILOT_H=$(AC_GENERATED)/autopilot_core.h
|
||||||
AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5
|
AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5
|
||||||
|
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
MKTEMP = gmktemp
|
||||||
|
else
|
||||||
|
MKTEMP = mktemp
|
||||||
|
endif
|
||||||
|
|
||||||
# "make Q=''" to get full echo
|
# "make Q=''" to get full echo
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
@@ -62,9 +69,6 @@ endif
|
|||||||
# telemetry periodic frequency defaults to 60Hz
|
# telemetry periodic frequency defaults to 60Hz
|
||||||
TELEMETRY_FREQUENCY ?= 60
|
TELEMETRY_FREQUENCY ?= 60
|
||||||
|
|
||||||
# default directory for temporary files
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
|
|
||||||
init:
|
init:
|
||||||
@[ -d $(PAPARAZZI_HOME) ] || (echo "Copying config example in your $(PAPARAZZI_HOME) directory"; mkdir -p $(PAPARAZZI_HOME); cp -a conf $(PAPARAZZI_HOME); cp -a data $(PAPARAZZI_HOME); mkdir -p $(PAPARAZZI_HOME)/var/maps; mkdir -p $(PAPARAZZI_HOME)/var/include)
|
@[ -d $(PAPARAZZI_HOME) ] || (echo "Copying config example in your $(PAPARAZZI_HOME) directory"; mkdir -p $(PAPARAZZI_HOME); cp -a conf $(PAPARAZZI_HOME); cp -a data $(PAPARAZZI_HOME); mkdir -p $(PAPARAZZI_HOME)/var/maps; mkdir -p $(PAPARAZZI_HOME)/var/include)
|
||||||
|
|
||||||
@@ -89,56 +93,70 @@ makefile_ac: $(MAKEFILE_AC)
|
|||||||
|
|
||||||
$(AIRFRAME_H) : $(CONF)/$(AIRFRAME_XML) $(CONF_XML) $(AIRCRAFT_MD5)
|
$(AIRFRAME_H) : $(CONF)/$(AIRFRAME_XML) $(CONF_XML) $(AIRCRAFT_MD5)
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_airframe.out $(AC_ID) $(AIRCRAFT) $(MD5SUM) $< > $(TMPDIR)/airframe.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/airframe.h $@
|
$(Q)$(TOOLS)/gen_airframe.out $(AC_ID) $(AIRCRAFT) $(MD5SUM) $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
$(Q)cp $(CONF)/airframes/airframe.dtd $(AIRCRAFT_CONF_DIR)/airframes
|
$(Q)cp $(CONF)/airframes/airframe.dtd $(AIRCRAFT_CONF_DIR)/airframes
|
||||||
|
|
||||||
$(RADIO_H) : $(CONF)/$(RADIO) $(CONF_XML) $(TOOLS)/gen_radio.out
|
$(RADIO_H) : $(CONF)/$(RADIO) $(CONF_XML) $(TOOLS)/gen_radio.out
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_radio.out $< > $(TMPDIR)/radio.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/radio.h $@
|
$(Q)$(TOOLS)/gen_radio.out $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
$(Q)cp $< $(AIRCRAFT_CONF_DIR)/radios
|
$(Q)cp $< $(AIRCRAFT_CONF_DIR)/radios
|
||||||
|
|
||||||
$(PERIODIC_H) : $(CONF)/$(AIRFRAME_XML) $(MESSAGES_XML) $(CONF_XML) $(CONF)/$(TELEMETRY) $(MAKEFILE_AC)
|
$(PERIODIC_H) : $(CONF)/$(AIRFRAME_XML) $(MESSAGES_XML) $(CONF_XML) $(CONF)/$(TELEMETRY) $(MAKEFILE_AC)
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_periodic.out $(CONF)/$(AIRFRAME_XML) $(MESSAGES_XML) $(CONF)/$(TELEMETRY) $(TELEMETRY_FREQUENCY) $(SETTINGS_TELEMETRY) > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)$(TOOLS)/gen_periodic.out $(CONF)/$(AIRFRAME_XML) $(MESSAGES_XML) $(CONF)/$(TELEMETRY) $(TELEMETRY_FREQUENCY) $(SETTINGS_TELEMETRY) > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
$(Q)cp $< $(AIRCRAFT_CONF_DIR)
|
|
||||||
$(Q)cp $(CONF)/$(TELEMETRY) $(AIRCRAFT_CONF_DIR)/telemetry
|
$(Q)cp $(CONF)/$(TELEMETRY) $(AIRCRAFT_CONF_DIR)/telemetry
|
||||||
|
|
||||||
$(FLIGHT_PLAN_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_flight_plan.out
|
$(FLIGHT_PLAN_H) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_flight_plan.out
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_flight_plan.out $< > $(TMPDIR)/$(AC_ID)_fp.h
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
$(Q)mv $(TMPDIR)/$(AC_ID)_fp.h $@
|
$(Q)$(TOOLS)/gen_flight_plan.out $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
$(Q)cp $< $(AIRCRAFT_CONF_DIR)/flight_plans
|
$(Q)cp $< $(AIRCRAFT_CONF_DIR)/flight_plans
|
||||||
|
|
||||||
$(FLIGHT_PLAN_XML) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_flight_plan.out
|
$(FLIGHT_PLAN_XML) : $(CONF)/$(FLIGHT_PLAN) $(CONF_XML) $(TOOLS)/gen_flight_plan.out
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_flight_plan.out -dump $< > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)$(TOOLS)/gen_flight_plan.out -dump $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(SETTINGS_H) : $(SETTINGS_XMLS) $(CONF_XML) $(SETTINGS_MODULES) $(SETTINGS_TELEMETRY) $(TOOLS)/gen_settings.out
|
$(SETTINGS_H) : $(SETTINGS_XMLS) $(CONF_XML) $(SETTINGS_MODULES) $(SETTINGS_TELEMETRY) $(TOOLS)/gen_settings.out
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_settings.out $(SETTINGS_XML) $(SETTINGS_TELEMETRY) $(SETTINGS_XMLS) $(SETTINGS_MODULES) > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)$(TOOLS)/gen_settings.out $(SETTINGS_XML) $(SETTINGS_TELEMETRY) $(SETTINGS_XMLS) $(SETTINGS_MODULES) > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
$(Q)cp $(SETTINGS_XMLS) $(AIRCRAFT_CONF_DIR)/settings
|
$(Q)cp $(SETTINGS_XMLS) $(AIRCRAFT_CONF_DIR)/settings
|
||||||
|
|
||||||
$(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out $(CONF)/modules/*.xml
|
$(MODULES_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_modules.out $(CONF)/modules/*.xml
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_modules.out $(SETTINGS_MODULES) $< > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)$(TOOLS)/gen_modules.out $(SETTINGS_MODULES) $< > $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(AUTOPILOT_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_autopilot.out $(CONF)/autopilot/*.xml
|
$(AUTOPILOT_H) : $(CONF)/$(AIRFRAME_XML) $(TOOLS)/gen_autopilot.out $(CONF)/autopilot/*.xml
|
||||||
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
$(Q)test -d $(AC_GENERATED) || mkdir -p $(AC_GENERATED)
|
||||||
@echo BUILD $@
|
@echo GENERATE $@
|
||||||
$(Q)$(TOOLS)/gen_autopilot.out $(CONF)/$(AIRFRAME_XML) $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)$(TOOLS)/gen_autopilot.out $(CONF)/$(AIRFRAME_XML) $($@_TMP)
|
||||||
|
$(Q)mv $($@_TMP) $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(SETTINGS_MODULES) : $(MODULES_H)
|
$(SETTINGS_MODULES) : $(MODULES_H)
|
||||||
|
|||||||
+1
-1
@@ -171,7 +171,7 @@ check_arch :
|
|||||||
$(Q)if ($(UISP) $(UISP_FLAGS) 2>&1 | tr '[:upper:]' '[:lower:]' | grep $($(TARGET).MCU)); then : ; else echo "Wrong architecture (mcu0 vs mcu1 ?)"; exit 1; fi
|
$(Q)if ($(UISP) $(UISP_FLAGS) 2>&1 | tr '[:upper:]' '[:lower:]' | grep $($(TARGET).MCU)); then : ; else echo "Wrong architecture (mcu0 vs mcu1 ?)"; exit 1; fi
|
||||||
|
|
||||||
avr_clean:
|
avr_clean:
|
||||||
rm -rf $(OBJDIR)
|
$(Q)rm -rf $(OBJDIR)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
+19
-4
@@ -27,10 +27,13 @@
|
|||||||
# this should not be needed
|
# this should not be needed
|
||||||
SRC_ARCH = arch/sim
|
SRC_ARCH = arch/sim
|
||||||
|
|
||||||
|
include $(PAPARAZZI_SRC)/sw/Makefile.ocaml
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
OCAMLC = ocamlc
|
|
||||||
SIMDIR = $(PAPARAZZI_SRC)/sw/simulator
|
SIMDIR = $(PAPARAZZI_SRC)/sw/simulator
|
||||||
CAMLINCLUDES = $(shell ocamlfind query -r -i-format lablgtk2) -I $(PAPARAZZI_SRC)/sw/lib/ocaml -I $(SIMDIR) $(shell ocamlfind query -r -i-format xml-light)
|
CAMLINCLUDES = -I $(LIBPPRZDIR) -I $(SIMDIR) -I $(OBJDIR)
|
||||||
|
PKG = -package glibivy,pprz
|
||||||
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
|
||||||
SIMSITLML = $(OBJDIR)/simsitl.ml
|
SIMSITLML = $(OBJDIR)/simsitl.ml
|
||||||
MYGTKINITCMO = myGtkInit.cmo
|
MYGTKINITCMO = myGtkInit.cmo
|
||||||
SITLCMA = $(SIMDIR)/sitl.cma
|
SITLCMA = $(SIMDIR)/sitl.cma
|
||||||
@@ -42,12 +45,20 @@ Q=@
|
|||||||
# End of configuration part.
|
# End of configuration part.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
|
ifeq ($(LBITS),64)
|
||||||
|
FPIC = -fPIC
|
||||||
|
else
|
||||||
|
FPIC =
|
||||||
|
endif
|
||||||
|
|
||||||
INCLUDES += -I `ocamlc -where`
|
INCLUDES += -I `ocamlc -where`
|
||||||
|
|
||||||
CFLAGS = -W -Wall
|
CFLAGS = -W -Wall
|
||||||
CFLAGS += $(INCLUDES)
|
CFLAGS += $(INCLUDES)
|
||||||
CFLAGS += $($(TARGET).CFLAGS)
|
CFLAGS += $($(TARGET).CFLAGS)
|
||||||
CFLAGS += $(LOCAL_CFLAGS)
|
CFLAGS += $(LOCAL_CFLAGS)
|
||||||
|
CFLAGS += $(FPIC)
|
||||||
CFLAGS += -O2
|
CFLAGS += -O2
|
||||||
CFLAGS += -g
|
CFLAGS += -g
|
||||||
CFLAGS += -std=gnu99
|
CFLAGS += -std=gnu99
|
||||||
@@ -65,10 +76,14 @@ $(TARGET).objs = $($(TARGET).objso:%.S=$(OBJDIR)/%.o)
|
|||||||
|
|
||||||
all compile: $(OBJDIR)/simsitl
|
all compile: $(OBJDIR)/simsitl
|
||||||
|
|
||||||
|
# shared library of the C autopilot part
|
||||||
|
autopilot.so : $($(TARGET).objs)
|
||||||
|
@echo BUILD $@
|
||||||
|
$(Q)$(CC) -shared -o $(OBJDIR)/$@ $^
|
||||||
|
|
||||||
$(OBJDIR)/simsitl : $($(TARGET).objs) $(SITLCMA) $(SIMSITLML)
|
$(OBJDIR)/simsitl : autopilot.so $(SITLCMA) $(SIMSITLML)
|
||||||
@echo LD $@
|
@echo LD $@
|
||||||
$(Q)$(OCAMLC) -g -custom $(CAMLINCLUDES) -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma $($(TARGET).objs) $(MYGTKINITCMO) $(SITLCMA) $(SIMSITLML)
|
$(Q)$(OCAMLC) -g $(CAMLINCLUDES) -o $@ $(LINKPKG) $(MYGTKINITCMO) $^ -dllpath $(OBJDIR) -dllpath $(SIMDIR)
|
||||||
|
|
||||||
|
|
||||||
# The id of the A/C is hardcoded in the code (to be improved with dynlink ?)
|
# The id of the A/C is hardcoded in the code (to be improved with dynlink ?)
|
||||||
|
|||||||
+4
-1
@@ -1,11 +1,14 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
MODCFLAGS=-Wall
|
MODCFLAGS=-Wall
|
||||||
|
|
||||||
all: ublox_conf
|
all: ublox_conf
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f core *.o ublox_conf
|
$(Q)rm -f core *.o ublox_conf
|
||||||
|
|
||||||
ublox_conf: ublox_conf.c Makefile
|
ublox_conf: ublox_conf.c Makefile
|
||||||
$(CC) $(MODCFLAGS) ublox_conf.c -o ublox_conf
|
$(CC) $(MODCFLAGS) ublox_conf.c -o ublox_conf
|
||||||
|
|||||||
+14
-8
@@ -3,13 +3,17 @@
|
|||||||
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
# default directory for temporary files
|
UNAME = $(shell uname -s)
|
||||||
TMPDIR ?= /tmp
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
MKTEMP = gmktemp
|
||||||
|
else
|
||||||
|
MKTEMP = mktemp
|
||||||
|
endif
|
||||||
|
|
||||||
all: $(PAPARAZZI_HOME)/conf/maps.xml
|
all: $(PAPARAZZI_HOME)/conf/maps.xml
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(DATADIR)/maps.google.com
|
$(Q)rm -f $(DATADIR)/maps.google.com
|
||||||
|
|
||||||
$(DATADIR):
|
$(DATADIR):
|
||||||
mkdir $(DATADIR)
|
mkdir $(DATADIR)
|
||||||
@@ -25,13 +29,15 @@ $(DATADIR)/maps.google.com: $(DATADIR) FORCE
|
|||||||
|
|
||||||
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
|
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
|
||||||
$(eval GOOGLE_VERSION := $(shell grep -E "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E 's#.*http://khm[0-9]+.google.com/kh/v=##;s#.x26.*##'))
|
$(eval GOOGLE_VERSION := $(shell grep -E "http://khm[0-9]+.google.com/kh/v=[0-9]+.x26" $(DATADIR)/maps.google.com | sed -E 's#.*http://khm[0-9]+.google.com/kh/v=##;s#.x26.*##'))
|
||||||
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
@echo "Updated google maps version to $(GOOGLE_VERSION)"
|
@echo "Updated google maps version to $(GOOGLE_VERSION)"
|
||||||
@echo "-----------------------------------------------"
|
@echo "-----------------------------------------------"
|
||||||
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(TMPDIR)/maps.xml
|
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $($@_TMP)
|
||||||
$(Q)echo "" >> $(TMPDIR)/maps.xml
|
$(Q)echo "" >> $($@_TMP)
|
||||||
$(Q)echo "<maps google_version=\"$(GOOGLE_VERSION)\"/>" >> $(TMPDIR)/maps.xml
|
$(Q)echo "<maps google_version=\"$(GOOGLE_VERSION)\"/>" >> $($@_TMP)
|
||||||
$(Q)echo "" >> $(TMPDIR)/maps.xml
|
$(Q)echo "" >> $($@_TMP)
|
||||||
$(Q)mv $(TMPDIR)/maps.xml $@
|
$(Q)mv $($@_TMP) $@
|
||||||
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|||||||
+4
-1
@@ -1,8 +1,11 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
slides : slides.tex $(PDF) $(ANIMS)
|
slides : slides.tex $(PDF) $(ANIMS)
|
||||||
pdflatex slides
|
pdflatex slides
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.log *.nav *.out *.snm *.toc *.aux slides.pdf
|
$(Q)rm -f *~ *.log *.nav *.out *.snm *.toc *.aux slides.pdf
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
doc_pprz_algebra.pdf: headfile.tex
|
doc_pprz_algebra.pdf: headfile.tex
|
||||||
pdflatex $<
|
pdflatex $<
|
||||||
bib:
|
bib:
|
||||||
bibtex headfile
|
bibtex headfile
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
|
$(Q)rm -f *~ *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
|
||||||
find . -name '*~' -exec rm -f {} \;
|
$(Q)find . -name '*~' -exec rm -f {} \;
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
doc_pprz_algebra.pdf: headfile.tex
|
doc_pprz_algebra.pdf: headfile.tex
|
||||||
pdflatex $<
|
pdflatex $<
|
||||||
bib:
|
bib:
|
||||||
bibtex headfile
|
bibtex headfile
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
|
$(Q)rm -f *~ *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
|
||||||
find . -name '*~' -exec rm -f {} \;
|
$(Q)find . -name '*~' -exec rm -f {} \;
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2013 Gautier Hattenberger
|
||||||
|
#
|
||||||
|
# This file is part of paparazzi.
|
||||||
|
#
|
||||||
|
# paparazzi is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# paparazzi is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with paparazzi; see the file COPYING. If not, write to
|
||||||
|
# the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
|
# Boston, MA 02111-1307, USA.
|
||||||
|
#
|
||||||
|
|
||||||
|
# General ocaml compiling tools and pprz lib
|
||||||
|
|
||||||
|
OCAML = ocaml
|
||||||
|
OCAMLC = ocamlfind ocamlc
|
||||||
|
OCAMLOPT = ocamlfind ocamlopt
|
||||||
|
OCAMLDEP = ocamldep
|
||||||
|
OCAMLMKLIB = ocamlmklib
|
||||||
|
LIBPPRZDIR = $(PAPARAZZI_SRC)/sw/lib/ocaml
|
||||||
|
LIBPPRZCMA = $(LIBPPRZDIR)/lib-pprz.cma
|
||||||
|
LIBPPRZCMXA = $(LIBPPRZCMA:.cma=.cmxa)
|
||||||
|
XLIBPPRZCMA = $(LIBPPRZDIR)/xlib-pprz.cma
|
||||||
|
XLIBPPRZCMXA = $(XLIBPPRZCMA:.cma=.cmxa)
|
||||||
|
OCAMLDLL = -dllpath $(LIBPPRZDIR)
|
||||||
|
OCAMLXDLL = -dllpath $(LIBPPRZDIR)
|
||||||
|
|
||||||
|
export OCAMLPATH=$(LIBPPRZDIR):$OCAMLPATH
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
OBJDIR = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)/$(TARGET)
|
OBJDIR = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)/$(TARGET)
|
||||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||||
@@ -51,10 +54,6 @@ ifneq ($(MAKECMDGOALS),clean)
|
|||||||
|
|
||||||
# sort cflags and sources to throw out duplicates
|
# sort cflags and sources to throw out duplicates
|
||||||
#
|
#
|
||||||
#$(info CFLAGS_orig = $($(TARGET).CFLAGS))
|
|
||||||
#$(info CFLAGS_sort = $(sort $($(TARGET).CFLAGS)))
|
|
||||||
#$(info srcs_orig = $($(TARGET).srcs))
|
|
||||||
#$(info srcs_sort = $(sort $($(TARGET).srcs)))
|
|
||||||
$(TARGET).CFLAGS := $(sort $($(TARGET).CFLAGS))
|
$(TARGET).CFLAGS := $(sort $($(TARGET).CFLAGS))
|
||||||
$(TARGET).srcs := $(sort $($(TARGET).srcs))
|
$(TARGET).srcs := $(sort $($(TARGET).srcs))
|
||||||
endif
|
endif
|
||||||
@@ -72,5 +71,5 @@ warn_conf :
|
|||||||
@echo
|
@echo
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -f *~ a.out *.elf
|
$(Q)rm -f *~ a.out *.elf
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
LIBNAME = ../libusbstack
|
LIBNAME = ../libusbstack
|
||||||
APPNAME = main
|
APPNAME = main
|
||||||
|
|
||||||
@@ -41,7 +44,7 @@ crt.o: crt.s
|
|||||||
$(CC) -c $(AFLAGS) -Wa,-ahlms=crt.lst crt.s -o crt.o
|
$(CC) -c $(AFLAGS) -Wa,-ahlms=crt.lst crt.s -o crt.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.hex *.elf *.o *.lst *.dmp *.map .depend
|
$(Q)rm -f *.hex *.elf *.o *.lst *.dmp *.map .depend
|
||||||
|
|
||||||
# recompile if the Makefile changes
|
# recompile if the Makefile changes
|
||||||
$(OBJS): Makefile
|
$(OBJS): Makefile
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
#PROC_AP PROC_FBW PROC_TINY PROC_TINYJ
|
#PROC_AP PROC_FBW PROC_TINY PROC_TINYJ
|
||||||
#PROC = TINYJ
|
#PROC = TINYJ
|
||||||
ALLFLAGS = -DPROC_$(PROC)
|
ALLFLAGS = -DPROC_$(PROC)
|
||||||
@@ -37,9 +40,9 @@ LIBOBJS = usbhw_lpc.o usbcontrol.o usbstdreq.o usbinit.o usbdescrip.o
|
|||||||
all: lib app app_ram
|
all: lib app app_ram
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(LIBNAME).a $(LIBOBJS)
|
$(Q)$(RM) -f $(LIBNAME).a $(LIBOBJS)
|
||||||
$(RM) -f $(APPNAME).hex $(APPNAME).elf $(OBJS) *.lst $(APPNAME).dmp $(APPNAME).map
|
$(Q)$(RM) -f $(APPNAME).hex $(APPNAME).elf $(OBJS) *.lst $(APPNAME).dmp $(APPNAME).map
|
||||||
$(RM) -f $(APPNAME_RAM).hex $(APPNAME_RAM).elf $(APPNAME_RAM).dmp $(APPNAME_RAM).map
|
$(Q)$(RM) -f $(APPNAME_RAM).hex $(APPNAME_RAM).elf $(APPNAME_RAM).dmp $(APPNAME_RAM).map
|
||||||
|
|
||||||
# build lib
|
# build lib
|
||||||
lib: $(LIBOBJS)
|
lib: $(LIBOBJS)
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
##
|
##
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=gnu99 -Wall -I.. -I../.. -I../../test/ -I../../../include -I../../booz_priv
|
CFLAGS = -std=gnu99 -Wall -I.. -I../.. -I../../test/ -I../../../include -I../../booz_priv
|
||||||
LDFLAGS = -lm
|
LDFLAGS = -lm
|
||||||
@@ -51,4 +54,4 @@ test_att_ref: test_att_ref.c ../stabilization/booz_stabilization_attitude_ref_qu
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ test_att_ref
|
$(Q)rm -f *~ test_att_ref
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
MCU = attiny25
|
MCU = attiny25
|
||||||
|
|
||||||
PROG = dragon_isp
|
PROG = dragon_isp
|
||||||
@@ -19,7 +22,7 @@ SOURCES = blitzer.c
|
|||||||
all: $(APPNAME)
|
all: $(APPNAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).elf $(APPNAME).hex
|
$(Q)$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).elf $(APPNAME).hex
|
||||||
|
|
||||||
app: $(APPNAME)
|
app: $(APPNAME)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
all:
|
all:
|
||||||
|
|
||||||
CFLAGS = -Wall -I..
|
CFLAGS = -Wall -I..
|
||||||
@@ -25,7 +28,7 @@ play_audio: sndfile-play.c
|
|||||||
gcc $(CFLAGS) $^ -o $@ $(LDFLAGS) -lsndfile -lasound
|
gcc $(CFLAGS) $^ -o $@ $(LDFLAGS) -lsndfile -lasound
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f i86_vor_test_float_demod \
|
$(Q)rm -f i86_vor_test_float_demod \
|
||||||
i86_vor_test_int_demod \
|
i86_vor_test_int_demod \
|
||||||
i86_vor_test_filters \
|
i86_vor_test_filters \
|
||||||
*~ \#*
|
*~ \#*
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CFLAGS = -Wall $(shell pkg-config --cflags glib-2.0) -g
|
CFLAGS = -Wall $(shell pkg-config --cflags glib-2.0) -g
|
||||||
LDFLAGS = $(shell pkg-config --libs glib-2.0)
|
LDFLAGS = $(shell pkg-config --libs glib-2.0)
|
||||||
|
|
||||||
@@ -49,4 +52,4 @@ onboard_logger: onboard_logger.c
|
|||||||
$(CC) $(CFLAGS) -o $@ $^ -lpcap
|
$(CC) $(CFLAGS) -o $@ $^ -lpcap
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ fms test_telemetry
|
$(Q)rm -f *~ fms test_telemetry
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
raw_log_to_ascii: raw_log_to_ascii.c
|
raw_log_to_ascii: raw_log_to_ascii.c
|
||||||
gcc -I../../ -I../../../include -std=gnu99 -Wall raw_log_to_ascii.c -DOVERO_LINK_MSG_UP=AutopilotMessageVIUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageVIDown -o raw_log_to_ascii
|
gcc -I../../ -I../../../include -std=gnu99 -Wall raw_log_to_ascii.c -DOVERO_LINK_MSG_UP=AutopilotMessageVIUp -DOVERO_LINK_MSG_DOWN=AutopilotMessageVIDown -o raw_log_to_ascii
|
||||||
|
|
||||||
@@ -26,4 +29,4 @@ run_filter_on_log: ./libeknav_from_log.cpp $(LIBEKNAV_SRCS) ../../math/pprz_geod
|
|||||||
g++ -I/usr/include/eigen2 -I../.. -I../../../include -I../../../../var/FY $(eknavOnLogFlags) -o $@ $^
|
g++ -I/usr/include/eigen2 -I../.. -I../../../include -I../../../../var/FY $(eknavOnLogFlags) -o $@ $^
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm -f *.o *~ *.d
|
$(Q)rm -f *.o *~ *.d
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
# Build shared pprz math library
|
# Build shared pprz math library
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC= gcc
|
CC= gcc
|
||||||
CFLAGS= -fpic
|
CFLAGS= -fpic
|
||||||
INCLUDES= -I$(PAPARAZZI_SRC)/sw/include -I$(PAPARAZZI_SRC)/sw/airborne
|
INCLUDES= -I$(PAPARAZZI_SRC)/sw/include -I$(PAPARAZZI_SRC)/sw/airborne
|
||||||
@@ -43,5 +46,5 @@ $(BUILDDIR)/%.o: %.c
|
|||||||
$(CC) -c $< $(CFLAGS) $(INCLUDES) -o $@
|
$(CC) -c $< $(CFLAGS) $(INCLUDES) -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(BUILDDIR)/*.o $(BUILDDIR)/$(LIBNAME).so
|
$(Q)rm -f $(BUILDDIR)/*.o $(BUILDDIR)/$(LIBNAME).so
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=c99 -I.. -I../../include -I../booz -I../../booz -Wall
|
CFLAGS = -std=c99 -I.. -I../../include -I../booz -I../../booz -Wall
|
||||||
@@ -33,4 +36,4 @@ test_fmul: test_fmul.c
|
|||||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ test_geodetic test_algebra *.exe
|
$(Q)rm -f *~ test_geodetic test_algebra *.exe
|
||||||
|
|||||||
@@ -33,19 +33,15 @@ else
|
|||||||
endif
|
endif
|
||||||
FPIC=-fPIC
|
FPIC=-fPIC
|
||||||
|
|
||||||
OCAMLC=ocamlc
|
include ../../Makefile.ocaml
|
||||||
OCAMLOPT=ocamlopt
|
|
||||||
OCAMLDEP=ocamldep
|
INCLUDES=
|
||||||
OCAMLOPTFLAGS=-thread
|
LIBS=
|
||||||
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
LIBSX=$(LIBS:.cma=.cmxa)
|
||||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
|
||||||
LIBPPRZDIR=../../lib/ocaml
|
INCLUDES= -I ../multimon
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format pcre) $(OCAMLNETINCLUDES)
|
PKG = -package pprz.xlib
|
||||||
LIBS=$(OCAMLNETCMA) glibivy-ocaml.cma lablgtk.cma lablglade.cma lib-pprz.cma lablgnomecanvas.cma xlib-pprz.cma
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz.xlib
|
||||||
CMXA=$(LIBS:.cma=.cmxa)
|
|
||||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
|
||||||
LIBPPRZCMXA=$(LIBPPRZCMA:.cma=.cmxa)
|
|
||||||
XLIBPPRZCMA=$(LIBPPRZDIR)/xlib-pprz.cma
|
|
||||||
|
|
||||||
ML= gtk_setting_time.ml gtk_strip.ml horizon.ml strip.ml gtk_save_settings.ml saveSettings.ml page_settings.ml pages.ml speech.ml plugin.ml sectors.ml map2d.ml editFP.ml live.ml particules.ml papgets.ml gcs.ml
|
ML= gtk_setting_time.ml gtk_strip.ml horizon.ml strip.ml gtk_save_settings.ml saveSettings.ml page_settings.ml pages.ml speech.ml plugin.ml sectors.ml map2d.ml editFP.ml live.ml particules.ml papgets.ml gcs.ml
|
||||||
MAIN=gcs
|
MAIN=gcs
|
||||||
@@ -56,45 +52,49 @@ all : $(MAIN)
|
|||||||
|
|
||||||
opt : $(MAIN).opt
|
opt : $(MAIN).opt
|
||||||
|
|
||||||
$(MAIN) : $(CMO) $(XLIBPPRZCMA) $(LIBPPRZCMA)
|
$(MAIN) : $(CMO)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(OCAMLCFLAGS) -custom $(INCLUDES) $(OCAMLNETINCLUDES) unix.cma str.cma netstring.cma netclient.cma xml-light.cma $(LIBS) threads.cma gtkThread.cmo myGtkInit.cmo $(CMO) -o $@
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(LIBS) $(LINKPKG) myGtkInit.cmo $(CMO) -o $@
|
||||||
|
|
||||||
$(MAIN).opt : $(CMX)
|
$(MAIN).opt : $(CMX)
|
||||||
@echo OOL $@
|
@echo OOL $@
|
||||||
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) str.cmxa unix.cmxa xml-light.cmxa $(LIBS:.cma=.cmxa) threads.cmxa gtkThread.cmx gtkInit.cmx $(CMX) -o $@
|
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) $(LIBSX) -package pprz.xlib,lablgtk2.init -linkpkg $(CMX) -o $@
|
||||||
|
|
||||||
|
|
||||||
%.cmo: %.ml
|
%.cmo: %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(PKG) -c $<
|
||||||
%.cmi: %.mli
|
%.cmi: %.mli
|
||||||
@echo OCI $<
|
@echo OCI $<
|
||||||
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(PKG) -c $<
|
||||||
%.cmx: %.ml
|
%.cmx: %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) $(PKG) -c $<
|
||||||
|
|
||||||
saveSettings.cmo : gtk_save_settings.cmo
|
saveSettings.cmo : gtk_save_settings.cmo
|
||||||
saveSettings.cmx: gtk_save_settings.cmx
|
saveSettings.cmx: gtk_save_settings.cmx
|
||||||
|
|
||||||
gtk_strip.ml : gcs.glade
|
gtk_strip.ml : gcs.glade
|
||||||
lablgladecc2 -root eventbox_strip -hide-default $< | grep -B 1000000 " end" > $@
|
@echo GLADE $@
|
||||||
|
$(Q)lablgladecc2 -root eventbox_strip -hide-default $< | grep -B 1000000 " end" > $@
|
||||||
|
|
||||||
gtk_setting_time.ml : gcs.glade
|
gtk_setting_time.ml : gcs.glade
|
||||||
lablgladecc2 -root setting_time -hide-default $< | grep -B 1000000 " end" > $@
|
@echo GLADE $@
|
||||||
|
$(Q)lablgladecc2 -root setting_time -hide-default $< | grep -B 1000000 " end" > $@
|
||||||
|
|
||||||
gtk_save_settings.ml : gcs.glade
|
gtk_save_settings.ml : gcs.glade
|
||||||
lablgladecc2 -root save_settings -hide-default $< | grep -B 1000000 " end" > $@
|
@echo GLADE $@
|
||||||
|
$(Q)lablgladecc2 -root save_settings -hide-default $< | grep -B 1000000 " end" > $@
|
||||||
|
|
||||||
strip.cmo : gtk_strip.cmo gtk_setting_time.cmo
|
strip.cmo : gtk_strip.cmo gtk_setting_time.cmo
|
||||||
|
|
||||||
compass : compass.ml
|
compass : compass.ml
|
||||||
$(OCAMLC) -custom $(OCAMLCFLAGS) $(INCLUDES) unix.cma str.cma xml-light.cma $(LIBS) gtkInit.cmo $^ -o $@
|
@echo OL $@
|
||||||
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) $(LINKPKG) gtkInit.cmo $^ -o $@
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~* *.cm* *.o *.out *.opt map2d gcs .depend gtk_strip.ml gtk_setting_time.ml gtk_save_settings.ml compass ant_track ant_track_pmm test_enose actuators
|
$(Q)rm -f *~* *.cm* *.o *.out *.opt map2d gcs .depend gtk_strip.ml gtk_setting_time.ml gtk_save_settings.ml compass ant_track ant_track_pmm test_enose actuators
|
||||||
|
|
||||||
.PHONY: all opt clean
|
.PHONY: all opt clean
|
||||||
|
|
||||||
|
|||||||
@@ -24,38 +24,75 @@
|
|||||||
# Quiet compilation
|
# Quiet compilation
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
include ../../Makefile.ocaml
|
||||||
OCAMLDEP = ocamldep
|
|
||||||
LIBPPRZDIR = ../../lib/ocaml
|
|
||||||
TOOLSDIR = ../../tools
|
TOOLSDIR = ../../tools
|
||||||
OCAMLINCLUDES= -I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
|
|
||||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
CC = gcc
|
||||||
|
|
||||||
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
|
ifeq ($(LBITS),64)
|
||||||
|
FPIC=-fpic
|
||||||
|
else
|
||||||
|
FPIC=
|
||||||
|
endif
|
||||||
|
|
||||||
|
OCAMLINCLUDES= -I $(TOOLSDIR)
|
||||||
|
PKG = -package pprz,glibivy
|
||||||
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
|
||||||
|
|
||||||
|
GLIB_CFLAGS = -Wall $(shell pkg-config glib-2.0 --cflags) $(FPIC)
|
||||||
|
GLIB_LDFLAGS = $(shell pkg-config glib-2.0 --libs) -lglibivy
|
||||||
|
|
||||||
# apparently on OSX `sdl-config --libs` also has -lSDLmain which we don't want
|
# apparently on OSX `sdl-config --libs` also has -lSDLmain which we don't want
|
||||||
#ML_SDL_LFLAGS = $(foreach u,$(shell sdl-config --libs),-cclib $(u))
|
SDL_LDIRS = $(shell pkg-config sdl --libs-only-L)
|
||||||
ML_SDL_LFLAGS = $(foreach u,$(shell pkg-config sdl --libs-only-L) -lSDL,-cclib $(u))
|
SDL_LIBS = -lSDL
|
||||||
INCLUDES += -I `ocamlc -where`
|
# we do however need -lSDLmain for test_stick, which is just c
|
||||||
|
SDL_LDFLAGS = $(shell sdl-config --libs)
|
||||||
|
|
||||||
|
# apparently on OSX `sdl-config --libs` also has -lSDLmain which we don't want
|
||||||
|
ML_SDL_LFLAGS = $(foreach u,$(SDL_LDIRS),-ccopt $(u)) $(foreach u,$(SDL_LIBS),-cclib $(u)) libSDL.so
|
||||||
|
ML_SDL_LFLAGS += -dllpath ${PAPARAZZI_SRC}/sw/ground_segment/joystick
|
||||||
|
INCLUDES += -I $(shell ocamlc -where)
|
||||||
|
|
||||||
|
SDL_STICK_DEPS = sdl_stick.o ml_sdl_stick.o
|
||||||
|
# apparently on OSX you cannot dynamically link with SDL, see ocamlsdl readme
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
ML_SDL_OCAMLFLAGS = -custom
|
||||||
|
INPUT2IVY_DEPS = $(SDL_STICK_DEPS) input2ivy.cmo
|
||||||
|
else
|
||||||
|
ML_SDL_OCAMLFLAGS =
|
||||||
|
INPUT2IVY_DEPS = sdl_stick.so input2ivy.cmo
|
||||||
|
endif
|
||||||
|
|
||||||
all: test_stick input2ivy
|
all: test_stick input2ivy
|
||||||
|
|
||||||
test_stick: test_sdl_stick.o
|
test_stick: test_sdl_stick.o
|
||||||
gcc -g -O2 -Wall -DSTICK_DBG `pkg-config glib-2.0 --cflags` -o $@ $^ sdl_stick.c `pkg-config glib-2.0 --libs` -lglibivy `sdl-config --libs`
|
@echo BUILD $@
|
||||||
|
$(Q)$(CC) -g -O2 -DSTICK_DBG $(GLIB_CFLAGS) -o $@ $^ sdl_stick.c $(GLIB_LDFLAGS) $(SDL_LDFLAGS)
|
||||||
|
|
||||||
input2ivy: sdl_stick.o ml_sdl_stick.o input2ivy.cmo
|
input2ivy: $(INPUT2IVY_DEPS)
|
||||||
$(OCAMLC) $(OCAMLINCLUDES) -o $@ unix.cma str.cma glibivy-ocaml.cma xml-light.cma lib-pprz.cma lablgtk.cma $(TOOLSDIR)/fp_proc.cmo $^ -custom $(ML_SDL_LFLAGS)
|
@echo OL $@
|
||||||
|
$(Q)$(OCAMLC) $(OCAMLINCLUDES) -o $@ $(LINKPKG) $(TOOLSDIR)/fp_proc.cmo $^ $(ML_SDL_OCAMLFLAGS) $(ML_SDL_LFLAGS)
|
||||||
|
|
||||||
# dependency of input2ivy
|
# dependency of input2ivy
|
||||||
input2ivy: $(LIBPPRZCMA) $(TOOLSDIR)/fp_proc.cmo
|
input2ivy: $(TOOLSDIR)/fp_proc.cmo
|
||||||
|
|
||||||
|
sdl_stick.so : $(SDL_STICK_DEPS)
|
||||||
|
@echo BUILD $@
|
||||||
|
$(Q)$(CC) -shared -o $@ $^
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
gcc -c -O2 -Wall `pkg-config glib-2.0 --cflags` $(INCLUDES) $<
|
@echo CC $@
|
||||||
|
$(Q)$(CC) -c -O2 $(GLIB_CFLAGS) $(INCLUDES) $<
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(OCAMLINCLUDES) -c $<
|
$(Q)$(OCAMLC) $(OCAMLINCLUDES) -c $(PKG) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ core *.o *.bak .depend test*stick *.cmo *.cmi input2ivy
|
$(Q)rm -f *~ core *.o *.bak .depend test*stick *.cmo *.cmi input2ivy
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
#MS VC: cl lpc21iap.c elf.c lpcusb.c libusb.lib
|
#MS VC: cl lpc21iap.c elf.c lpcusb.c libusb.lib
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
LIBNAME = usb
|
LIBNAME = usb
|
||||||
APPNAME = lpc21iap
|
APPNAME = lpc21iap
|
||||||
|
|
||||||
@@ -38,7 +41,7 @@ SOURCES = lpc21iap.c elf.c lpcusb.c
|
|||||||
all: $(APPNAME)
|
all: $(APPNAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).obj $(APPNAME).exe
|
$(Q)$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).obj $(APPNAME).exe
|
||||||
|
|
||||||
app: $(APPNAME)
|
app: $(APPNAME)
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ endif
|
|||||||
all: davis2ivy kestrel2ivy
|
all: davis2ivy kestrel2ivy
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o davis2ivy kestrel2ivy
|
$(Q)rm -f *.o davis2ivy kestrel2ivy
|
||||||
|
|
||||||
davis2ivy: davis2ivy.o
|
davis2ivy: davis2ivy.o
|
||||||
$(Q)$(CC) -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
$(Q)$(CC) -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
||||||
|
|||||||
@@ -101,7 +101,8 @@ void open_port(const char* device) {
|
|||||||
|
|
||||||
/// disable transactions and empty queue
|
/// disable transactions and empty queue
|
||||||
void reset_station() {
|
void reset_station() {
|
||||||
char newline = '\n', bytes = 0;
|
char newline = '\n';
|
||||||
|
char bytes __attribute__ ((unused));
|
||||||
fprintf(stderr, "Resetting communication\n");
|
fprintf(stderr, "Resetting communication\n");
|
||||||
// send a \n (wakeup and cancel all running transmits)
|
// send a \n (wakeup and cancel all running transmits)
|
||||||
bytes = write(fd, &newline, 1);
|
bytes = write(fd, &newline, 1);
|
||||||
|
|||||||
@@ -23,83 +23,80 @@
|
|||||||
# Launch with "make Q=''" to get full command display
|
# Launch with "make Q=''" to get full command display
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
DEBUG =n
|
DEBUG=n
|
||||||
MACHINE := $(shell uname -m)
|
MACHINE:=$(shell uname -m)
|
||||||
AS86 =as86 -0 -a
|
AS86=as86 -0 -a
|
||||||
LD86 =ld86 -0
|
LD86=ld86 -0
|
||||||
AS =as
|
AS=as
|
||||||
LD =ld
|
LD=ld
|
||||||
LDFLAGS =-lm
|
LDFLAGS=-lm
|
||||||
HOSTCC =gcc
|
HOSTCC=gcc
|
||||||
CC =gcc
|
CC=gcc
|
||||||
MAKE =make
|
MAKE=make
|
||||||
CPP =$(CC) -E
|
CPP=$(CC) -E
|
||||||
AR =ar
|
AR=ar
|
||||||
STRIP =strip
|
STRIP=strip
|
||||||
MKDIR =mkdir
|
MKDIR=mkdir
|
||||||
OCAMLC =ocamlc
|
|
||||||
|
|
||||||
CFLAGS =-Wall -Wstrict-prototypes -I/usr/X11R6/include -I`$(OCAMLC) -where`
|
include ../../Makefile.ocaml
|
||||||
|
|
||||||
|
CFLAGS=-Wall -Wstrict-prototypes -I/usr/X11R6/include -I`$(OCAMLC) -where`
|
||||||
ifeq ($(DEBUG),y)
|
ifeq ($(DEBUG),y)
|
||||||
CFLAGS +=-g -O
|
CFLAGS += -g -O
|
||||||
else
|
else
|
||||||
CFLAGS +=-O3
|
CFLAGS += -O3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LBITS := $(shell getconf LONG_BIT)
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
ifeq ($(LBITS),64)
|
ifeq ($(LBITS),64)
|
||||||
CFLAGS += -fPIC
|
CFLAGS += -fPIC
|
||||||
else ifeq ($(MACHINE),'i686')
|
else ifeq ($(MACHINE),'i686')
|
||||||
CFLAGS += -march=i486 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -DARCH_I386
|
CFLAGS += -march=i486 -falign-loops=2 -falign-jumps=2 -falign-functions=2 -DARCH_I386
|
||||||
endif
|
endif
|
||||||
|
|
||||||
LDFLAGSX =-lX11 -L/usr/X11R6/lib
|
LDFLAGSX = -lX11 -L/usr/X11R6/lib
|
||||||
|
|
||||||
#BINDIR =bin-$(shell uname -m)
|
#BINDIR = bin-$(shell uname -m)
|
||||||
BINDIR =.
|
BINDIR =.
|
||||||
|
|
||||||
UNAME = $(shell uname -s)
|
UNAME = $(shell uname -s)
|
||||||
ifeq ("$(UNAME)","Linux")
|
ifneq (,$(findstring $(UNAME),linux Linux))
|
||||||
OBJFILES=pprzlib.o hdlc.o demod_afsk12.o demodml.o costabi.o gen_hdlc.o ml_hdlc.o demod.cmo hdlc.cmo
|
OBJFILES=pprzlib.o hdlc.o demod_afsk12.o demodml.o costabi.o gen_hdlc.o ml_hdlc.o demod.cmo hdlc.cmo
|
||||||
ALLTARGETS=$(BINDIR)/multimon multimon.cma
|
ALLTARGETS=$(BINDIR)/multimon multimon.cma
|
||||||
endif
|
endif
|
||||||
ifeq ("$(UNAME)","linux")
|
ifeq ($(UNAME),Darwin)
|
||||||
OBJFILES=pprzlib.o hdlc.o demod_afsk12.o demodml.o costabi.o gen_hdlc.o ml_hdlc.o demod.cmo hdlc.cmo
|
|
||||||
ALLTARGETS=$(BINDIR)/multimon multimon.cma
|
|
||||||
endif
|
|
||||||
ifeq ("$(UNAME)","Darwin")
|
|
||||||
OBJFILES=demodml.o ml_hdlc.o demod.cmo hdlc.cmo
|
OBJFILES=demodml.o ml_hdlc.o demod.cmo hdlc.cmo
|
||||||
ALLTARGETS=multimon.cma
|
ALLTARGETS=multimon.cma
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: $(ALLTARGETS)
|
all: $(ALLTARGETS)
|
||||||
|
|
||||||
multimon.cma: $(OBJFILES)
|
multimon.cma: $(OBJFILES)
|
||||||
@echo OLD $@
|
@echo OLD $@
|
||||||
$(Q)ocamlmklib -o multimon $^
|
$(Q)ocamlmklib -o multimon $^
|
||||||
|
|
||||||
|
|
||||||
$(BINDIR)/%.s: %.c
|
$(BINDIR)/%.s: %.c
|
||||||
$(CC) $(CFLAGS) -S -o $@ $<
|
$(CC) $(CFLAGS) -S -o $@ $<
|
||||||
|
|
||||||
$(BINDIR)/%.o: $(BINDIR)/%.s
|
$(BINDIR)/%.o: $(BINDIR)/%.s
|
||||||
$(AS) -c -o $@ $<
|
$(AS) -c -o $@ $<
|
||||||
|
|
||||||
$(BINDIR)/%.o: %.c
|
$(BINDIR)/%.o: %.c
|
||||||
@echo CC $<
|
@echo CC $<
|
||||||
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
SRC_L2 = hdlc.c pprz.c
|
SRC_L2 = hdlc.c pprz.c
|
||||||
SRC_L1 = demod_afsk48p.c demod_display.c
|
SRC_L1 = demod_afsk48p.c demod_display.c
|
||||||
SRC_MISC = unixinput.c xdisplay.c
|
SRC_MISC = unixinput.c xdisplay.c
|
||||||
|
|
||||||
SRC_GEN =gen.c gen_dtmf.c gen_sin.c gen_zvei.c gen_hdlc.c costabi.c
|
SRC_GEN = gen.c gen_dtmf.c gen_sin.c gen_zvei.c gen_hdlc.c costabi.c
|
||||||
|
|
||||||
OBJ_L2 =$(SRC_L2:%.c=$(BINDIR)/%.o)
|
OBJ_L2 = $(SRC_L2:%.c=$(BINDIR)/%.o)
|
||||||
OBJ_L1 =$(SRC_L1:%.c=$(BINDIR)/%.o)
|
OBJ_L1 = $(SRC_L1:%.c=$(BINDIR)/%.o)
|
||||||
OBJ_MISC =$(SRC_MISC:%.c=$(BINDIR)/%.o)
|
OBJ_MISC = $(SRC_MISC:%.c=$(BINDIR)/%.o)
|
||||||
|
|
||||||
OBJ_GEN =$(SRC_GEN:%.c=$(BINDIR)/%.o)
|
OBJ_GEN = $(SRC_GEN:%.c=$(BINDIR)/%.o)
|
||||||
|
|
||||||
$(BINDIR):
|
$(BINDIR):
|
||||||
$(MKDIR) $(BINDIR)
|
$(MKDIR) $(BINDIR)
|
||||||
@@ -108,14 +105,14 @@ $(BINDIR)/multimon: $(OBJ_L2) $(OBJ_L1) $(OBJ_MISC)
|
|||||||
@echo LD $@
|
@echo LD $@
|
||||||
$(Q)$(CC) $^ $(LDFLAGS) $(LDFLAGSX) -o $@
|
$(Q)$(CC) $^ $(LDFLAGS) $(LDFLAGSX) -o $@
|
||||||
|
|
||||||
$(BINDIR)/gen: $(OBJ_GEN)
|
$(BINDIR)/gen: $(OBJ_GEN)
|
||||||
$(CC) $^ $(LDFLAGS) -o $@
|
$(CC) $^ $(LDFLAGS) -o $@
|
||||||
|
|
||||||
$(BINDIR)/mkcostab: $(BINDIR)/mkcostab.o
|
$(BINDIR)/mkcostab: $(BINDIR)/mkcostab.o
|
||||||
$(CC) $^ $(LDFLAGS) -o $@
|
$(CC) $^ $(LDFLAGS) -o $@
|
||||||
|
|
||||||
costabi.c costabf.c: $(BINDIR)/mkcostab
|
costabi.c costabf.c: $(BINDIR)/mkcostab
|
||||||
$(BINDIR)/mkcostab
|
$(BINDIR)/mkcostab
|
||||||
|
|
||||||
|
|
||||||
libtest: pprzlib.o demodml.c demod.ml test.ml
|
libtest: pprzlib.o demodml.c demod.ml test.ml
|
||||||
@@ -133,11 +130,11 @@ hdlc.cmo : hdlc.cmi
|
|||||||
$(OCAMLC) $<
|
$(OCAMLC) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr *.cm* mkcostab .depend
|
$(Q)rm -fr *.cm* mkcostab .depend
|
||||||
$(RM) -f core `find . -name '*.[oas]' -print`
|
$(Q)$(RM) -f core `find . -name '*.[oas]' -print` *.so
|
||||||
$(RM) -f core `find . -name 'core' -print`
|
$(Q)$(RM) -f core `find . -name 'core' -print`
|
||||||
$(RM) -f core costabi.c costabf.c *~
|
$(Q)$(RM) -f core costabi.c costabf.c *~
|
||||||
$(RM) $(BINDIR)/multimon
|
$(Q)$(RM) $(BINDIR)/multimon
|
||||||
|
|
||||||
.PHONY: all clean depend dep
|
.PHONY: all clean depend dep
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
all: SMS_GS
|
all: SMS_GS
|
||||||
|
|
||||||
SMS_GS: SMS_Ground_UDtest_final.c
|
SMS_GS: SMS_Ground_UDtest_final.c
|
||||||
gcc -g -O2 -Wall `pkg-config --cflags glib-2.0 gtk+-2.0` -L/usr/lib -lglibivy -o SMS_GS SMS_Ground_UDtest_final.c `pkg-config --libs glib-2.0 gtk+-2.0` -lglibivy
|
gcc -g -O2 -Wall `pkg-config --cflags glib-2.0 gtk+-2.0` -L/usr/lib -lglibivy -o SMS_GS SMS_Ground_UDtest_final.c `pkg-config --libs glib-2.0 gtk+-2.0` -lglibivy
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f SMS_GS
|
$(Q)rm -f SMS_GS
|
||||||
|
|||||||
@@ -32,23 +32,18 @@ endif
|
|||||||
|
|
||||||
|
|
||||||
include ../../../conf/Makefile.local
|
include ../../../conf/Makefile.local
|
||||||
|
include ../../Makefile.ocaml
|
||||||
CONF = ../../../conf
|
CONF = ../../../conf
|
||||||
VAR = ../../../var
|
VAR = ../../../var
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
INCLUDES= -I ../multimon
|
||||||
OCAMLOPT = ocamlopt
|
PKG = -package glibivy,pprz
|
||||||
OCAMLDEP = ocamldep
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
|
||||||
LIBPPRZDIR = ../../lib/ocaml
|
XPKG = -package pprz.xlib
|
||||||
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
XLINKPKG = $(XPKG) -linkpkg -dllpath-pkg pprz.xlib
|
||||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring)
|
|
||||||
INCLUDES= -I $(LIBPPRZDIR) -I ../multimon $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES)
|
|
||||||
|
|
||||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
|
||||||
LIBPPRZCMXA=$(LIBPPRZCMA:.cma=.cmxa)
|
|
||||||
XLIBPPRZCMA=$(LIBPPRZDIR)/xlib-pprz.cma
|
|
||||||
XLIBPPRZCMXA=$(XLIBPPRZCMA:.cma=.cmxa)
|
|
||||||
|
|
||||||
LIBMULTIMONCMA=../multimon/multimon.cma
|
LIBMULTIMONCMA=../multimon/multimon.cma
|
||||||
|
LIBMULTIMONDLL= multimon.cma -dllpath $(PAPARAZZI_SRC)/sw/ground_segment/multimon
|
||||||
|
|
||||||
SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_server.ml rotorcraft_server.ml server.cmo
|
SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_server.ml rotorcraft_server.ml server.cmo
|
||||||
SERVERCMX = $(SERVERCMO:.cmo=.cmx)
|
SERVERCMX = $(SERVERCMO:.cmo=.cmx)
|
||||||
@@ -57,7 +52,7 @@ SERVERCMX = $(SERVERCMO:.cmo=.cmx)
|
|||||||
all: link server messages settings dia diadec $(VAR)/boa.conf ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge
|
all: link server messages settings dia diadec $(VAR)/boa.conf ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f link server messages settings dia diadec *.bak *~ core *.o .depend *.opt *.out *.cm* ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge gpsd2ivy c_ivy_client_example_1 c_ivy_client_example_2 c_ivy_client_example_3
|
$(Q)rm -f link server messages settings dia diadec *.bak *~ core *.o .depend *.opt *.out *.cm* ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge gpsd2ivy c_ivy_client_example_1 c_ivy_client_example_2 c_ivy_client_example_3
|
||||||
|
|
||||||
|
|
||||||
$(VAR)/boa.conf :$(CONF)/boa.conf
|
$(VAR)/boa.conf :$(CONF)/boa.conf
|
||||||
@@ -65,77 +60,75 @@ $(VAR)/boa.conf :$(CONF)/boa.conf
|
|||||||
sed 's|PAPARAZZI_HOME|$(PAPARAZZI_HOME)|' < $< > $@
|
sed 's|PAPARAZZI_HOME|$(PAPARAZZI_HOME)|' < $< > $@
|
||||||
|
|
||||||
|
|
||||||
messages : messages.cmo $(XLIBPPRZCMA) $(LIBPPRZCMA)
|
messages : messages.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
|
||||||
|
|
||||||
|
settings : settings.cmo ../cockpit/page_settings.cmo
|
||||||
settings : settings.cmo $(XLIBPPRZCMA) $(LIBPPRZCMA) ../cockpit/page_settings.cmo
|
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -I ../cockpit -o $@ unix.cma str.cma xml-light.cma lablgtk.cma lablglade.cma $(OCAMLNETCMA) glibivy-ocaml.cma lib-pprz.cma lablgnomecanvas.cma xlib-pprz.cma gtkInit.cmo gtk_save_settings.cmo saveSettings.cmo page_settings.cmo $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(XLINKPKG) gtkInit.cmo -I ../cockpit gtk_save_settings.cmo saveSettings.cmo page_settings.cmo $<
|
||||||
|
|
||||||
|
server : $(SERVERCMO)
|
||||||
server : $(SERVERCMO) $(LIBPPRZCMA)
|
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $(SERVERCMO)
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(SERVERCMO)
|
||||||
|
|
||||||
server.opt : $(SERVERCMX) $(LIBPPRZCMXA)
|
server.opt : $(SERVERCMX)
|
||||||
@echo OOL $@
|
@echo OOL $@
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa lablgtk.cmxa glibivy-ocaml.cmxa lib-pprz.cmxa $(SERVERCMX)
|
$(Q)$(OCAMLOPT) $(INCLUDES) -o $@ -package glibivy,pprz -linkpkg $(SERVERCMX)
|
||||||
|
|
||||||
link : link.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
link : link.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
ivy_tcp_aircraft : ivy_tcp_aircraft.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
ivy_tcp_aircraft : ivy_tcp_aircraft.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
ivy_tcp_controller : ivy_tcp_controller.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
ivy_tcp_controller : ivy_tcp_controller.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
broadcaster : broadcaster.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
broadcaster : broadcaster.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
ivy2udp : ivy2udp.cmo $(LIBPPRZCMA)
|
ivy2udp : ivy2udp.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $<
|
||||||
|
|
||||||
|
|
||||||
dia : dia.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
dia : dia.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
diadec : diadec.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
diadec : diadec.cmo $(LIBMULTIMONCMA)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $(LIBMULTIMONDLL) $<
|
||||||
|
|
||||||
|
|
||||||
150m : 150m.cmo $(LIBPPRZCMA)
|
150m : 150m.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
|
||||||
|
|
||||||
settings.cmo : INCLUDES += -I ../cockpit
|
settings.cmo : INCLUDES += -I ../cockpit
|
||||||
settings.cmo : ../cockpit/page_settings.cmi
|
settings.cmo : ../cockpit/page_settings.cmi
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) $(PKG) -c $<
|
||||||
|
|
||||||
%.cmx : %.ml
|
%.cmx : %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(INCLUDES) $(PKG) -c $<
|
||||||
|
|
||||||
%.cmi : %.mli
|
%.cmi : %.mli
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) $<
|
$(Q)$(OCAMLC) $(INCLUDES) $(PKG) $<
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|||||||
@@ -27,10 +27,6 @@ OCAMLC = ocamlc
|
|||||||
OCAMLOPT = ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml
|
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml
|
||||||
|
|
||||||
# default directory for temporary files
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
|
|
||||||
|
|
||||||
all: panic
|
all: panic
|
||||||
|
|
||||||
$^
|
$^
|
||||||
@@ -57,9 +53,19 @@ plot : ../../lib/ocaml/lib-pprz.cmxa
|
|||||||
export.cmo : gtk_export.cmo
|
export.cmo : gtk_export.cmo
|
||||||
export.cmx : gtk_export.cmx
|
export.cmx : gtk_export.cmx
|
||||||
|
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
MKTEMP = gmktemp
|
||||||
|
else
|
||||||
|
MKTEMP = mktemp
|
||||||
|
endif
|
||||||
|
|
||||||
gtk_export.ml : export.glade
|
gtk_export.ml : export.glade
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$<
|
@echo GLADE $@
|
||||||
lablgladecc2 -root export -hide-default $(TMPDIR)/$< | grep -B 1000000 " end" > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)lablgladecc2 -root export -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
pt : ahrsview imuview ahrs2fg
|
pt : ahrsview imuview ahrs2fg
|
||||||
|
|
||||||
@@ -72,7 +78,7 @@ MORE_FLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/incl
|
|||||||
MORE_CFLAGS = -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -I. -I. -I.. -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
|
MORE_CFLAGS = -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -I. -I. -I.. -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* panic
|
$(Q)rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* panic
|
||||||
|
|
||||||
#FGFS_PREFIX=/home/poine/local
|
#FGFS_PREFIX=/home/poine/local
|
||||||
FGFS_PREFIX=/home/poine/flightgear
|
FGFS_PREFIX=/home/poine/flightgear
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ fms_steps_attitude: fms_steps_attitude.c
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ core *.o *.bak .depend fdm_step fms_steps_attitude
|
$(Q)rm -f *~ core *.o *.bak .depend fdm_step fms_steps_attitude
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CFLAGS = -g -Wall `pkg-config glib-2.0 --cflags`
|
CFLAGS = -g -Wall `pkg-config glib-2.0 --cflags`
|
||||||
LDFLAGS = `pkg-config glib-2.0 --libs` -lm
|
LDFLAGS = `pkg-config glib-2.0 --libs` -lm
|
||||||
|
|
||||||
@@ -127,4 +130,4 @@ test_ukf: $(OBJS_TEST_UKF)
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.o tilt_ukf tilt_ekf tilt_fast_ekf ahrs_euler_ekf ahrs_quat_ukf ahrs_quat_ekf ahrs_quat_fast_ekf test_matrix test_ukf
|
$(Q)rm -f *~ *.o tilt_ukf tilt_ekf tilt_fast_ekf ahrs_euler_ekf ahrs_quat_ukf ahrs_quat_ekf ahrs_quat_fast_ekf test_matrix test_ukf
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags`
|
CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags`
|
||||||
@@ -8,4 +11,4 @@ ir_calib : main.c calibrator.c gui.c
|
|||||||
$(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
|
$(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ ir_calib
|
$(Q)rm -f *~ ir_calib
|
||||||
|
|||||||
@@ -2,12 +2,15 @@
|
|||||||
# Makefile
|
# Makefile
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
APP = i2c_usb
|
APP = i2c_usb
|
||||||
|
|
||||||
all: $(APP)
|
all: $(APP)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(APP)
|
$(Q)rm -f $(APP)
|
||||||
|
|
||||||
$(APP): $(APP).c
|
$(APP): $(APP).c
|
||||||
$(CC) -Wall -o $@ $(APP).c -lusb
|
$(CC) -Wall -o $@ $(APP).c -lusb
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
#LIBNAME = efsl
|
#LIBNAME = efsl
|
||||||
APPNAME = linuxtest
|
APPNAME = linuxtest
|
||||||
|
|
||||||
@@ -24,7 +27,7 @@ SOURCES = linuxtest.c
|
|||||||
all: $(APPNAME)
|
all: $(APPNAME)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).obj $(APPNAME).exe
|
$(Q)$(RM) -f core $(APPNAME).o $(APPNAME) $(APPNAME).obj $(APPNAME).exe
|
||||||
|
|
||||||
app: $(APPNAME)
|
app: $(APPNAME)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags` -I../../../var/MB
|
CFLAGS=-g -O2 -Wall `pkg-config gtk+-2.0 --cflags` -I../../../var/MB
|
||||||
LDFLAGS=`pkg-config gtk+-2.0 --libs` -s -lglibivy
|
LDFLAGS=`pkg-config gtk+-2.0 --libs` -s -lglibivy
|
||||||
@@ -13,5 +16,5 @@ plot_test:
|
|||||||
scilab -f test.sce -args $(LOG)
|
scilab -f test.sce -args $(LOG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ motor_bench
|
$(Q)rm -f *~ motor_bench
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
all: email2udp udp2tcp tcp2ivy
|
all: email2udp udp2tcp tcp2ivy
|
||||||
|
|
||||||
email2udp: email2udp.c
|
email2udp: email2udp.c
|
||||||
@@ -10,4 +13,4 @@ tcp2ivy_generic: tcp2ivy_generic.c
|
|||||||
gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -I../../../var/${AIRCRAFT} -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy -lm
|
gcc -g -O2 -Wall `pkg-config glib-2.0 --cflags` -I../../../var/${AIRCRAFT} -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy -lm
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f email2udp udp2tcp tcp2ivy
|
$(Q)rm -f email2udp udp2tcp tcp2ivy
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
MODCFLAGS=-Wall
|
MODCFLAGS=-Wall
|
||||||
|
|
||||||
all: turb_simu
|
all: turb_simu
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f core *.o turb_simu
|
$(Q)rm -f core *.o turb_simu
|
||||||
|
|
||||||
ublox_conf: ublox_conf.c Makefile
|
ublox_conf: ublox_conf.c Makefile
|
||||||
$(CC) $(MODCFLAGS) turb_simu.c -o turb_simu
|
$(CC) $(MODCFLAGS) turb_simu.c -o turb_simu
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
GLIB_CFLAGS = -Wall `pkg-config glib-2.0 --cflags`
|
GLIB_CFLAGS = -Wall `pkg-config glib-2.0 --cflags`
|
||||||
GLIB_LDFLAGS = `pkg-config glib-2.0 --libs` -lglibivy -lpcre
|
GLIB_LDFLAGS = `pkg-config glib-2.0 --libs` -lglibivy -lpcre
|
||||||
@@ -8,4 +11,4 @@ main: main.c serial_port.c
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f main
|
$(Q)rm -f main
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
description = "Paparazzi UAS package"
|
||||||
|
requires = "unix,str,xml-light,lablgtk2,glibivy,netclient"
|
||||||
|
version = "1.0"
|
||||||
|
directory = ""
|
||||||
|
|
||||||
|
archive(byte) = "lib-pprz.cma"
|
||||||
|
archive(native) = "lib-pprz.cmxa"
|
||||||
|
|
||||||
|
package "xlib" (
|
||||||
|
requires = "pprz,lablgtk2-gnome.gnomecanvas,lablgtk2.glade"
|
||||||
|
version = "1.0"
|
||||||
|
archive(byte) = "xlib-pprz.cma"
|
||||||
|
archive(native) = "xlib-pprz.cmxa"
|
||||||
|
)
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
description = "Paparazzi UAS package"
|
||||||
|
requires = "unix,str,xml-light,lablgtk2,glibivy,netclient"
|
||||||
|
version = "1.0"
|
||||||
|
directory = ""
|
||||||
|
|
||||||
|
archive(byte) = "lib-pprz.cma"
|
||||||
|
archive(native) = "lib-pprz.cmxa"
|
||||||
|
|
||||||
|
package "xlib" (
|
||||||
|
requires = "pprz,lablgtk2.gnomecanvas,lablgtk2.glade"
|
||||||
|
version = "1.0"
|
||||||
|
archive(byte) = "xlib-pprz.cma"
|
||||||
|
archive(native) = "xlib-pprz.cmxa"
|
||||||
|
)
|
||||||
+78
-54
@@ -23,6 +23,19 @@
|
|||||||
|
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
|
OCAMLC=ocamlfind ocamlc
|
||||||
|
OCAMLOPT=ocamlfind ocamlopt
|
||||||
|
OCAMLDEP=ocamldep
|
||||||
|
OCAMLLEX=ocamllex
|
||||||
|
OCAMLYACC=ocamlyacc
|
||||||
|
OCAMLMKLIB=ocamlmklib
|
||||||
|
OCAMLLIBDIR=$(shell $(OCAMLC) -where)
|
||||||
|
|
||||||
|
# verbose ocamlmklib: Print commands before executing them
|
||||||
|
#VERBOSITY = -verbose
|
||||||
|
VERBOSITY =
|
||||||
|
|
||||||
LBITS := $(shell getconf LONG_BIT)
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
ifeq ($(LBITS),64)
|
ifeq ($(LBITS),64)
|
||||||
FPIC = -ccopt -fPIC
|
FPIC = -ccopt -fPIC
|
||||||
@@ -30,15 +43,21 @@ else
|
|||||||
FPIC =
|
FPIC =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient) $(shell ocamlfind query -r -i-format pcre)
|
UNAME = $(shell uname -s)
|
||||||
XINCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
ifeq ("$(UNAME)","Darwin")
|
||||||
OCAMLC=ocamlc
|
MKTEMP = gmktemp
|
||||||
OCAMLDEP=ocamldep
|
LABLGTK2GNOMECANVAS = lablgtk2.gnomecanvas
|
||||||
OCAMLOPT=ocamlopt
|
METAFILE = META.pprz.osx
|
||||||
OCAMLLEX=ocamllex
|
else
|
||||||
OCAMLYACC=ocamlyacc
|
MKTEMP = mktemp
|
||||||
OCAMLLIBDIR=$(shell $(OCAMLC) -where)
|
LABLGTK2GNOMECANVAS = lablgtk2-gnome.gnomecanvas
|
||||||
|
METAFILE = META.pprz.deb
|
||||||
|
endif
|
||||||
|
|
||||||
|
INCLUDES=
|
||||||
|
PKGCOMMON=xml-light,netclient,glibivy,lablgtk2
|
||||||
|
XINCLUDES=
|
||||||
|
XPKGCOMMON=xml-light,glibivy,$(LABLGTK2GNOMECANVAS),lablgtk2.glade
|
||||||
|
|
||||||
SRC = fig.ml debug.ml base64.ml serial.ml ocaml_tools.ml expr_syntax.ml expr_parser.ml expr_lexer.ml extXml.ml env.ml xml2h.ml latlong.ml egm96.ml srtm.ml http.ml maps_support.ml gm.ml iGN.ml geometry_2d.ml cserial.o convert.o ubx.ml pprz.ml xbee.ml logpprz.ml xmlCom.ml os_calls.ml editAirframe.ml defivybus.ml
|
SRC = fig.ml debug.ml base64.ml serial.ml ocaml_tools.ml expr_syntax.ml expr_parser.ml expr_lexer.ml extXml.ml env.ml xml2h.ml latlong.ml egm96.ml srtm.ml http.ml maps_support.ml gm.ml iGN.ml geometry_2d.ml cserial.o convert.o ubx.ml pprz.ml xbee.ml logpprz.ml xmlCom.ml os_calls.ml editAirframe.ml defivybus.ml
|
||||||
CMO = $(SRC:.ml=.cmo)
|
CMO = $(SRC:.ml=.cmo)
|
||||||
@@ -51,30 +70,26 @@ XCMX = $(XSRC:.ml=.cmx)
|
|||||||
TESTS_SRC = test/test_latlong.ml
|
TESTS_SRC = test/test_latlong.ml
|
||||||
TESTS_CMO = $(TESTS_SRC:.ml=.cmo)
|
TESTS_CMO = $(TESTS_SRC:.ml=.cmo)
|
||||||
|
|
||||||
# default directory for temporary files
|
all : byte native
|
||||||
TMPDIR ?= /tmp
|
byte : lib-pprz.cma xlib-pprz.cma myGtkInit.cmo xml_get.out META.pprz
|
||||||
|
native : lib-pprz.cmxa xlib-pprz.cmxa META.pprz
|
||||||
$(XCMO) $(XCMX) myGtkInit.cmo : INCLUDES=$(XINCLUDES)
|
|
||||||
|
|
||||||
all : lib-pprz.cma xlib-pprz.cma myGtkInit.cmo xml_get.out opt
|
|
||||||
opt : lib-pprz.cmxa xlib-pprz.cmxa
|
|
||||||
|
|
||||||
|
|
||||||
lib-pprz.cma liblib-pprz.a: $(CMO)
|
lib-pprz.cma liblib-pprz.a: $(CMO)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)ocamlmklib $(INCLUDES) -o lib-pprz $^
|
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(INCLUDES) -o lib-pprz $^
|
||||||
|
|
||||||
lib-pprz.cmxa dlllib-pprz.so: $(CMX)
|
lib-pprz.cmxa dlllib-pprz.so: $(CMX)
|
||||||
@echo OOL $@
|
@echo OOL $@
|
||||||
$(Q)ocamlmklib $(INCLUDES) -o lib-pprz $^
|
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(INCLUDES) -o lib-pprz $^
|
||||||
|
|
||||||
xlib-pprz.cma libxlib-pprz.a: $(XCMO)
|
xlib-pprz.cma libxlib-pprz.a: $(XCMO)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)ocamlmklib $(XINCLUDES) -o xlib-pprz $^
|
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o xlib-pprz $^
|
||||||
|
|
||||||
xlib-pprz.cmxa dllxlib-pprz.so: $(XCMX)
|
xlib-pprz.cmxa dllxlib-pprz.so: $(XCMX)
|
||||||
@echo OOL $@
|
@echo OOL $@
|
||||||
$(Q)ocamlmklib $(XINCLUDES) -o xlib-pprz $^
|
$(Q)$(OCAMLMKLIB) $(VERBOSITY) $(XINCLUDES) -o xlib-pprz $^
|
||||||
|
|
||||||
# trying to set correct dependencies for parallel build
|
# trying to set correct dependencies for parallel build
|
||||||
# these are order only depedencies
|
# these are order only depedencies
|
||||||
@@ -82,50 +97,46 @@ lib-pprz.cmxa: | liblib-pprz.a dlllib-pprz.so
|
|||||||
|
|
||||||
xlib-pprz.cmxa: | libxlib-pprz.a dllxlib-pprz.so
|
xlib-pprz.cmxa: | libxlib-pprz.a dllxlib-pprz.so
|
||||||
|
|
||||||
xml_get.out : lib-pprz.cma xml_get.cmo | opt
|
xml_get.out : lib-pprz.cma xml_get.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -o $@ str.cma xml-light.cma -I . $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ -package str,xml-light -linkpkg -I . $^
|
||||||
|
|
||||||
tests : lib-pprz.cma $(TESTS_CMO)
|
tests : lib-pprz.cma $(TESTS_CMO)
|
||||||
$(OCAMLC) $(INCLUDES) -custom -I . -o $@ str.cma unix.cma ivy-ocaml.cma xml-light.cma $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ -package unix,str,xml-light,ivy -linkpkg -I . -dllpath . $^
|
||||||
|
|
||||||
GTKCFLAGS := `pkg-config --cflags gtk+-2.0`
|
%.o : %.c
|
||||||
#GTKCFLAGS := -I/usr/lib/gtk-2.0/include -I/usr/include/gtk-2.0 -I/usr/include/atk-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo
|
|
||||||
# GTKCFLAGS := $(shell gtk-config --cflags)
|
|
||||||
|
|
||||||
%.o : %.c
|
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(FPIC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(FPIC) $(INCLUDES) -package $(PKGCOMMON) -c $<
|
||||||
|
|
||||||
|
$(XCMO) $(XCMX) myGtkInit.cmo : PKGCOMMON=$(XPKGCOMMON)
|
||||||
|
|
||||||
|
|
||||||
|
GTKCFLAGS := $(shell pkg-config --cflags gtk+-2.0)
|
||||||
ml_gtk_drag.o : ml_gtk_drag.c
|
ml_gtk_drag.o : ml_gtk_drag.c
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c -ccopt "$(GTKCFLAGS)" $<
|
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c -ccopt "$(GTKCFLAGS)" $<
|
||||||
|
|
||||||
ml_gtkgl_hack.o : ml_gtkgl_hack.c
|
ml_gtkgl_hack.o : ml_gtkgl_hack.c
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c -ccopt "$(GTKCFLAGS)" $<
|
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c -ccopt "$(GTKCFLAGS)" $<
|
||||||
|
|
||||||
camltm.o : register_example.cmo
|
camltm.o : register_example.cmo
|
||||||
$(OCAMLC) $(INCLUDES) -output-obj -o $@ unix.cma str.cma xml-light.cma ivy-ocaml.cma debug.cmo serial.cmo extXml.cmo env.cmo pprz.cmo tm.cmo
|
$(OCAMLC) $(INCLUDES) -output-obj -o $@ -package unix,str,xml-light,ivy debug.cmo serial.cmo extXml.cmo env.cmo pprz.cmo tm.cmo
|
||||||
|
|
||||||
caml_from_c_example : cserial.o convert.o caml_from_c_example.o camltm.o
|
caml_from_c_example : cserial.o convert.o caml_from_c_example.o camltm.o
|
||||||
$(CC) -o $@ $^ -L$(OCAMLLIBDIR) -lunix -lstr -livy-ocaml -lcamlrun -lm -livy -lcurses
|
$(CC) -o $@ $^ -L$(OCAMLLIBDIR) -lunix -lstr -livy-ocaml -lcamlrun -lm -livy -lcurses
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -package $(PKGCOMMON) -c $<
|
||||||
|
|
||||||
%.cmx : %.ml
|
%.cmx : %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(INCLUDES) -package $(PKGCOMMON) -c $<
|
||||||
|
|
||||||
%.cmi : %.mli
|
%.cmi : %.mli
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(XINCLUDES) $(INCLUDES) $<
|
$(Q)$(OCAMLC) $(XINCLUDES) $(INCLUDES) -package $(PKGCOMMON),$(XPKGCOMMON) $<
|
||||||
|
|
||||||
%.cmi : %.ml
|
|
||||||
@echo OC $<
|
|
||||||
$(Q)$(OCAMLC) $(XINCLUDES) -c $<
|
|
||||||
|
|
||||||
%.ml : %.mll
|
%.ml : %.mll
|
||||||
@echo OCL $<
|
@echo OCL $<
|
||||||
@@ -135,6 +146,8 @@ caml_from_c_example : cserial.o convert.o caml_from_c_example.o camltm.o
|
|||||||
@echo OCY $<
|
@echo OCY $<
|
||||||
$(Q)$(OCAMLYACC) $<
|
$(Q)$(OCAMLYACC) $<
|
||||||
|
|
||||||
|
# dependencies not covered by ocamldep
|
||||||
|
# since these files are generated
|
||||||
expr_parser.cmo expr_parser.cmx : expr_parser.cmi expr_syntax.cmi
|
expr_parser.cmo expr_parser.cmx : expr_parser.cmi expr_syntax.cmi
|
||||||
expr_parser.cmi : expr_parser.ml expr_syntax.cmi
|
expr_parser.cmi : expr_parser.ml expr_syntax.cmi
|
||||||
expr_lexer.ml : expr_parser.ml
|
expr_lexer.ml : expr_parser.ml
|
||||||
@@ -142,31 +155,42 @@ expr_lexer.cmi : expr_lexer.ml expr_syntax.cmi
|
|||||||
expr_lexer.cmo : expr_lexer.cmi
|
expr_lexer.cmo : expr_lexer.cmi
|
||||||
expr_syntax.cmo : expr_syntax.cmi
|
expr_syntax.cmo : expr_syntax.cmi
|
||||||
|
|
||||||
|
|
||||||
gtk_papget_editor.ml : widgets.glade
|
gtk_papget_editor.ml : widgets.glade
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$@_$<
|
@echo GLADE $@
|
||||||
lablgladecc2 -root papget_editor -hide-default $(TMPDIR)/$@_$< | grep -B 1000000 " end" > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
@rm $(TMPDIR)/$@_$<
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)lablgladecc2 -root papget_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
gtk_papget_text_editor.ml : widgets.glade
|
gtk_papget_text_editor.ml : widgets.glade
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$@_$<
|
@echo GLADE $@
|
||||||
lablgladecc2 -root table_text_editor -hide-default $(TMPDIR)/$@_$< | grep -B 1000000 " end" > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
@rm $(TMPDIR)/$@_$<
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)lablgladecc2 -root table_text_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
gtk_papget_gauge_editor.ml : widgets.glade
|
gtk_papget_gauge_editor.ml : widgets.glade
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$@_$<
|
@echo GLADE $@
|
||||||
lablgladecc2 -root table_gauge_editor -hide-default $(TMPDIR)/$@_$< | grep -B 1000000 " end" > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
@rm $(TMPDIR)/$@_$<
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)lablgladecc2 -root table_gauge_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
gtk_papget_led_editor.ml : widgets.glade
|
gtk_papget_led_editor.ml : widgets.glade
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$@_$<
|
@echo GLADE $@
|
||||||
lablgladecc2 -root table_led_editor -hide-default $(TMPDIR)/$@_$< | grep -B 1000000 " end" > $@
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
@rm $(TMPDIR)/$@_$<
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)$(Q)lablgladecc2 -root table_led_editor -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
|
META.pprz : $(METAFILE)
|
||||||
|
@echo COPY $<
|
||||||
|
$(shell cp $< META.pprz)
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so caml_from_c_example tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli
|
$(Q)rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so caml_from_c_example tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli META.pprz
|
||||||
|
|
||||||
.PHONY: all opt clean
|
.PHONY: all byte native clean
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
+39
-36
@@ -23,52 +23,42 @@
|
|||||||
# Quiet compilation
|
# Quiet compilation
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
include ../Makefile.ocaml
|
||||||
OCAMLDEP = ocamldep
|
INCLUDES=
|
||||||
OCAMLOPT = ocamlopt
|
PKG = -package glibivy,pprz
|
||||||
LIBPPRZDIR = ../lib/ocaml
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I $(LIBPPRZDIR)
|
XPKG = -package pprz.xlib
|
||||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
XLINKPKG = $(XPKG) -linkpkg -dllpath-pkg pprz.xlib
|
||||||
LIBPPRZCMXA=$(LIBPPRZCMA:.cma=.cmxa)
|
|
||||||
XLIBPPRZCMA=$(LIBPPRZDIR)/xlib-pprz.cma
|
|
||||||
XLIBPPRZCMXA=$(XLIBPPRZCMA:.cma=.cmxa)
|
|
||||||
|
|
||||||
# default directory for temporary files
|
|
||||||
TMPDIR ?= /tmp
|
|
||||||
|
|
||||||
all: play plotter plot sd2log plotprofile openlog2tlm
|
all: play plotter plot sd2log plotprofile openlog2tlm
|
||||||
|
|
||||||
play : log_file.cmo play_core.cmo play.cmo
|
play : log_file.cmo play_core.cmo play.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma $(shell ocamlfind query -r -i-format lablgtk2) -I ../lib/ocaml lablgtk.cma lib-pprz.cma gtkInit.cmo $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $^
|
||||||
|
|
||||||
play-nox : play_core.cmo play-nox.cmo
|
play-nox : play_core.cmo play-nox.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma $(shell ocamlfind query -r -i-format lablgtk2) -I ../lib/ocaml lablgtk.cma lib-pprz.cma $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $^
|
||||||
|
|
||||||
plotter : plotter.cmo
|
plotter : plotter.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lablgtk.cma lib-pprz.cma xlib-pprz.cma gtkInit.cmo $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(XLINKPKG) gtkInit.cmo $^
|
||||||
|
|
||||||
plot : log_file.cmx gtk_export.cmx export.cmx plot.cmx
|
plot : log_file.cmo gtk_export.cmo export.cmo plot.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -o $@ unix.cmxa str.cmxa xml-light.cmxa glibivy-ocaml.cmxa lablgtk.cmxa lib-pprz.cmxa xlib-pprz.cmxa lablglade.cmxa gtkInit.cmx $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(XLINKPKG) gtkInit.cmo $^
|
||||||
|
|
||||||
sd2log : sd2log.cmo
|
sd2log : sd2log.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) $^
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS=-g -O2 -Wall
|
CFLAGS=-g -O2 -Wall
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
openlog2tlm: openlog2tlm.c
|
openlog2tlm: openlog2tlm.c
|
||||||
$(CC) $(CFLAGS) -g -o $@ $^
|
@echo CC $@
|
||||||
|
$(Q)$(CC) $(CFLAGS) -g -o $@ $^
|
||||||
# depedency on lib-pprz
|
|
||||||
play play-nox sd2log : $(LIBPPRZCMA)
|
|
||||||
plotter : $(LIBPPRZCMA) $(XLIBPPRZCMA)
|
|
||||||
plot : $(LIBPPRZCMXA) $(XLIBPPRZCMXA)
|
|
||||||
|
|
||||||
# Target for bytecode executable (if ocamlopt is not available)
|
# Target for bytecode executable (if ocamlopt is not available)
|
||||||
# plot : log_file.cmo gtk_export.cmo export.cmo plot.cmo
|
# plot : log_file.cmo gtk_export.cmo export.cmo plot.cmo
|
||||||
@@ -77,21 +67,30 @@ plot : $(LIBPPRZCMXA) $(XLIBPPRZCMXA)
|
|||||||
|
|
||||||
%.cmo: %.ml
|
%.cmo: %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $(PKG) $<
|
||||||
%.cmi: %.mli
|
%.cmi: %.mli
|
||||||
@echo OCI $<
|
@echo OCI $<
|
||||||
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(OCAMLCFLAGS) $(INCLUDES) -c $(PKG) $<
|
||||||
%.cmx: %.ml
|
%.cmx: %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(OCAMLCFLAGS) $(INCLUDES) -c $(PKG) $<
|
||||||
|
|
||||||
export.cmo : gtk_export.cmo
|
export.cmo : gtk_export.cmo
|
||||||
export.cmx : gtk_export.cmx
|
export.cmx : gtk_export.cmx
|
||||||
|
|
||||||
gtk_export.ml : export.glade
|
UNAME = $(shell uname -s)
|
||||||
grep -v invisible_char $< > $(TMPDIR)/$<
|
ifeq ("$(UNAME)","Darwin")
|
||||||
lablgladecc2 -root export -hide-default $(TMPDIR)/$< | grep -B 1000000 " end" > $@
|
MKTEMP = gmktemp
|
||||||
|
else
|
||||||
|
MKTEMP = mktemp
|
||||||
|
endif
|
||||||
|
|
||||||
|
gtk_export.ml : export.glade
|
||||||
|
@echo GLADE $@
|
||||||
|
$(eval $@_TMP := $(shell $(MKTEMP)))
|
||||||
|
$(Q)grep -v invisible_char $< > $($@_TMP)
|
||||||
|
$(Q)lablgladecc2 -root export -hide-default $($@_TMP) | grep -B 1000000 " end" > $@
|
||||||
|
$(Q)rm -f $($@_TMP)
|
||||||
|
|
||||||
|
|
||||||
pt : ahrsview imuview ahrs2fg
|
pt : ahrsview imuview ahrs2fg
|
||||||
@@ -128,16 +127,20 @@ MORE_FLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/incl
|
|||||||
MORE_CFLAGS = -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -I. -I. -I.. -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
|
MORE_CFLAGS = -DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -I. -I. -I.. -g -O2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include
|
||||||
|
|
||||||
disp3d: disp3d.c
|
disp3d: disp3d.c
|
||||||
$(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS)
|
@echo CC $@
|
||||||
|
$(Q)$(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS)
|
||||||
|
|
||||||
plotprofile: plotprofile.c
|
plotprofile: plotprofile.c
|
||||||
$(CC) $(IVY_C_LIBRARYS) $(IVY_C_INCLUDES) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy
|
@echo CC $@
|
||||||
|
$(Q)$(CC) $(IVY_C_LIBRARYS) $(IVY_C_INCLUDES) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy
|
||||||
|
|
||||||
test1: test1.c
|
test1: test1.c
|
||||||
$(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS) -lglut
|
@echo CC $@
|
||||||
|
$(Q)$(CC) $(MORE_CFLAGS) -g -o $@ $^ $(MORE_FLAGS) -lglut
|
||||||
|
|
||||||
test3: test3.c sliding_plot.c
|
test3: test3.c sliding_plot.c
|
||||||
$(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
|
@echo CC $@
|
||||||
|
$(Q)$(CC) $(CFLAGS) -g -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
#FGFS_PREFIX=/home/poine/local
|
#FGFS_PREFIX=/home/poine/local
|
||||||
@@ -188,7 +191,7 @@ ctrlstick: ctrlstick.c
|
|||||||
$(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy
|
$(CC) -g -O2 -Wall `pkg-config glib-2.0 --cflags` -o $@ $^ `pkg-config glib-2.0 --libs` -lglibivy
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* play ahrsview imuview ahrs2fg plot plotter gtk_export.ml openlog2tlm disp3d plotprofile test1 test3 test_samere ivy_example tmclient ffjoystick ctrlstick sd2log motor_bench
|
$(Q)rm -f *.opt *.out *~ core *.o *.bak .depend *.cm* play ahrsview imuview ahrs2fg plot plotter gtk_export.ml openlog2tlm disp3d plotprofile test1 test3 test_samere ivy_example tmclient ffjoystick ctrlstick sd2log motor_bench
|
||||||
|
|
||||||
.PHONY: all clean pt run_fg
|
.PHONY: all clean pt run_fg
|
||||||
|
|
||||||
@@ -197,7 +200,7 @@ clean:
|
|||||||
#
|
#
|
||||||
|
|
||||||
.depend: Makefile
|
.depend: Makefile
|
||||||
ocamldep -I $(LIBPPRZDIR) *.ml* > .depend
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~
|
$(Q)rm -f *~
|
||||||
|
|||||||
+31
-26
@@ -24,12 +24,18 @@ Q=@
|
|||||||
|
|
||||||
LBITS := $(shell getconf LONG_BIT)
|
LBITS := $(shell getconf LONG_BIT)
|
||||||
ifeq ($(LBITS),64)
|
ifeq ($(LBITS),64)
|
||||||
FPIC = -ccopt -fPIC
|
FPIC = -fPIC
|
||||||
else
|
else
|
||||||
FPIC =
|
FPIC =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
include ../../conf/Makefile.local
|
include ../../conf/Makefile.local
|
||||||
|
include ../Makefile.ocaml
|
||||||
|
|
||||||
|
OCAMLC += -g
|
||||||
|
INCLUDES =
|
||||||
|
PKG = -package glibivy,pprz
|
||||||
|
LINKPKG = $(PKG) -linkpkg -dllpath-pkg pprz
|
||||||
|
|
||||||
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
SIMML = stdlib.ml data.ml flightModel.ml gps.ml
|
||||||
SIMHML = $(SIMML) hitl.ml sim.ml
|
SIMHML = $(SIMML) hitl.ml sim.ml
|
||||||
@@ -38,63 +44,62 @@ SIMSML = $(SIMML) sitl.ml sim.ml
|
|||||||
SIMSCMO=$(SIMSML:%.ml=%.cmo)
|
SIMSCMO=$(SIMSML:%.ml=%.cmo)
|
||||||
SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
||||||
|
|
||||||
|
|
||||||
OCAMLC = ocamlc -g
|
|
||||||
OCAMLOPT = ocamlopt
|
|
||||||
OCAMLDEP = ocamldep
|
|
||||||
OCAML=$(shell which ocaml)
|
|
||||||
OCAMLRUN=$(shell which ocamlrun)
|
|
||||||
LIBPPRZDIR=../lib/ocaml
|
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format xml-light)
|
|
||||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
|
||||||
|
|
||||||
AIRBORNE = ../airborne
|
AIRBORNE = ../airborne
|
||||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||||
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||||
|
|
||||||
|
UNAME = $(shell uname -s)
|
||||||
|
ifeq ("$(UNAME)","Darwin")
|
||||||
|
CAML_CFLAGS = -I/opt/local/lib/ocaml
|
||||||
|
else
|
||||||
|
CAML_CFLAGS =
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
all : gaia sitl.cma simhitl
|
all : gaia sitl.cma simhitl
|
||||||
|
|
||||||
simhitl : fg.o $(SIMHCMO) simhitl.cmo
|
fg.so : fg.o
|
||||||
|
@echo BUILD $@
|
||||||
|
$(Q)$(CC) -shared -o $@ $^
|
||||||
|
|
||||||
|
simhitl : fg.so $(SIMHCMO) simhitl.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ str.cma xml-light.cma unix.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
|
||||||
|
|
||||||
sitl.cma : fg.o $(SIMSCMO)
|
sitl.cma : fg.o $(SIMSCMO)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)ocamlmklib -o sitl $^
|
$(Q)$(OCAMLMKLIB) -o sitl $^
|
||||||
|
|
||||||
sitl.cmxa : $(SIMSCMX)
|
sitl.cmxa : $(SIMSCMX)
|
||||||
ocamlopt -o $@ -a $^
|
@echo OC $@
|
||||||
|
$(Q)$(OCAMLOPT) -o $@ -a $^
|
||||||
|
|
||||||
gaia : gaia.cmo
|
gaia : gaia.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $<
|
||||||
|
|
||||||
diffusion : stdlib.cmo diffusion.cmo
|
diffusion : stdlib.cmo diffusion.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $^
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ $(LINKPKG) gtkInit.cmo $^
|
||||||
|
|
||||||
%.cmo : %.ml
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $(PKG) $<
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
@echo OC $<
|
@echo CC $<
|
||||||
$(Q)$(OCAMLC) $(FPIC) -c $<
|
$(Q)$(CC) $(FPIC) -c $< $(CAML_CFLAGS)
|
||||||
|
|
||||||
%.cmx : %.ml
|
%.cmx : %.ml
|
||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(INCLUDES) -c $(PKG) $<
|
||||||
|
|
||||||
%.cmi : %.mli
|
%.cmi : %.mli
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $(PKG) $<
|
||||||
|
|
||||||
# dependency on lib-pprz
|
|
||||||
simhitl diffusion gaia: $(LIBPPRZCMA)
|
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia simhitl diffusion
|
$(Q)rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia simhitl diffusion
|
||||||
|
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#
|
#
|
||||||
#JSBSIM = /usr/local
|
#JSBSIM = /usr/local
|
||||||
|
|
||||||
|
Q=@
|
||||||
|
|
||||||
#CC = g++
|
#CC = g++
|
||||||
#CFLAGS = -Wall -I$(JSBSIM)/include/JSBSim -I../include
|
#CFLAGS = -Wall -I$(JSBSIM)/include/JSBSim -I../include
|
||||||
#LDFLAGS = -L$(JSBSIM)/lib -lJSBSim
|
#LDFLAGS = -L$(JSBSIM)/lib -lJSBSim
|
||||||
@@ -70,4 +72,5 @@ test_sensors : $(TEST_SENSORS_SRCS)
|
|||||||
gcc $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
gcc $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
$(Q)rm -f *.o
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,7 @@
|
|||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -7,4 +10,4 @@ out.mpg:
|
|||||||
ffmpeg -f image2 -i images/frame_%04d.ppm out.mpg
|
ffmpeg -f image2 -i images/frame_%04d.ppm out.mpg
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ \#*\#
|
$(Q)rm -f *~ \#*\#
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
GLIB_CFLAGS = -Wall `pkg-config glib-2.0 --cflags`
|
GLIB_CFLAGS = -Wall `pkg-config glib-2.0 --cflags`
|
||||||
GLIB_LDFLAGS = `pkg-config glib-2.0 --libs` -lglibivy -lpcre
|
GLIB_LDFLAGS = `pkg-config glib-2.0 --libs` -lglibivy -lpcre
|
||||||
@@ -6,5 +9,5 @@ ttx2scilab: ttx2scilab.c
|
|||||||
$(CC) -Wall $(GLIB_CFLAGS) -o $@ $< $(GLIB_LDFLAGS)
|
$(CC) -Wall $(GLIB_CFLAGS) -o $@ $< $(GLIB_LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ttx2scilab
|
$(Q)rm -f ttx2scilab
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,5 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ foo*.png test.avi q3d.pov
|
$(Q)rm -f *~ foo*.png test.avi q3d.pov
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
# Quiet compilation
|
||||||
|
Q=@
|
||||||
|
|
||||||
test:
|
test:
|
||||||
povray test.pov +Oimg001.png Display=false +W800 +H600 +Q9 +A0.3 +R5
|
povray test.pov +Oimg001.png Display=false +W800 +H600 +Q9 +A0.3 +R5
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ img*.png test.avi q3d.pov
|
$(Q)rm -f *~ img*.png test.avi q3d.pov
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user