mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 12:57:27 +08:00
[build system] clean up makefiles and fix dependencies, parallel build with make -j 8 seems to work now
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# Paparazzi main $Id$
|
|
||||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -38,18 +37,49 @@ ifeq ($(PAPARAZZI_HOME),)
|
|||||||
PAPARAZZI_HOME=$(PAPARAZZI_SRC)
|
PAPARAZZI_HOME=$(PAPARAZZI_SRC)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# export the PAPARAZZI environment to sub-make
|
||||||
|
export PAPARAZZI_SRC
|
||||||
|
export PAPARAZZI_HOME
|
||||||
|
|
||||||
|
OCAML=$(shell which ocaml)
|
||||||
|
OCAMLRUN=$(shell which ocamlrun)
|
||||||
|
BUILD_DATETIME:=$(shell date +%Y%m%d-%H%M%S)
|
||||||
|
|
||||||
|
#
|
||||||
|
# define some paths
|
||||||
|
#
|
||||||
LIB=sw/lib
|
LIB=sw/lib
|
||||||
|
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
|
||||||
|
CONF=$(PAPARAZZI_SRC)/conf
|
||||||
AIRBORNE=sw/airborne
|
AIRBORNE=sw/airborne
|
||||||
|
SIMULATOR=sw/simulator
|
||||||
|
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
|
||||||
MULTIMON=sw/ground_segment/multimon
|
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
||||||
|
EXT=sw/ext
|
||||||
|
|
||||||
|
#
|
||||||
|
# build some stuff in subdirs
|
||||||
|
# nothing should depend on these...
|
||||||
|
#
|
||||||
|
PPRZCENTER=sw/supervision
|
||||||
MISC=sw/ground_segment/misc
|
MISC=sw/ground_segment/misc
|
||||||
LOGALIZER=sw/logalizer
|
LOGALIZER=sw/logalizer
|
||||||
SIMULATOR=sw/simulator
|
|
||||||
EXT=sw/ext
|
SUBDIRS = $(PPRZCENTER) $(MISC) $(LOGALIZER)
|
||||||
MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME)
|
|
||||||
CONF=$(PAPARAZZI_SRC)/conf
|
#
|
||||||
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
|
# xml files used as input for header generation
|
||||||
|
#
|
||||||
|
MESSAGES_XML = $(CONF)/messages.xml
|
||||||
|
UBX_XML = $(CONF)/ubx.xml
|
||||||
|
MTK_XML = $(CONF)/mtk.xml
|
||||||
|
XSENS_XML = $(CONF)/xsens_MTi-G.xml
|
||||||
|
|
||||||
|
#
|
||||||
|
# generated header files
|
||||||
|
#
|
||||||
MESSAGES_H=$(STATICINCLUDE)/messages.h
|
MESSAGES_H=$(STATICINCLUDE)/messages.h
|
||||||
MESSAGES2_H=$(STATICINCLUDE)/messages2.h
|
MESSAGES2_H=$(STATICINCLUDE)/messages2.h
|
||||||
UBX_PROTOCOL_H=$(STATICINCLUDE)/ubx_protocol.h
|
UBX_PROTOCOL_H=$(STATICINCLUDE)/ubx_protocol.h
|
||||||
@@ -58,79 +88,72 @@ XSENS_PROTOCOL_H=$(STATICINCLUDE)/xsens_protocol.h
|
|||||||
DL_PROTOCOL_H=$(STATICINCLUDE)/dl_protocol.h
|
DL_PROTOCOL_H=$(STATICINCLUDE)/dl_protocol.h
|
||||||
DL_PROTOCOL2_H=$(STATICINCLUDE)/dl_protocol2.h
|
DL_PROTOCOL2_H=$(STATICINCLUDE)/dl_protocol2.h
|
||||||
ABI_MESSAGES_H=$(STATICINCLUDE)/abi_messages.h
|
ABI_MESSAGES_H=$(STATICINCLUDE)/abi_messages.h
|
||||||
MESSAGES_XML = $(CONF)/messages.xml
|
|
||||||
UBX_XML = $(CONF)/ubx.xml
|
GEN_HEADERS = $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(DL_PROTOCOL2_H) $(ABI_MESSAGES_H)
|
||||||
MTK_XML = $(CONF)/mtk.xml
|
|
||||||
XSENS_XML = $(CONF)/xsens_MTi-G.xml
|
|
||||||
TOOLS=$(PAPARAZZI_SRC)/sw/tools
|
|
||||||
OCAML=$(shell which ocaml)
|
|
||||||
OCAMLRUN=$(shell which ocamlrun)
|
|
||||||
BUILD_DATETIME:=$(shell date +%Y%m%d-%H%M%S)
|
|
||||||
|
|
||||||
|
|
||||||
all: print_build_version conf commands static
|
all: print_build_version update_google_version conf ext lib subdirs lpctools commands static
|
||||||
|
|
||||||
print_build_version:
|
print_build_version:
|
||||||
@echo "------------------------------------------------------------"
|
@echo "------------------------------------------------------------"
|
||||||
@echo "Building Paparazzi version" $(shell ./paparazzi_version)
|
@echo "Building Paparazzi version" $(shell ./paparazzi_version)
|
||||||
@echo "------------------------------------------------------------"
|
@echo "------------------------------------------------------------"
|
||||||
|
|
||||||
static: lib center tools cockpit multimon tmtc misc logalizer lpc21iap sim_static static_h usb_lib ext
|
update_google_version:
|
||||||
|
-$(MAKE) -C data/maps
|
||||||
|
|
||||||
conf: conf/conf.xml conf/control_panel.xml conf/maps.xml FORCE
|
conf: conf/conf.xml conf/control_panel.xml conf/maps.xml
|
||||||
|
|
||||||
conf/%.xml :conf/%.xml.example
|
conf/%.xml :conf/%.xml.example
|
||||||
[ -L $@ ] || [ -f $@ ] || cp $< $@
|
[ -L $@ ] || [ -f $@ ] || cp $< $@
|
||||||
|
|
||||||
conf/maps.xml: conf/maps.xml.example FORCE
|
|
||||||
-cd data/maps; $(MAKE)
|
|
||||||
$(Q)if test ! -e $@; then cp $< $@; fi
|
|
||||||
|
|
||||||
FORCE:
|
static: cockpit tmtc tools sim_static static_h
|
||||||
|
|
||||||
lib:
|
lib:
|
||||||
cd $(LIB)/ocaml; $(MAKE)
|
$(MAKE) -C $(LIB)/ocaml
|
||||||
|
|
||||||
center: lib
|
|
||||||
cd sw/supervision; $(MAKE)
|
|
||||||
|
|
||||||
tools: lib
|
|
||||||
cd $(TOOLS); $(MAKE)
|
|
||||||
|
|
||||||
logalizer: lib
|
|
||||||
cd $(LOGALIZER); $(MAKE)
|
|
||||||
|
|
||||||
sim_static : lib
|
|
||||||
cd $(SIMULATOR); $(MAKE) PAPARAZZI_SRC=$(PAPARAZZI_SRC)
|
|
||||||
|
|
||||||
cockpit: lib
|
|
||||||
cd $(COCKPIT); $(MAKE) all
|
|
||||||
|
|
||||||
tmtc: lib cockpit
|
|
||||||
cd $(TMTC); $(MAKE) all
|
|
||||||
|
|
||||||
misc:
|
|
||||||
cd $(MISC); $(MAKE) all
|
|
||||||
|
|
||||||
multimon:
|
multimon:
|
||||||
cd $(MULTIMON); $(MAKE)
|
$(MAKE) -C $(MULTIMON)
|
||||||
|
|
||||||
static_h: $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(DL_PROTOCOL2_H) $(ABI_MESSAGES_H)
|
cockpit: lib
|
||||||
|
$(MAKE) -C $(COCKPIT)
|
||||||
|
|
||||||
usb_lib:
|
tmtc: lib cockpit multimon
|
||||||
@[ -d sw/airborne/arch/lpc21/lpcusb ] && (cd sw/airborne/arch/lpc21/lpcusb; $(MAKE)) || echo "Not building usb_lib: sw/airborne/arch/lpc21/lpcusb directory missing"
|
$(MAKE) -C $(TMTC)
|
||||||
|
|
||||||
|
tools: lib
|
||||||
|
$(MAKE) -C $(TOOLS)
|
||||||
|
|
||||||
|
sim_static: lib
|
||||||
|
$(MAKE) -C $(SIMULATOR)
|
||||||
|
|
||||||
ext:
|
ext:
|
||||||
$(MAKE) -C$(EXT) all
|
$(MAKE) -C $(EXT)
|
||||||
|
|
||||||
$(MESSAGES_H) : $(MESSAGES_XML) $(CONF_XML) tools
|
#
|
||||||
|
# make misc subdirs
|
||||||
|
#
|
||||||
|
subdirs: $(SUBDIRS)
|
||||||
|
|
||||||
|
$(SUBDIRS):
|
||||||
|
$(MAKE) -C $@
|
||||||
|
|
||||||
|
$(PPRZCENTER): lib
|
||||||
|
|
||||||
|
$(LOGALIZER): lib
|
||||||
|
|
||||||
|
|
||||||
|
static_h: $(GEN_HEADERS)
|
||||||
|
|
||||||
|
$(MESSAGES_H) : $(MESSAGES_XML) tools
|
||||||
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
||||||
@echo BUILD $@
|
@echo BUILD $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< telemetry > /tmp/msg.h
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< telemetry > /tmp/msg.h
|
||||||
$(Q)mv /tmp/msg.h $@
|
$(Q)mv /tmp/msg.h $@
|
||||||
$(Q)chmod a+r $@
|
$(Q)chmod a+r $@
|
||||||
|
|
||||||
$(MESSAGES2_H) : $(MESSAGES_XML) $(CONF_XML) tools
|
$(MESSAGES2_H) : $(MESSAGES_XML) tools
|
||||||
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
||||||
@echo BUILD $@
|
@echo BUILD $@
|
||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< telemetry > /tmp/msg2.h
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages2.out $< telemetry > /tmp/msg2.h
|
||||||
@@ -167,48 +190,31 @@ $(ABI_MESSAGES_H) : $(MESSAGES_XML) tools
|
|||||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_abi.out $< airborne > /tmp/abi.h
|
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_abi.out $< airborne > /tmp/abi.h
|
||||||
$(Q)mv /tmp/abi.h $@
|
$(Q)mv /tmp/abi.h $@
|
||||||
|
|
||||||
|
|
||||||
include Makefile.ac
|
include Makefile.ac
|
||||||
|
|
||||||
sim : sim_static
|
ac_h ac fbw ap: static conf tools ext
|
||||||
|
|
||||||
|
sim: sim_static
|
||||||
|
|
||||||
|
|
||||||
ac_h ac1 ac2 ac3 ac fbw ap: static conf
|
|
||||||
|
|
||||||
##### preliminary hard wired arm7 bootloader rules
|
|
||||||
#
|
#
|
||||||
|
# Commands
|
||||||
#
|
#
|
||||||
# call with : make bl PROC=[TINY|FBW|AP|GENERIC]
|
|
||||||
bl:
|
|
||||||
cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)
|
|
||||||
|
|
||||||
BOOTLOADER_DEV=/dev/ttyUSB0
|
# stuff to build and upload the lpc bootloader ...
|
||||||
upload_bl bl.upload: bl
|
include Makefile.lpctools
|
||||||
lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000
|
lpctools: lpc21iap usb_lib
|
||||||
|
|
||||||
JTAG_INTERFACE = olimex-jtag-tiny.cfg
|
commands: paparazzi sw/simulator/launchsitl
|
||||||
#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
|
|
||||||
|
|
||||||
upload_jtag: bl
|
paparazzi:
|
||||||
openocd -f interface/$(JTAG_INTERFACE) -f board/olimex_lpc_h2148.cfg -c init -c halt -c "flash write_image erase $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex" -c reset -c shutdown
|
cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||||
|
chmod a+x $@
|
||||||
|
|
||||||
|
sw/simulator/launchsitl:
|
||||||
|
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||||
lpc21iap:
|
chmod a+x $@
|
||||||
cd sw/ground_segment/lpc21iap; $(MAKE)
|
|
||||||
|
|
||||||
upgrade_bl bl.upgrade: bl lpc21iap
|
|
||||||
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
|
|
||||||
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
|
|
||||||
|
|
||||||
ms:
|
|
||||||
cd $(AIRBORNE)/arch/lpc21/lpcusb; $(MAKE)
|
|
||||||
cd $(AIRBORNE)/arch/lpc21/lpcusb/examples; $(MAKE)
|
|
||||||
|
|
||||||
upload_ms ms.upload: ms
|
|
||||||
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
|
|
||||||
|
|
||||||
#####
|
|
||||||
#####
|
|
||||||
|
|
||||||
run_sitl :
|
run_sitl :
|
||||||
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl
|
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl
|
||||||
@@ -219,21 +225,16 @@ install :
|
|||||||
uninstall :
|
uninstall :
|
||||||
$(MAKE) -f Makefile.install PREFIX=$(PREFIX) uninstall
|
$(MAKE) -f Makefile.install PREFIX=$(PREFIX) uninstall
|
||||||
|
|
||||||
DISTRO=lenny
|
|
||||||
deb :
|
|
||||||
chmod u+x debian/rules
|
|
||||||
cp debian/control.$(DISTRO) debian/control
|
|
||||||
cp debian/changelog.$(DISTRO) debian/changelog
|
|
||||||
dpkg-buildpackage $(DEBFLAGS) -Ivar -rfakeroot
|
|
||||||
|
|
||||||
fast_deb:
|
#
|
||||||
$(MAKE) deb OCAMLC=ocamlc.opt DEBFLAGS=-b
|
# Cleaning
|
||||||
|
#
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(Q)rm -fr dox build-stamp configure-stamp conf/%gconf.xml debian/files debian/paparazzi-base debian/paparazzi-bin
|
$(Q)rm -fr dox build-stamp configure-stamp conf/%gconf.xml debian/files debian/paparazzi-base debian/paparazzi-bin
|
||||||
$(Q)rm -f $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(DL_PROTOCOL_H)
|
$(Q)rm -f $(GEN_HEADERS)
|
||||||
$(Q)find . -mindepth 2 -name Makefile -a ! -path "./sw/ext/*" -exec sh -c 'echo "Cleaning {}"; $(MAKE) -C `dirname {}` $@' \;
|
$(Q)find . -mindepth 2 -name Makefile -a ! -path "./sw/ext/*" -exec sh -c 'echo "Cleaning {}"; $(MAKE) -C `dirname {}` $@' \;
|
||||||
$(Q)make -C sw/ext clean
|
$(Q)$(MAKE) -C $(EXT) clean
|
||||||
$(Q)find . -name '*~' -exec rm -f {} \;
|
$(Q)find . -name '*~' -exec rm -f {} \;
|
||||||
$(Q)rm -f paparazzi sw/simulator/launchsitl
|
$(Q)rm -f paparazzi sw/simulator/launchsitl
|
||||||
|
|
||||||
@@ -256,6 +257,11 @@ dist_clean_irreversible: clean
|
|||||||
ab_clean:
|
ab_clean:
|
||||||
find sw/airborne -name '*~' -exec rm -f {} \;
|
find sw/airborne -name '*~' -exec rm -f {} \;
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Tests
|
||||||
|
#
|
||||||
|
|
||||||
replace_current_conf_xml:
|
replace_current_conf_xml:
|
||||||
test conf/conf.xml && mv conf/conf.xml conf/conf.xml.backup.$(BUILD_DATETIME)
|
test conf/conf.xml && mv conf/conf.xml conf/conf.xml.backup.$(BUILD_DATETIME)
|
||||||
cp conf/tests_conf.xml conf/conf.xml
|
cp conf/tests_conf.xml conf/conf.xml
|
||||||
@@ -263,19 +269,15 @@ replace_current_conf_xml:
|
|||||||
restore_conf_xml:
|
restore_conf_xml:
|
||||||
test conf/conf.xml.backup.$(BUILD_DATETIME) && mv conf/conf.xml.backup.$(BUILD_DATETIME) conf/conf.xml
|
test conf/conf.xml.backup.$(BUILD_DATETIME) && mv conf/conf.xml.backup.$(BUILD_DATETIME) conf/conf.xml
|
||||||
|
|
||||||
commands: paparazzi sw/simulator/launchsitl
|
|
||||||
|
|
||||||
paparazzi:
|
|
||||||
cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
|
||||||
chmod a+x $@
|
|
||||||
|
|
||||||
sw/simulator/launchsitl:
|
|
||||||
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
|
||||||
chmod a+x $@
|
|
||||||
|
|
||||||
run_tests:
|
run_tests:
|
||||||
cd tests; $(MAKE) test
|
cd tests; $(MAKE) test
|
||||||
|
|
||||||
test: all replace_current_conf_xml run_tests restore_conf_xml
|
test: all replace_current_conf_xml run_tests restore_conf_xml
|
||||||
|
|
||||||
.PHONY: all print_build_version clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible run_sitl install uninstall test replace_current_conf_xml run_tests restore_conf_xml
|
|
||||||
|
.PHONY: all print_build_version update_google_version \
|
||||||
|
subdirs $(SUBDIRS) conf ext lib multimon cockpit tmtc tools\
|
||||||
|
static sim_static lpctools \
|
||||||
|
commands run_sitl install uninstall \
|
||||||
|
clean cleanspaces ab_clean dist_clean distclean dist_clean_irreversible \
|
||||||
|
test replace_current_conf_xml run_tests restore_conf_xml
|
||||||
|
|||||||
+2
-3
@@ -1,5 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
# Paparazzi main $Id$
|
#
|
||||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -47,7 +47,6 @@ SETTINGS_XML=$(ACINCLUDE)/settings.xml
|
|||||||
SETTINGS_MODULES=$(ACINCLUDE)/settings_modules.xml
|
SETTINGS_MODULES=$(ACINCLUDE)/settings_modules.xml
|
||||||
SETTINGS_TELEMETRY=$(ACINCLUDE)/settings_telemetry.xml
|
SETTINGS_TELEMETRY=$(ACINCLUDE)/settings_telemetry.xml
|
||||||
MAKEFILE_AC=$(ACINCLUDE)/Makefile.ac
|
MAKEFILE_AC=$(ACINCLUDE)/Makefile.ac
|
||||||
MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME)
|
|
||||||
MODULES_H=$(AC_GENERATED)/modules.h
|
MODULES_H=$(AC_GENERATED)/modules.h
|
||||||
AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5
|
AIRCRAFT_MD5=$(AIRCRAFT_CONF_DIR)/aircraft.md5
|
||||||
|
|
||||||
@@ -183,4 +182,4 @@ clean_ac :
|
|||||||
$(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type 'make AIRCRAFT=AircraftName ...'"; exit 1; fi
|
$(Q)if (expr "$(AIRCRAFT)"); then : ; else echo "AIRCRAFT undefined: type 'make AIRCRAFT=AircraftName ...'"; exit 1; fi
|
||||||
rm -fr $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
rm -fr $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||||
|
|
||||||
.PHONY: all clean_ac print_version
|
.PHONY: all init all_ac_h all_ac_hclean_ac print_version
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
|
usb_lib:
|
||||||
|
@[ -d sw/airborne/arch/lpc21/lpcusb ] && (cd sw/airborne/arch/lpc21/lpcusb; $(MAKE)) || echo "Not building usb_lib: sw/airborne/arch/lpc21/lpcusb directory missing"
|
||||||
|
|
||||||
|
bl:
|
||||||
|
cd $(AIRBORNE)/arch/lpc21/test/bootloader; $(MAKE) clean; $(MAKE)
|
||||||
|
|
||||||
|
BOOTLOADER_DEV=/dev/ttyUSB0
|
||||||
|
upload_bl bl.upload: bl
|
||||||
|
lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000
|
||||||
|
|
||||||
|
JTAG_INTERFACE = olimex-jtag-tiny.cfg
|
||||||
|
#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
|
||||||
|
|
||||||
|
upload_jtag: bl
|
||||||
|
openocd -f interface/$(JTAG_INTERFACE) -f board/olimex_lpc_h2148.cfg -c init -c halt -c "flash write_image erase $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex" -c reset -c shutdown
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
lpc21iap:
|
||||||
|
$(MAKE) -C sw/ground_segment/lpc21iap
|
||||||
|
|
||||||
|
upgrade_bl bl.upgrade: bl lpc21iap
|
||||||
|
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl_ram.elf
|
||||||
|
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/test/bootloader/bl.elf
|
||||||
|
|
||||||
|
ms:
|
||||||
|
$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb
|
||||||
|
$(MAKE) -C $(AIRBORNE)/arch/lpc21/lpcusb/examples
|
||||||
|
|
||||||
|
upload_ms ms.upload: ms
|
||||||
|
$(PAPARAZZI_SRC)/sw/ground_segment/lpc21iap/lpc21iap $(AIRBORNE)/arch/lpc21/lpcusb/examples/msc.elf
|
||||||
|
|
||||||
|
.PHONY: usb_lib bl upload_bl upload_jtag ms upload_ms lpc21iap upgrade_bl
|
||||||
+8
-9
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2009 Antoine Drouin
|
# Copyright (C) 2009 Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -18,8 +17,8 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with paparazzi; see the file COPYING. If not, write to
|
# along with paparazzi; see the file COPYING. If not, write to
|
||||||
# the Free Software Foundation, 59 Temple Place - Suite 330,
|
# the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||||
# Boston, MA 02111-1307, USA.
|
# Boston, MA 02111-1307, USA.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Define programs and commands.
|
# Define programs and commands.
|
||||||
CC = gcc
|
CC = gcc
|
||||||
@@ -45,9 +44,9 @@ CFLAGS += -mtune=geode # optimize for geode
|
|||||||
|
|
||||||
# flags only for C
|
# flags only for C
|
||||||
CFLAGS + = -Wstrict-prototypes -Wmissing-declarations
|
CFLAGS + = -Wstrict-prototypes -Wmissing-declarations
|
||||||
CFLAGS += -Wmissing-prototypes -Wnested-externs
|
CFLAGS += -Wmissing-prototypes -Wnested-externs
|
||||||
CFLAGS += $(CSTANDARD)
|
CFLAGS += $(CSTANDARD)
|
||||||
CFLAGS += $($(TARGET).CFLAGS) $(LOCAL_CFLAGS)
|
CFLAGS += $($(TARGET).CFLAGS) $(LOCAL_CFLAGS)
|
||||||
|
|
||||||
#Additional libraries.
|
#Additional libraries.
|
||||||
MATH_LIB = -lm
|
MATH_LIB = -lm
|
||||||
@@ -63,7 +62,7 @@ build: elf
|
|||||||
|
|
||||||
elf: $(OBJDIR)/$(TARGET).elf
|
elf: $(OBJDIR)/$(TARGET).elf
|
||||||
|
|
||||||
# Program the device.
|
# Program the device.
|
||||||
load upload program: $(OBJDIR)/$(TARGET).elf
|
load upload program: $(OBJDIR)/$(TARGET).elf
|
||||||
scp $(OBJDIR)/$(TARGET).elf $(USER)@$(HOST):$(TARGET_DIR)
|
scp $(OBJDIR)/$(TARGET).elf $(USER)@$(HOST):$(TARGET_DIR)
|
||||||
|
|
||||||
@@ -78,7 +77,7 @@ load upload program: $(OBJDIR)/$(TARGET).elf
|
|||||||
$(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac
|
$(OBJDIR)/%.o : %.c $(OBJDIR)/../Makefile.ac
|
||||||
@echo CC $@
|
@echo CC $@
|
||||||
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||||
$(Q)$(CC) -c $(CFLAGS) $< -o $@
|
$(Q)$(CC) -c $(CFLAGS) $< -o $@
|
||||||
|
|
||||||
# Listing of phony targets.
|
# Listing of phony targets.
|
||||||
.PHONY : all build elf clean clean_list
|
.PHONY : all build elf clean clean_list
|
||||||
@@ -92,8 +91,8 @@ $(OBJDIR)/.depend:
|
|||||||
@test -d $(OBJDIR) || mkdir -p $(OBJDIR)
|
@test -d $(OBJDIR) || mkdir -p $(OBJDIR)
|
||||||
$(Q)$(CC) -MM -MG $(CFLAGS) $($(TARGET).CFLAGS) $($(TARGET).srcs) | sed 's|\([^\.]*\.o\)|$(OBJDIR)/\1|' > $@
|
$(Q)$(CC) -MM -MG $(CFLAGS) $($(TARGET).CFLAGS) $($(TARGET).srcs) | sed 's|\([^\.]*\.o\)|$(OBJDIR)/\1|' > $@
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
ifneq ($(MAKECMDGOALS),erase)
|
ifneq ($(MAKECMDGOALS),erase)
|
||||||
-include $(OBJDIR)/.depend
|
-include $(OBJDIR)/.depend
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id: Makefile.sim 3505 2009-06-17 12:59:32Z hecto $
|
|
||||||
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
DESTDIR=/
|
DESTDIR=/
|
||||||
|
|
||||||
ifeq ($(PAPARAZZI_HOME),)
|
ifeq ($(PAPARAZZI_HOME),)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
|
|||||||
@@ -88,6 +88,7 @@ $(OBJDIR)/%.o: %.cpp $(OBJDIR)/../Makefile.ac
|
|||||||
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||||
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
.PHONY: all compile check_jsbsim
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2009-2010 The Paparazzi Team
|
# Copyright (C) 2009-2010 The Paparazzi Team
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2009 Antoine Drouin
|
# Copyright (C) 2009 Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -132,6 +131,7 @@ $(OBJDIR)/%.o: %.cpp $(OBJDIR)/../Makefile.ac
|
|||||||
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||||
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
|
.PHONY: all compile check_jsbsim
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
+2
-4
@@ -1,6 +1,5 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2009 Antoine Drouin
|
# Copyright (C) 2009 Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -345,9 +344,8 @@ clean_list :
|
|||||||
|
|
||||||
|
|
||||||
# Listing of phony targets.
|
# Listing of phony targets.
|
||||||
.PHONY : all sizebefore sizeafter \
|
.PHONY : all sizebefore sizeafter printcommands printmultilib\
|
||||||
build elf bin lss sym clean clean_list upload
|
build elf bin lss sym clean clean_list upload start_gdb start_telnet
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|||||||
+18
-7
@@ -1,23 +1,34 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
|
||||||
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
all: $(DATADIR)/maps.google.com $(PAPARAZZI_HOME)/conf/maps.xml
|
all: $(PAPARAZZI_HOME)/conf/maps.xml
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
rm -f $(DATADIR)/maps.google.com
|
||||||
|
|
||||||
$(DATADIR):
|
$(DATADIR):
|
||||||
mkdir $(DATADIR)
|
mkdir $(DATADIR)
|
||||||
|
|
||||||
$(DATADIR)/maps.google.com: $(DATADIR) FORCE
|
$(DATADIR)/maps.google.com: $(DATADIR) FORCE
|
||||||
|
@echo "-----------------------------------------------"
|
||||||
@echo "DOWNLOAD: google maps version code";
|
@echo "DOWNLOAD: google maps version code";
|
||||||
$(Q)wget -q -O $(@) http://maps.google.com/ || \
|
$(Q)wget -q -O $(@) http://maps.google.com/ || \
|
||||||
(rm -f $(@) && echo "Could not download google maps version code" && exit 1)
|
(rm -f $(@) && \
|
||||||
|
echo "Could not download google maps version code" && \
|
||||||
|
echo "-----------------------------------------------" && \
|
||||||
|
exit 1)
|
||||||
|
|
||||||
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
|
$(PAPARAZZI_HOME)/conf/maps.xml: $(DATADIR)/maps.google.com
|
||||||
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
|
$(eval GOOGLE_VERSION := $(shell grep -P "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.*##'))
|
||||||
$(Q)echo "" >> $(@)
|
@echo "Updated google maps version to $(GOOGLE_VERSION)"
|
||||||
$(Q)echo "<maps google_version=\""`grep -P "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.*##'`"\"/>" >> $(@)
|
@echo "-----------------------------------------------"
|
||||||
$(Q)echo "" >> $(@)
|
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > /tmp/maps.xml
|
||||||
|
$(Q)echo "" >> /tmp/maps.xml
|
||||||
|
$(Q)echo "<maps google_version=\"$(GOOGLE_VERSION)\"/>" >> /tmp/maps.xml
|
||||||
|
$(Q)echo "" >> /tmp/maps.xml
|
||||||
|
$(Q)mv /tmp/maps.xml $@
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
.PHONY: all clean
|
||||||
|
|||||||
@@ -1,3 +1,28 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# The default is to produce a quiet echo of compilation commands
|
||||||
|
# Launch with "make Q=''" to get full echo
|
||||||
|
Q=@
|
||||||
|
|
||||||
LIBNAME = libusbstack
|
LIBNAME = libusbstack
|
||||||
|
|
||||||
# Package definitions
|
# Package definitions
|
||||||
@@ -36,7 +61,8 @@ LIBOBJS = $(LIBSRCS:.c=.o)
|
|||||||
all: depend lib
|
all: depend lib
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -f $(LIBNAME).a $(LIBOBJS) .depend
|
@echo CLEAN $(LIBNAME)
|
||||||
|
$(Q)$(RM) -f $(LIBNAME).a $(LIBOBJS) .depend
|
||||||
|
|
||||||
# build lib
|
# build lib
|
||||||
lib: $(LIBNAME).a
|
lib: $(LIBNAME).a
|
||||||
@@ -53,7 +79,7 @@ $(LIBOBJS): Makefile
|
|||||||
|
|
||||||
# dependency checking
|
# dependency checking
|
||||||
depend: $(LIBSRCS)
|
depend: $(LIBSRCS)
|
||||||
$(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
|
$(Q)$(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
|
||||||
|
|
||||||
# phony targets
|
# phony targets
|
||||||
.PHONY: all clean depend
|
.PHONY: all clean depend
|
||||||
|
|||||||
+11
-9
@@ -1,7 +1,6 @@
|
|||||||
# Hey Emacs, this is a -*- makefile -*-
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# Paparazzi main $Id$
|
# Copyright (C) 2012 The Paparazzi Team
|
||||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
#
|
#
|
||||||
@@ -24,6 +23,7 @@
|
|||||||
# Launch with "make Q=''" to get full echo
|
# Launch with "make Q=''" to get full echo
|
||||||
|
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
PAPARAZZI_SRC=../..
|
PAPARAZZI_SRC=../..
|
||||||
EXT_DIR=$(PAPARAZZI_SRC)/sw/ext
|
EXT_DIR=$(PAPARAZZI_SRC)/sw/ext
|
||||||
|
|
||||||
@@ -45,23 +45,25 @@ ifeq ($(strip $(HAVE_ARM_NONE_EABI_GCC)),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
all: update_submodules libopencm3.module luftboot.module
|
all: libopencm3.module luftboot.module
|
||||||
|
|
||||||
update_submodules:
|
update_submodules:
|
||||||
$(Q)if [ -d $(PAPARAZZI_SRC)/.git ]; then \
|
$(Q)if [ -d $(PAPARAZZI_SRC)/.git ]; then \
|
||||||
cd $(PAPARAZZI_SRC) && git submodule update --quiet --init; \
|
cd $(PAPARAZZI_SRC) && git submodule update --quiet --init; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
libopencm3.module:
|
libopencm3.module: update_submodules
|
||||||
$(Q)make -C libopencm3 lib PREFIX=$(PREFIX)
|
$(Q)$(MAKE) -C libopencm3 lib PREFIX=$(PREFIX)
|
||||||
|
|
||||||
luftboot.module: libopencm3.module
|
luftboot.module: update_submodules libopencm3.module
|
||||||
$(Q)make -C luftboot/src all LIBOPENCM3=../../libopencm3
|
$(Q)$(MAKE) -C luftboot/src all LIBOPENCM3=../../libopencm3
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(Q)if [ -f libopencm3/Makefile ]; then \
|
$(Q)if [ -f libopencm3/Makefile ]; then \
|
||||||
make -C $(EXT_DIR)/libopencm3 clean; \
|
$(MAKE) -C $(EXT_DIR)/libopencm3 clean; \
|
||||||
fi
|
fi
|
||||||
$(Q)if [ -f luftboot/src/Makefile ]; then \
|
$(Q)if [ -f luftboot/src/Makefile ]; then \
|
||||||
make -C luftboot/src clean; \
|
$(MAKE) -C luftboot/src clean; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
.PHONY: all clean update_submodules libopencm3.module luftboot.module
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -35,12 +35,17 @@ FPIC=-fPIC
|
|||||||
|
|
||||||
OCAMLC=ocamlc
|
OCAMLC=ocamlc
|
||||||
OCAMLOPT=ocamlopt
|
OCAMLOPT=ocamlopt
|
||||||
|
OCAMLDEP=ocamldep
|
||||||
OCAMLOPTFLAGS=-thread
|
OCAMLOPTFLAGS=-thread
|
||||||
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
||||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I ../../lib/ocaml $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format pcre) $(OCAMLNETINCLUDES)
|
LIBPPRZDIR=../../lib/ocaml
|
||||||
|
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)
|
||||||
LIBS=$(OCAMLNETCMA) glibivy-ocaml.cma lablgtk.cma lablglade.cma lib-pprz.cma lablgnomecanvas.cma xlib-pprz.cma
|
LIBS=$(OCAMLNETCMA) glibivy-ocaml.cma lablgtk.cma lablglade.cma lib-pprz.cma lablgnomecanvas.cma xlib-pprz.cma
|
||||||
CMXA=$(LIBS:.cma=.cmxa)
|
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
|
||||||
@@ -51,7 +56,7 @@ all : $(MAIN)
|
|||||||
|
|
||||||
opt : $(MAIN).opt
|
opt : $(MAIN).opt
|
||||||
|
|
||||||
$(MAIN) : $(CMO) ../../lib/ocaml/xlib-pprz.cma ../../lib/ocaml/lib-pprz.cma
|
$(MAIN) : $(CMO) $(XLIBPPRZCMA) $(LIBPPRZCMA)
|
||||||
@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) -custom $(INCLUDES) $(OCAMLNETINCLUDES) unix.cma str.cma netstring.cma netclient.cma xml-light.cma $(LIBS) threads.cma gtkThread.cmo myGtkInit.cmo $(CMO) -o $@
|
||||||
|
|
||||||
@@ -89,9 +94,9 @@ compass : compass.ml
|
|||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~* *.cm* *.o *.out *.opt map2d gcs .depend gtk_strip.ml gtk_setting_time.ml gtk_save_settings.ml
|
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
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
@@ -117,7 +122,7 @@ actuators : actuators.c
|
|||||||
#
|
#
|
||||||
|
|
||||||
.depend: Makefile
|
.depend: Makefile
|
||||||
ocamldep -I ../../lib/ocaml *.ml* > .depend
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
||||||
# Copyright (C) 2012 The Paparazzi Team
|
# Copyright (C) 2012 The Paparazzi Team
|
||||||
#
|
#
|
||||||
@@ -25,10 +25,12 @@
|
|||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
OCAMLLIB = ../../lib/ocaml
|
OCAMLDEP = ocamldep
|
||||||
|
LIBPPRZDIR = ../../lib/ocaml
|
||||||
TOOLSDIR = ../../tools
|
TOOLSDIR = ../../tools
|
||||||
OCAMLINCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
|
OCAMLINCLUDES= -I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
|
||||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||||
|
|
||||||
# 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))
|
#ML_SDL_LFLAGS = $(foreach u,$(shell sdl-config --libs),-cclib $(u))
|
||||||
ML_SDL_LFLAGS = $(foreach u,$(shell pkg-config sdl --libs-only-L) -lSDL,-cclib $(u))
|
ML_SDL_LFLAGS = $(foreach u,$(shell pkg-config sdl --libs-only-L) -lSDL,-cclib $(u))
|
||||||
@@ -42,6 +44,9 @@ test_stick: test_sdl_stick.o
|
|||||||
input2ivy: sdl_stick.o ml_sdl_stick.o input2ivy.cmo
|
input2ivy: sdl_stick.o ml_sdl_stick.o input2ivy.cmo
|
||||||
$(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)
|
$(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)
|
||||||
|
|
||||||
|
# dependency of input2ivy
|
||||||
|
input2ivy: $(LIBPPRZCMA) $(TOOLSDIR)/fp_proc.cmo
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
gcc -c -O2 -Wall `pkg-config glib-2.0 --cflags` $(INCLUDES) $<
|
gcc -c -O2 -Wall `pkg-config glib-2.0 --cflags` $(INCLUDES) $<
|
||||||
|
|
||||||
@@ -51,3 +56,16 @@ input2ivy: sdl_stick.o ml_sdl_stick.o input2ivy.cmo
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ core *.o *.bak .depend test*stick *.cmo *.cmi input2ivy
|
rm -f *~ core *.o *.bak .depend test*stick *.cmo *.cmi input2ivy
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dependencies
|
||||||
|
#
|
||||||
|
|
||||||
|
.depend: Makefile
|
||||||
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
-include .depend
|
||||||
|
endif
|
||||||
|
|||||||
@@ -52,3 +52,5 @@ arch: clean
|
|||||||
# Builds release tar file
|
# Builds release tar file
|
||||||
dist: clean
|
dist: clean
|
||||||
cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATE).tar.gz $(PKG_NAME)
|
cd .. && $(TAR) --exclude={CVS,cvs} -cvzf $(PKG_NAME)-$(DATE).tar.gz $(PKG_NAME)
|
||||||
|
|
||||||
|
.PHONY: all clean app arch dist
|
||||||
|
|||||||
@@ -1,3 +1,30 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2010-2012 The Paparazzi Team
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# Quiet compilation
|
||||||
|
# Launch with "make Q=''" to get full command display
|
||||||
|
Q=@
|
||||||
|
|
||||||
|
CC = gcc
|
||||||
|
|
||||||
UNAME = $(shell uname -s)
|
UNAME = $(shell uname -s)
|
||||||
|
|
||||||
ifeq ("$(UNAME)","Darwin")
|
ifeq ("$(UNAME)","Darwin")
|
||||||
@@ -14,10 +41,12 @@ clean:
|
|||||||
rm -f *.o davis2ivy kestrel2ivy
|
rm -f *.o davis2ivy kestrel2ivy
|
||||||
|
|
||||||
davis2ivy: davis2ivy.o
|
davis2ivy: davis2ivy.o
|
||||||
g++ -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
$(Q)$(CC) -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
||||||
|
|
||||||
kestrel2ivy: kestrel2ivy.o
|
kestrel2ivy: kestrel2ivy.o
|
||||||
g++ -o kestrel2ivy kestrel2ivy.o $(LIBRARYS) -livy
|
$(Q)$(CC) -o kestrel2ivy kestrel2ivy.o $(LIBRARYS) -livy
|
||||||
|
|
||||||
%.o : %.c
|
%.o : %.c
|
||||||
gcc -c -O2 -Wall $(INCLUDES) $<
|
$(Q)$(CC) -c -O2 -Wall $(INCLUDES) $<
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|||||||
@@ -1,4 +1,26 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2003-2012 The Paparazzi Team
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
# Quiet compilation
|
# Quiet compilation
|
||||||
|
# Launch with "make Q=''" to get full command display
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
DEBUG =n
|
DEBUG =n
|
||||||
@@ -111,12 +133,14 @@ hdlc.cmo : hdlc.cmi
|
|||||||
$(OCAMLC) $<
|
$(OCAMLC) $<
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr *.cm* mkcostab
|
rm -fr *.cm* mkcostab .depend
|
||||||
$(RM) -f core `find . -name '*.[oas]' -print`
|
$(RM) -f core `find . -name '*.[oas]' -print`
|
||||||
$(RM) -f core `find . -name 'core' -print`
|
$(RM) -f core `find . -name 'core' -print`
|
||||||
$(RM) -f core costabi.c costabf.c *~
|
$(RM) -f core costabi.c costabf.c *~
|
||||||
$(RM) $(BINDIR)/multimon
|
$(RM) $(BINDIR)/multimon
|
||||||
|
|
||||||
|
.PHONY: all clean depend dep
|
||||||
|
|
||||||
depend dep:
|
depend dep:
|
||||||
$(CPP) -M $(CFLAGS) $(SRC_MISC) $(SRC_L1) $(SRC_L2) $(SRC_GEN) mkcostab.c > $(BINDIR)/.depend
|
$(CPP) -M $(CFLAGS) $(SRC_MISC) $(SRC_L1) $(SRC_L2) $(SRC_GEN) mkcostab.c > $(BINDIR)/.depend
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -35,87 +35,92 @@ include ../../../conf/Makefile.local
|
|||||||
CONF = ../../../conf
|
CONF = ../../../conf
|
||||||
VAR = ../../../var
|
VAR = ../../../var
|
||||||
|
|
||||||
all: link server messages settings dia diadec $(VAR)/boa.conf ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
OCAMLOPT = ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
OCAMLLIB = ../../lib/ocaml
|
OCAMLDEP = ocamldep
|
||||||
|
LIBPPRZDIR = ../../lib/ocaml
|
||||||
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
||||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring)
|
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring)
|
||||||
INCLUDES= -I $(OCAMLLIB) -I ../multimon $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES)
|
INCLUDES= -I $(LIBPPRZDIR) -I ../multimon $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES)
|
||||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
|
||||||
|
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||||
|
LIBPPRZCMXA=$(LIBPPRZCMA:.cma=.cmxa)
|
||||||
|
XLIBPPRZCMA=$(LIBPPRZDIR)/xlib-pprz.cma
|
||||||
|
XLIBPPRZCMXA=$(XLIBPPRZCMA:.cma=.cmxa)
|
||||||
|
|
||||||
|
LIBMULTIMONCMA=../multimon/multimon.cma
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
|
|
||||||
|
all: link server messages settings dia diadec $(VAR)/boa.conf ivy_tcp_aircraft ivy_tcp_controller broadcaster ivy2udp ivy_serial_bridge
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
$(VAR)/boa.conf :$(CONF)/boa.conf
|
$(VAR)/boa.conf :$(CONF)/boa.conf
|
||||||
mkdir -p $(VAR)
|
mkdir -p $(VAR)
|
||||||
sed 's|PAPARAZZI_HOME|$(PAPARAZZI_HOME)|' < $< > $@
|
sed 's|PAPARAZZI_HOME|$(PAPARAZZI_HOME)|' < $< > $@
|
||||||
chmod a+x boa
|
|
||||||
|
|
||||||
|
|
||||||
messages : messages.cmo ../../lib/ocaml/xlib-pprz.cma ../../lib/ocaml/lib-pprz.cma
|
messages : messages.cmo $(XLIBPPRZCMA) $(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 gtkInit.cmo $<
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $<
|
||||||
|
|
||||||
|
|
||||||
settings : settings.cmo ../../lib/ocaml/xlib-pprz.cma ../../lib/ocaml/lib-pprz.cma ../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) -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 $<
|
||||||
|
|
||||||
|
|
||||||
server : $(SERVERCMO) ../../lib/ocaml/lib-pprz.cma
|
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) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $(SERVERCMO)
|
||||||
|
|
||||||
server.opt : $(SERVERCMX) ../../lib/ocaml/lib-pprz.cmxa
|
server.opt : $(SERVERCMX) $(LIBPPRZCMXA)
|
||||||
@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 $@ str.cmxa unix.cmxa xml-light.cmxa lablgtk.cmxa glibivy-ocaml.cmxa lib-pprz.cmxa $(SERVERCMX)
|
||||||
|
|
||||||
LINKCMO=link.cmo
|
link : link.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
||||||
|
|
||||||
link : $(LINKCMO) ../../lib/ocaml/lib-pprz.cma
|
|
||||||
@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 $(LINKCMO)
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
ivy_tcp_aircraft : ivy_tcp_aircraft.cmo ../../lib/ocaml/lib-pprz.cma
|
ivy_tcp_aircraft : ivy_tcp_aircraft.cmo $(LIBMULTIMONCMA) $(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 multimon.cma ivy_tcp_aircraft.cmo
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
ivy_tcp_controller : ivy_tcp_controller.cmo ../../lib/ocaml/lib-pprz.cma
|
ivy_tcp_controller : ivy_tcp_controller.cmo $(LIBMULTIMONCMA) $(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 multimon.cma ivy_tcp_controller.cmo
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
broadcaster : broadcaster.cmo ../../lib/ocaml/lib-pprz.cma
|
broadcaster : broadcaster.cmo $(LIBMULTIMONCMA) $(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 multimon.cma broadcaster.cmo
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
ivy2udp : ivy2udp.cmo ../../lib/ocaml/lib-pprz.cma
|
ivy2udp : ivy2udp.cmo $(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 $<
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma $<
|
||||||
|
|
||||||
|
|
||||||
dia : dia.cmo ../multimon/multimon.cma
|
dia : dia.cmo $(LIBMULTIMONCMA) $(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 multimon.cma $^
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
diadec : diadec.cmo ../multimon/multimon.cma
|
diadec : diadec.cmo $(LIBMULTIMONCMA) $(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 multimon.cma $^
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma multimon.cma $<
|
||||||
|
|
||||||
|
|
||||||
150m : 150m.cmo
|
150m : 150m.cmo $(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 gtkInit.cmo $^
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma glibivy-ocaml.cma lib-pprz.cma gtkInit.cmo $<
|
||||||
|
|
||||||
|
|
||||||
settings.cmo : INCLUDES += -I ../cockpit
|
settings.cmo : INCLUDES += -I ../cockpit
|
||||||
settings.cmo : ../cockpit/page_settings.cmi
|
settings.cmo : ../cockpit/page_settings.cmi
|
||||||
@@ -162,12 +167,14 @@ ivy_serial_bridge: ivy_serial_bridge.c
|
|||||||
$(CC) $(GTK_CFLAGS) $(C_LIBRARYS) $(C_INCLUDES) -o $@ $< $(GTK_LDFLAGS)
|
$(CC) $(GTK_CFLAGS) $(C_LIBRARYS) $(C_INCLUDES) -o $@ $< $(GTK_LDFLAGS)
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
#
|
#
|
||||||
|
|
||||||
.depend: Makefile
|
.depend: Makefile
|
||||||
ocamldep -I ../../lib/ocaml *.ml* > .depend
|
$(OCAMLDEP) -I $(LIBPPRZDIR) -I ../multimon *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -33,6 +33,7 @@ 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)
|
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)
|
||||||
XINCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
XINCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
||||||
OCAMLC=ocamlc
|
OCAMLC=ocamlc
|
||||||
|
OCAMLDEP=ocamldep
|
||||||
OCAMLOPT=ocamlopt
|
OCAMLOPT=ocamlopt
|
||||||
OCAMLLEX=ocamllex
|
OCAMLLEX=ocamllex
|
||||||
OCAMLYACC=ocamlyacc
|
OCAMLYACC=ocamlyacc
|
||||||
@@ -154,7 +155,7 @@ gtk_papget_led_editor.ml : widgets.glade
|
|||||||
@rm /tmp/$@_$<
|
@rm /tmp/$@_$<
|
||||||
|
|
||||||
clean :
|
clean :
|
||||||
rm -f *~ *.cm* *.out *.opt .depend *.a *.o *.so tests gtk_papget_*.ml expr_parser.ml expr_parser.mli expr_lexer.ml expr_lexer.mli
|
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
|
||||||
|
|
||||||
.PHONY: all opt clean
|
.PHONY: all opt clean
|
||||||
|
|
||||||
@@ -163,7 +164,7 @@ clean :
|
|||||||
#
|
#
|
||||||
|
|
||||||
.depend: Makefile
|
.depend: Makefile
|
||||||
ocamldep *.ml* > .depend
|
$(OCAMLDEP) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
+16
-7
@@ -1,5 +1,5 @@
|
|||||||
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
# This file is part of paparazzi.
|
# This file is part of paparazzi.
|
||||||
@@ -24,8 +24,14 @@
|
|||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
|
OCAMLDEP = ocamldep
|
||||||
OCAMLOPT = ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I ../lib/ocaml
|
LIBPPRZDIR = ../lib/ocaml
|
||||||
|
INCLUDES= $(shell ocamlfind query -r -i-format xml-light) $(shell ocamlfind query -r -i-format lablgtk2) -I $(LIBPPRZDIR)
|
||||||
|
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||||
|
LIBPPRZCMXA=$(LIBPPRZCMA:.cma=.cmxa)
|
||||||
|
XLIBPPRZCMA=$(LIBPPRZDIR)/xlib-pprz.cma
|
||||||
|
XLIBPPRZCMXA=$(XLIBPPRZCMA:.cma=.cmxa)
|
||||||
|
|
||||||
all: play plotter plot sd2log plotprofile openlog2tlm
|
all: play plotter plot sd2log plotprofile openlog2tlm
|
||||||
|
|
||||||
@@ -56,9 +62,10 @@ LDFLAGS=
|
|||||||
openlog2tlm: openlog2tlm.c
|
openlog2tlm: openlog2tlm.c
|
||||||
$(CC) $(CFLAGS) -g -o $@ $^
|
$(CC) $(CFLAGS) -g -o $@ $^
|
||||||
|
|
||||||
|
# depedency on lib-pprz
|
||||||
play play-nox plotter sd2log : ../lib/ocaml/lib-pprz.cma
|
play play-nox sd2log : $(LIBPPRZCMA)
|
||||||
plot : ../lib/ocaml/lib-pprz.cmxa
|
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
|
||||||
@@ -178,14 +185,16 @@ 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
|
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
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
#
|
#
|
||||||
|
|
||||||
.depend: Makefile
|
.depend: Makefile
|
||||||
ocamldep -I ../lib/ocaml *.ml* > .depend
|
ocamldep -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
+19
-12
@@ -1,4 +1,4 @@
|
|||||||
# Paparazzi simulator $Id$
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
@@ -40,18 +40,20 @@ SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
|||||||
|
|
||||||
|
|
||||||
OCAMLC = ocamlc -g
|
OCAMLC = ocamlc -g
|
||||||
OCAMLOPT=ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
|
OCAMLDEP = ocamldep
|
||||||
OCAML=$(shell which ocaml)
|
OCAML=$(shell which ocaml)
|
||||||
OCAMLRUN=$(shell which ocamlrun)
|
OCAMLRUN=$(shell which ocamlrun)
|
||||||
INCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) -I ../lib/ocaml $(shell ocamlfind query -r -i-format xml-light)
|
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)
|
||||||
LAUNCHSITL = launchsitl
|
|
||||||
|
|
||||||
all : gaia sitl.cma $(LAUNCHSITL) simhitl
|
all : gaia sitl.cma $(LAUNCHSITL) simhitl
|
||||||
@chmod a+x $(LAUNCHSITL)
|
|
||||||
|
|
||||||
simhitl : fg.o $(SIMHCMO) simhitl.cmo
|
simhitl : fg.o $(SIMHCMO) simhitl.cmo
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
@@ -72,7 +74,7 @@ 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) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma glibivy-ocaml.cma lib-pprz.cma lablgtk.cma gtkInit.cmo $^
|
||||||
|
|
||||||
%.cmo : %.ml ../lib/ocaml/lib-pprz.cma
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|
||||||
@@ -84,24 +86,29 @@ diffusion : stdlib.cmo diffusion.cmo
|
|||||||
@echo OOC $<
|
@echo OOC $<
|
||||||
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
||||||
|
|
||||||
%.cmi : %.mli ../lib/ocaml/lib-pprz.cma
|
%.cmi : %.mli
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|
||||||
clean :
|
|
||||||
rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia simhitl booz_sim test2
|
|
||||||
|
|
||||||
launchsitl :
|
launchsitl :
|
||||||
cat ../../src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
cat ../../src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||||
chmod a+x $@
|
chmod a+x $@
|
||||||
|
|
||||||
|
# dependency on lib-pprz
|
||||||
|
simhitl diffusion gaia: $(LIBPPRZCMA)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia simhitl diffusion
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
#
|
#
|
||||||
|
|
||||||
.depend:
|
.depend: Makefile
|
||||||
ocamldep *.ml* > .depend
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
+34
-9
@@ -1,16 +1,39 @@
|
|||||||
# Quiet
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
|
#
|
||||||
|
# Copyright (C) 2004-2012 Pascal Brisset, Antoine Drouin
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# The default is to produce a quiet echo of compilation commands
|
||||||
|
# Launch with "make Q=''" to get full echo
|
||||||
Q=@
|
Q=@
|
||||||
|
|
||||||
OCAMLC = ocamlc
|
OCAMLC = ocamlc
|
||||||
OCAMLOPT = ocamlopt
|
OCAMLOPT = ocamlopt
|
||||||
OCAMLLIB = ../lib/ocaml
|
OCAMLDEP = ocamldep
|
||||||
INCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
LIBPPRZDIR = ../lib/ocaml
|
||||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
INCLUDES= -I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
||||||
|
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||||
PAPARAZZICENTERCMO = gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_aircraft.cmo pc_control_panel.cmo paparazzicenter.cmo
|
PAPARAZZICENTERCMO = gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_aircraft.cmo pc_control_panel.cmo paparazzicenter.cmo
|
||||||
|
|
||||||
all: paparazzicenter
|
all: paparazzicenter
|
||||||
|
|
||||||
paparazzicenter : $(PAPARAZZICENTERCMO) $(OCAMLLIB)/lib-pprz.cma
|
paparazzicenter : $(PAPARAZZICENTERCMO) $(LIBPPRZDIR)/lib-pprz.cma
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma lablglade.cma gtkInit.cmo lib-pprz.cma xlib-pprz.cma lablgnomeui.cma $^
|
$(Q)$(OCAMLC) -custom $(INCLUDES) -o $@ unix.cma str.cma xml-light.cma lablgtk.cma lablglade.cma gtkInit.cmo lib-pprz.cma xlib-pprz.cma lablgnomeui.cma $^
|
||||||
|
|
||||||
@@ -30,19 +53,21 @@ gtk_process.ml : paparazzicenter.glade
|
|||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) $<
|
$(Q)$(OCAMLC) $(INCLUDES) $<
|
||||||
|
|
||||||
paparazzicenter.cmo : gtk_pc.cmo gtk_process.cmo pc_common.cmo pc_control_panel.cmo pc_aircraft.cmo
|
pc_common.cmo: gtk_process.cmo
|
||||||
|
|
||||||
pc_control_panel.cmo pc_aircraft.cmo : pc_common.cmo
|
paparazzicenter.cmo : gtk_pc.cmo
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
\rm -f *.cm* gtk_pc.ml gtk_process.ml .depend paparazzicenter
|
\rm -f *.cm* gtk_pc.ml gtk_process.ml .depend paparazzicenter
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dependencies
|
# Dependencies
|
||||||
#
|
#
|
||||||
|
|
||||||
.depend:
|
.depend: Makefile
|
||||||
ocamldep -I ../lib/ocaml *.ml* > .depend
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||||
|
|
||||||
ifneq ($(MAKECMDGOALS),clean)
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
-include .depend
|
-include .depend
|
||||||
|
|||||||
+25
-24
@@ -1,4 +1,4 @@
|
|||||||
# $Id$
|
# Hey Emacs, this is a -*- makefile -*-
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
||||||
#
|
#
|
||||||
@@ -24,41 +24,37 @@ Q=@
|
|||||||
|
|
||||||
OCAML=ocaml
|
OCAML=ocaml
|
||||||
OCAMLC=ocamlc
|
OCAMLC=ocamlc
|
||||||
INCLUDES=-I ../lib/ocaml $(shell ocamlfind query -r -i-format xml-light) -I .
|
OCAMLDEP=ocamldep
|
||||||
|
LIBPPRZDIR=../lib/ocaml
|
||||||
|
INCLUDES=-I $(LIBPPRZDIR) $(shell ocamlfind query -r -i-format xml-light)
|
||||||
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
OCAMLNETINCLUDES=$(shell ocamlfind query -r -i-format netstring) $(shell ocamlfind query -r -i-format netclient)
|
||||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
||||||
OCAMLLEX=ocamllex
|
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||||
OCAMLYACC=ocamlyacc
|
|
||||||
|
|
||||||
all: gen_common.cmo gen_aircraft.out gen_airframe.out gen_messages2.out gen_messages.out gen_ubx.out gen_mtk.out gen_flight_plan.out gen_radio.out gen_periodic.out gen_settings.out gen_xsens.out gen_modules.out gen_abi.out find_free_msg_id.out gen_srtm.out mergelogs
|
all: gen_common.cmo gen_aircraft.out gen_airframe.out gen_messages2.out gen_messages.out gen_ubx.out gen_mtk.out gen_flight_plan.out gen_radio.out gen_periodic.out gen_settings.out gen_xsens.out gen_modules.out gen_abi.out find_free_msg_id.out gen_srtm.out mergelogs
|
||||||
|
|
||||||
FP_CMO = fp_proc.cmo gen_flight_plan.cmo
|
FP_CMO = fp_proc.cmo gen_flight_plan.cmo
|
||||||
ABS_FP = $(FP_CMO:%=$$PAPARAZZI_SRC/sw/tools/%)
|
ABS_FP = $(FP_CMO:%=$$PAPARAZZI_SRC/sw/tools/%)
|
||||||
|
|
||||||
gen_flight_plan.out : $(FP_CMO) ../lib/ocaml/lib-pprz.cma
|
gen_flight_plan.out : $(FP_CMO)
|
||||||
@echo OL $@
|
@echo OL $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma $^
|
$(Q)$(OCAMLC) $(INCLUDES) -custom -o $@ unix.cma str.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma $^
|
||||||
|
|
||||||
fp_proc.cmo : fp_proc.cmi
|
gen_srtm.out : gen_common.cmo
|
||||||
gen_flight_plan.cmo : fp_proc.cmi
|
|
||||||
|
|
||||||
gen_common.cmo : gen_common.cmi
|
|
||||||
|
|
||||||
gen_srtm.out : ../lib/ocaml/lib-pprz.cma
|
|
||||||
@echo OC $@
|
@echo OC $@
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) $(OCAMLNETINCLUDES) -custom -o $@ unix.cma str.cma netstring.cma netclient.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma gen_common.cmo $^
|
$(Q)$(OCAMLC) $(INCLUDES) $(OCAMLNETINCLUDES) -custom -o $@ unix.cma str.cma netstring.cma netclient.cma xml-light.cma ivy-ocaml.cma lib-pprz.cma gen_common.cmo $^
|
||||||
|
|
||||||
mergelogs: mergelogs.c
|
mergelogs: mergelogs.c
|
||||||
gcc mergelogs.c -o mergelogs
|
gcc mergelogs.c -o mergelogs
|
||||||
|
|
||||||
%.out : %.ml gen_common.ml Makefile
|
%.out : %.ml gen_common.cmo $(LIBPPRZCMA)
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -o $@ unix.cma str.cma ivy-ocaml.cma xml-light.cma lib-pprz.cma gen_common.cmo $<
|
$(Q)$(OCAMLC) $(INCLUDES) -o $@ unix.cma str.cma ivy-ocaml.cma xml-light.cma lib-pprz.cma gen_common.cmo $<
|
||||||
@cat ../../pprz_src_test.sh > $@
|
@cat ../../pprz_src_test.sh > $@
|
||||||
@echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/tools $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES) -I $$PAPARAZZI_SRC/sw/lib/ocaml unix.cma str.cma ivy-ocaml.cma xml-light.cma $(OCAMLNETCMA) lib-pprz.cma gen_common.cmo $$PAPARAZZI_BIN/$< $$*' >> $@
|
@echo '$(OCAML) -I $$PAPARAZZI_SRC/sw/tools $(shell ocamlfind query -r -i-format xml-light) $(OCAMLNETINCLUDES) -I $$PAPARAZZI_SRC/sw/lib/ocaml unix.cma str.cma ivy-ocaml.cma xml-light.cma $(OCAMLNETCMA) lib-pprz.cma gen_common.cmo $$PAPARAZZI_BIN/$< $$*' >> $@
|
||||||
@chmod a+x $@
|
@chmod a+x $@
|
||||||
|
|
||||||
%.cmo : %.ml ../lib/ocaml/lib-pprz.cma
|
%.cmo : %.ml
|
||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|
||||||
@@ -66,17 +62,22 @@ mergelogs: mergelogs.c
|
|||||||
@echo OC $<
|
@echo OC $<
|
||||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||||
|
|
||||||
%.ml : %.mll
|
# dependency on lib-pprz
|
||||||
@echo OC $<
|
gen_flight_plan.out gen_srtm.out : $(LIBPPRZCMA)
|
||||||
$(Q)$(OCAMLLEX) $<
|
|
||||||
|
|
||||||
%.ml : %.mly
|
|
||||||
@echo OC $<
|
|
||||||
$(Q)$(OCAMLYACC) $<
|
|
||||||
|
|
||||||
%.mli : %.mly
|
|
||||||
@echo OC $<
|
|
||||||
$(Q)$(OCAMLYACC) $<
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.cm* *.out *~ fp_parser.ml fp_parser.mli mergelogs
|
rm -f *.cm* *.out *~ .depend fp_parser.ml fp_parser.mli mergelogs
|
||||||
|
|
||||||
|
.PHONY: all clean
|
||||||
|
|
||||||
|
#
|
||||||
|
# Dependencies
|
||||||
|
#
|
||||||
|
|
||||||
|
.depend: Makefile
|
||||||
|
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml *.mli > .depend
|
||||||
|
|
||||||
|
ifneq ($(MAKECMDGOALS),clean)
|
||||||
|
-include .depend
|
||||||
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user