mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-09 22:49:53 +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 -*-
|
||||
#
|
||||
# Paparazzi main $Id$
|
||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -38,18 +37,49 @@ ifeq ($(PAPARAZZI_HOME),)
|
||||
PAPARAZZI_HOME=$(PAPARAZZI_SRC)
|
||||
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
|
||||
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
|
||||
CONF=$(PAPARAZZI_SRC)/conf
|
||||
AIRBORNE=sw/airborne
|
||||
SIMULATOR=sw/simulator
|
||||
MULTIMON=sw/ground_segment/multimon
|
||||
COCKPIT=sw/ground_segment/cockpit
|
||||
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
|
||||
LOGALIZER=sw/logalizer
|
||||
SIMULATOR=sw/simulator
|
||||
EXT=sw/ext
|
||||
MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME)
|
||||
CONF=$(PAPARAZZI_SRC)/conf
|
||||
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
|
||||
|
||||
SUBDIRS = $(PPRZCENTER) $(MISC) $(LOGALIZER)
|
||||
|
||||
#
|
||||
# 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
|
||||
MESSAGES2_H=$(STATICINCLUDE)/messages2.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_PROTOCOL2_H=$(STATICINCLUDE)/dl_protocol2.h
|
||||
ABI_MESSAGES_H=$(STATICINCLUDE)/abi_messages.h
|
||||
MESSAGES_XML = $(CONF)/messages.xml
|
||||
UBX_XML = $(CONF)/ubx.xml
|
||||
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)
|
||||
|
||||
GEN_HEADERS = $(MESSAGES_H) $(MESSAGES2_H) $(UBX_PROTOCOL_H) $(MTK_PROTOCOL_H) $(XSENS_PROTOCOL_H) $(DL_PROTOCOL_H) $(DL_PROTOCOL2_H) $(ABI_MESSAGES_H)
|
||||
|
||||
|
||||
all: print_build_version conf commands static
|
||||
all: print_build_version update_google_version conf ext lib subdirs lpctools commands static
|
||||
|
||||
print_build_version:
|
||||
@echo "------------------------------------------------------------"
|
||||
@echo "Building Paparazzi version" $(shell ./paparazzi_version)
|
||||
@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
|
||||
[ -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:
|
||||
cd $(LIB)/ocaml; $(MAKE)
|
||||
|
||||
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
|
||||
$(MAKE) -C $(LIB)/ocaml
|
||||
|
||||
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:
|
||||
@[ -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"
|
||||
tmtc: lib cockpit multimon
|
||||
$(MAKE) -C $(TMTC)
|
||||
|
||||
tools: lib
|
||||
$(MAKE) -C $(TOOLS)
|
||||
|
||||
sim_static: lib
|
||||
$(MAKE) -C $(SIMULATOR)
|
||||
|
||||
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)
|
||||
@echo BUILD $@
|
||||
$(Q)PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME) $(TOOLS)/gen_messages.out $< telemetry > /tmp/msg.h
|
||||
$(Q)mv /tmp/msg.h $@
|
||||
$(Q)chmod a+r $@
|
||||
|
||||
$(MESSAGES2_H) : $(MESSAGES_XML) $(CONF_XML) tools
|
||||
$(MESSAGES2_H) : $(MESSAGES_XML) tools
|
||||
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
|
||||
@echo BUILD $@
|
||||
$(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)mv /tmp/abi.h $@
|
||||
|
||||
|
||||
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
|
||||
upload_bl bl.upload: bl
|
||||
lpc21isp -control $(AIRBORNE)/arch/lpc21/test/bootloader/bl.hex $(BOOTLOADER_DEV) 38400 12000
|
||||
# stuff to build and upload the lpc bootloader ...
|
||||
include Makefile.lpctools
|
||||
lpctools: lpc21iap usb_lib
|
||||
|
||||
JTAG_INTERFACE = olimex-jtag-tiny.cfg
|
||||
#JTAG_INTERFACE = olimex-arm-usb-ocd.cfg
|
||||
commands: paparazzi sw/simulator/launchsitl
|
||||
|
||||
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
|
||||
paparazzi:
|
||||
cat src/paparazzi | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||
chmod a+x $@
|
||||
|
||||
|
||||
|
||||
lpc21iap:
|
||||
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
|
||||
|
||||
#####
|
||||
#####
|
||||
sw/simulator/launchsitl:
|
||||
cat src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||
chmod a+x $@
|
||||
|
||||
run_sitl :
|
||||
$(PAPARAZZI_HOME)/var/$(AIRCRAFT)/sim/simsitl
|
||||
@@ -219,21 +225,16 @@ install :
|
||||
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:
|
||||
$(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)make -C sw/ext clean
|
||||
$(Q)$(MAKE) -C $(EXT) clean
|
||||
$(Q)find . -name '*~' -exec rm -f {} \;
|
||||
$(Q)rm -f paparazzi sw/simulator/launchsitl
|
||||
|
||||
@@ -256,6 +257,11 @@ dist_clean_irreversible: clean
|
||||
ab_clean:
|
||||
find sw/airborne -name '*~' -exec rm -f {} \;
|
||||
|
||||
|
||||
#
|
||||
# Tests
|
||||
#
|
||||
|
||||
replace_current_conf_xml:
|
||||
test conf/conf.xml && mv conf/conf.xml conf/conf.xml.backup.$(BUILD_DATETIME)
|
||||
cp conf/tests_conf.xml conf/conf.xml
|
||||
@@ -263,19 +269,15 @@ replace_current_conf_xml:
|
||||
restore_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:
|
||||
cd tests; $(MAKE) test
|
||||
|
||||
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 -*-
|
||||
# Paparazzi main $Id$
|
||||
#
|
||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -47,7 +47,6 @@ SETTINGS_XML=$(ACINCLUDE)/settings.xml
|
||||
SETTINGS_MODULES=$(ACINCLUDE)/settings_modules.xml
|
||||
SETTINGS_TELEMETRY=$(ACINCLUDE)/settings_telemetry.xml
|
||||
MAKEFILE_AC=$(ACINCLUDE)/Makefile.ac
|
||||
MAKE=make PAPARAZZI_SRC=$(PAPARAZZI_SRC) PAPARAZZI_HOME=$(PAPARAZZI_HOME)
|
||||
MODULES_H=$(AC_GENERATED)/modules.h
|
||||
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
|
||||
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
|
||||
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2009 Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id: Makefile.sim 3505 2009-06-17 12:59:32Z hecto $
|
||||
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
DESTDIR=/
|
||||
|
||||
ifeq ($(PAPARAZZI_HOME),)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2003-2005 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
|
||||
@@ -88,6 +88,7 @@ $(OBJDIR)/%.o: %.cpp $(OBJDIR)/../Makefile.ac
|
||||
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
.PHONY: all compile check_jsbsim
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2009-2010 The Paparazzi Team
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2009 Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
|
||||
+1
-1
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2006 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -132,6 +131,7 @@ $(OBJDIR)/%.o: %.cpp $(OBJDIR)/../Makefile.ac
|
||||
$(Q)test -d $(dir $@) || mkdir -p $(dir $@)
|
||||
$(Q)$(CC) $(CFLAGS) -c -o $@ $<
|
||||
|
||||
.PHONY: all compile check_jsbsim
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
|
||||
+2
-4
@@ -1,6 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2009 Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -345,9 +344,8 @@ clean_list :
|
||||
|
||||
|
||||
# Listing of phony targets.
|
||||
.PHONY : all sizebefore sizeafter \
|
||||
build elf bin lss sym clean clean_list upload
|
||||
|
||||
.PHONY : all sizebefore sizeafter printcommands printmultilib\
|
||||
build elf bin lss sym clean clean_list upload start_gdb start_telnet
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
|
||||
+18
-7
@@ -1,23 +1,34 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
|
||||
DATADIR = $(PAPARAZZI_HOME)/conf/maps_data
|
||||
Q=@
|
||||
|
||||
all: $(DATADIR)/maps.google.com $(PAPARAZZI_HOME)/conf/maps.xml
|
||||
all: $(PAPARAZZI_HOME)/conf/maps.xml
|
||||
|
||||
clean:
|
||||
|
||||
rm -f $(DATADIR)/maps.google.com
|
||||
|
||||
$(DATADIR):
|
||||
mkdir $(DATADIR)
|
||||
|
||||
$(DATADIR)/maps.google.com: $(DATADIR) FORCE
|
||||
@echo "-----------------------------------------------"
|
||||
@echo "DOWNLOAD: google maps version code";
|
||||
$(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
|
||||
$(Q)echo "<!DOCTYPE maps SYSTEM \"maps.dtd\">" > $(@)
|
||||
$(Q)echo "" >> $(@)
|
||||
$(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.*##'`"\"/>" >> $(@)
|
||||
$(Q)echo "" >> $(@)
|
||||
$(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.*##'))
|
||||
@echo "Updated google maps version to $(GOOGLE_VERSION)"
|
||||
@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:
|
||||
.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
|
||||
|
||||
# Package definitions
|
||||
@@ -36,7 +61,8 @@ LIBOBJS = $(LIBSRCS:.c=.o)
|
||||
all: depend lib
|
||||
|
||||
clean:
|
||||
$(RM) -f $(LIBNAME).a $(LIBOBJS) .depend
|
||||
@echo CLEAN $(LIBNAME)
|
||||
$(Q)$(RM) -f $(LIBNAME).a $(LIBOBJS) .depend
|
||||
|
||||
# build lib
|
||||
lib: $(LIBNAME).a
|
||||
@@ -53,7 +79,7 @@ $(LIBOBJS): Makefile
|
||||
|
||||
# dependency checking
|
||||
depend: $(LIBSRCS)
|
||||
$(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
|
||||
$(Q)$(CC) $(CFLAGS) -MM $^ > .depend || rm -f .depend
|
||||
|
||||
# phony targets
|
||||
.PHONY: all clean depend
|
||||
|
||||
+11
-9
@@ -1,7 +1,6 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Paparazzi main $Id$
|
||||
# Copyright (C) 2004 Pascal Brisset Antoine Drouin
|
||||
# Copyright (C) 2012 The Paparazzi Team
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
#
|
||||
@@ -24,6 +23,7 @@
|
||||
# Launch with "make Q=''" to get full echo
|
||||
|
||||
Q=@
|
||||
|
||||
PAPARAZZI_SRC=../..
|
||||
EXT_DIR=$(PAPARAZZI_SRC)/sw/ext
|
||||
|
||||
@@ -45,23 +45,25 @@ ifeq ($(strip $(HAVE_ARM_NONE_EABI_GCC)),)
|
||||
endif
|
||||
|
||||
|
||||
all: update_submodules libopencm3.module luftboot.module
|
||||
all: libopencm3.module luftboot.module
|
||||
|
||||
update_submodules:
|
||||
$(Q)if [ -d $(PAPARAZZI_SRC)/.git ]; then \
|
||||
cd $(PAPARAZZI_SRC) && git submodule update --quiet --init; \
|
||||
fi
|
||||
|
||||
libopencm3.module:
|
||||
$(Q)make -C libopencm3 lib PREFIX=$(PREFIX)
|
||||
libopencm3.module: update_submodules
|
||||
$(Q)$(MAKE) -C libopencm3 lib PREFIX=$(PREFIX)
|
||||
|
||||
luftboot.module: libopencm3.module
|
||||
$(Q)make -C luftboot/src all LIBOPENCM3=../../libopencm3
|
||||
luftboot.module: update_submodules libopencm3.module
|
||||
$(Q)$(MAKE) -C luftboot/src all LIBOPENCM3=../../libopencm3
|
||||
|
||||
clean:
|
||||
$(Q)if [ -f libopencm3/Makefile ]; then \
|
||||
make -C $(EXT_DIR)/libopencm3 clean; \
|
||||
$(MAKE) -C $(EXT_DIR)/libopencm3 clean; \
|
||||
fi
|
||||
$(Q)if [ -f luftboot/src/Makefile ]; then \
|
||||
make -C luftboot/src clean; \
|
||||
$(MAKE) -C luftboot/src clean; \
|
||||
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
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -35,12 +35,17 @@ FPIC=-fPIC
|
||||
|
||||
OCAMLC=ocamlc
|
||||
OCAMLOPT=ocamlopt
|
||||
OCAMLDEP=ocamldep
|
||||
OCAMLOPTFLAGS=-thread
|
||||
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)
|
||||
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
|
||||
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
|
||||
MAIN=gcs
|
||||
@@ -51,7 +56,7 @@ all : $(MAIN)
|
||||
|
||||
opt : $(MAIN).opt
|
||||
|
||||
$(MAIN) : $(CMO) ../../lib/ocaml/xlib-pprz.cma ../../lib/ocaml/lib-pprz.cma
|
||||
$(MAIN) : $(CMO) $(XLIBPPRZCMA) $(LIBPPRZCMA)
|
||||
@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 $@
|
||||
|
||||
@@ -89,9 +94,9 @@ compass : compass.ml
|
||||
|
||||
|
||||
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
|
||||
@@ -117,7 +122,7 @@ actuators : actuators.c
|
||||
#
|
||||
|
||||
.depend: Makefile
|
||||
ocamldep -I ../../lib/ocaml *.ml* > .depend
|
||||
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include .depend
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
||||
# Copyright (C) 2012 The Paparazzi Team
|
||||
#
|
||||
@@ -25,10 +25,12 @@
|
||||
Q=@
|
||||
|
||||
OCAMLC = ocamlc
|
||||
OCAMLLIB = ../../lib/ocaml
|
||||
OCAMLDEP = ocamldep
|
||||
LIBPPRZDIR = ../../lib/ocaml
|
||||
TOOLSDIR = ../../tools
|
||||
OCAMLINCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light) -I $(TOOLSDIR)
|
||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
||||
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
|
||||
|
||||
# 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 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
|
||||
$(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
|
||||
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:
|
||||
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
|
||||
dist: clean
|
||||
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)
|
||||
|
||||
ifeq ("$(UNAME)","Darwin")
|
||||
@@ -14,10 +41,12 @@ clean:
|
||||
rm -f *.o davis2ivy kestrel2ivy
|
||||
|
||||
davis2ivy: davis2ivy.o
|
||||
g++ -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
||||
$(Q)$(CC) -o davis2ivy davis2ivy.o $(LIBRARYS) -livy
|
||||
|
||||
kestrel2ivy: kestrel2ivy.o
|
||||
g++ -o kestrel2ivy kestrel2ivy.o $(LIBRARYS) -livy
|
||||
$(Q)$(CC) -o kestrel2ivy kestrel2ivy.o $(LIBRARYS) -livy
|
||||
|
||||
%.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
|
||||
# Launch with "make Q=''" to get full command display
|
||||
Q=@
|
||||
|
||||
DEBUG =n
|
||||
@@ -111,12 +133,14 @@ hdlc.cmo : hdlc.cmi
|
||||
$(OCAMLC) $<
|
||||
|
||||
clean:
|
||||
rm -fr *.cm* mkcostab
|
||||
rm -fr *.cm* mkcostab .depend
|
||||
$(RM) -f core `find . -name '*.[oas]' -print`
|
||||
$(RM) -f core `find . -name 'core' -print`
|
||||
$(RM) -f core costabi.c costabf.c *~
|
||||
$(RM) $(BINDIR)/multimon
|
||||
|
||||
.PHONY: all clean depend dep
|
||||
|
||||
depend dep:
|
||||
$(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
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -35,87 +35,92 @@ include ../../../conf/Makefile.local
|
||||
CONF = ../../../conf
|
||||
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
|
||||
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)
|
||||
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)
|
||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
||||
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
|
||||
|
||||
SERVERCMO = server_globals.cmo aircraft.cmo wind.cmo airprox.cmo kml.cmo fw_server.ml rotorcraft_server.ml server.cmo
|
||||
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
|
||||
mkdir -p $(VAR)
|
||||
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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(Q)$(OCAMLOPT) $(INCLUDES) -o $@ str.cmxa unix.cmxa xml-light.cmxa lablgtk.cmxa glibivy-ocaml.cmxa lib-pprz.cmxa $(SERVERCMX)
|
||||
|
||||
LINKCMO=link.cmo
|
||||
|
||||
link : $(LINKCMO) ../../lib/ocaml/lib-pprz.cma
|
||||
link : link.cmo $(LIBMULTIMONCMA) $(LIBPPRZCMA)
|
||||
@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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 $@
|
||||
$(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 : ../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)
|
||||
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
#
|
||||
|
||||
.depend: Makefile
|
||||
ocamldep -I ../../lib/ocaml *.ml* > .depend
|
||||
$(OCAMLDEP) -I $(LIBPPRZDIR) -I ../multimon *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include .depend
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2003 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
# 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)
|
||||
XINCLUDES= $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
||||
OCAMLC=ocamlc
|
||||
OCAMLDEP=ocamldep
|
||||
OCAMLOPT=ocamlopt
|
||||
OCAMLLEX=ocamllex
|
||||
OCAMLYACC=ocamlyacc
|
||||
@@ -154,7 +155,7 @@ gtk_papget_led_editor.ml : widgets.glade
|
||||
@rm /tmp/$@_$<
|
||||
|
||||
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
|
||||
|
||||
@@ -163,7 +164,7 @@ clean :
|
||||
#
|
||||
|
||||
.depend: Makefile
|
||||
ocamldep *.ml* > .depend
|
||||
$(OCAMLDEP) *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include .depend
|
||||
|
||||
+16
-7
@@ -1,5 +1,5 @@
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# $Id$
|
||||
# Copyright (C) 2004 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
# This file is part of paparazzi.
|
||||
@@ -24,8 +24,14 @@
|
||||
Q=@
|
||||
|
||||
OCAMLC = ocamlc
|
||||
OCAMLDEP = ocamldep
|
||||
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
|
||||
|
||||
@@ -56,9 +62,10 @@ LDFLAGS=
|
||||
openlog2tlm: openlog2tlm.c
|
||||
$(CC) $(CFLAGS) -g -o $@ $^
|
||||
|
||||
|
||||
play play-nox plotter sd2log : ../lib/ocaml/lib-pprz.cma
|
||||
plot : ../lib/ocaml/lib-pprz.cmxa
|
||||
# depedency on lib-pprz
|
||||
play play-nox sd2log : $(LIBPPRZCMA)
|
||||
plotter : $(LIBPPRZCMA) $(XLIBPPRZCMA)
|
||||
plot : $(LIBPPRZCMXA) $(XLIBPPRZCMXA)
|
||||
|
||||
# Target for bytecode executable (if ocamlopt is not available)
|
||||
# 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
|
||||
|
||||
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
|
||||
#
|
||||
|
||||
.depend: Makefile
|
||||
ocamldep -I ../lib/ocaml *.ml* > .depend
|
||||
ocamldep -I $(LIBPPRZDIR) *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-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
|
||||
#
|
||||
@@ -40,18 +40,20 @@ SIMSCMX=$(SIMSML:%.ml=%.cmx)
|
||||
|
||||
|
||||
OCAMLC = ocamlc -g
|
||||
OCAMLOPT=ocamlopt
|
||||
OCAMLOPT = ocamlopt
|
||||
OCAMLDEP = ocamldep
|
||||
OCAML=$(shell which ocaml)
|
||||
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
|
||||
VARINCLUDE=$(PAPARAZZI_HOME)/var/include
|
||||
ACINCLUDE = $(PAPARAZZI_HOME)/var/$(AIRCRAFT)
|
||||
LAUNCHSITL = launchsitl
|
||||
|
||||
|
||||
all : gaia sitl.cma $(LAUNCHSITL) simhitl
|
||||
@chmod a+x $(LAUNCHSITL)
|
||||
|
||||
simhitl : fg.o $(SIMHCMO) simhitl.cmo
|
||||
@echo OL $@
|
||||
@@ -72,7 +74,7 @@ diffusion : stdlib.cmo diffusion.cmo
|
||||
@echo OL $@
|
||||
$(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 $<
|
||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||
|
||||
@@ -84,24 +86,29 @@ diffusion : stdlib.cmo diffusion.cmo
|
||||
@echo OOC $<
|
||||
$(Q)$(OCAMLOPT) $(INCLUDES) -c $<
|
||||
|
||||
%.cmi : %.mli ../lib/ocaml/lib-pprz.cma
|
||||
%.cmi : %.mli
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||
|
||||
clean :
|
||||
rm -f *.cm* *~ *.out .depend *.o *.a *.so gaia simhitl booz_sim test2
|
||||
|
||||
launchsitl :
|
||||
cat ../../src/$(@F) | sed s#OCAMLRUN#$(OCAMLRUN)# | sed s#OCAML#$(OCAML)# > $@
|
||||
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
|
||||
#
|
||||
|
||||
.depend:
|
||||
ocamldep *.ml* > .depend
|
||||
.depend: Makefile
|
||||
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-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=@
|
||||
|
||||
OCAMLC = ocamlc
|
||||
OCAMLOPT = ocamlopt
|
||||
OCAMLLIB = ../lib/ocaml
|
||||
INCLUDES= -I $(OCAMLLIB) $(shell ocamlfind query -r -i-format lablgtk2) $(shell ocamlfind query -r -i-format xml-light)
|
||||
LIBPPRZCMA=$(OCAMLLIB)/lib-pprz.cma
|
||||
OCAMLDEP = ocamldep
|
||||
LIBPPRZDIR = ../lib/ocaml
|
||||
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
|
||||
|
||||
all: paparazzicenter
|
||||
|
||||
paparazzicenter : $(PAPARAZZICENTERCMO) $(OCAMLLIB)/lib-pprz.cma
|
||||
paparazzicenter : $(PAPARAZZICENTERCMO) $(LIBPPRZDIR)/lib-pprz.cma
|
||||
@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 $^
|
||||
|
||||
@@ -30,19 +53,21 @@ gtk_process.ml : paparazzicenter.glade
|
||||
@echo OC $<
|
||||
$(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:
|
||||
\rm -f *.cm* gtk_pc.ml gtk_process.ml .depend paparazzicenter
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
#
|
||||
# Dependencies
|
||||
#
|
||||
|
||||
.depend:
|
||||
ocamldep -I ../lib/ocaml *.ml* > .depend
|
||||
.depend: Makefile
|
||||
$(OCAMLDEP) -I $(LIBPPRZDIR) *.ml* > .depend
|
||||
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
-include .depend
|
||||
|
||||
+25
-24
@@ -1,4 +1,4 @@
|
||||
# $Id$
|
||||
# Hey Emacs, this is a -*- makefile -*-
|
||||
#
|
||||
# Copyright (C) 2003-2006 Pascal Brisset, Antoine Drouin
|
||||
#
|
||||
@@ -24,41 +24,37 @@ Q=@
|
||||
|
||||
OCAML=ocaml
|
||||
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)
|
||||
OCAMLNETCMA=$(shell ocamlfind query -r -a-format -predicates byte netstring) $(shell ocamlfind query -r -a-format -predicates byte netclient)
|
||||
OCAMLLEX=ocamllex
|
||||
OCAMLYACC=ocamlyacc
|
||||
LIBPPRZCMA=$(LIBPPRZDIR)/lib-pprz.cma
|
||||
|
||||
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
|
||||
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 $@
|
||||
$(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_flight_plan.cmo : fp_proc.cmi
|
||||
|
||||
gen_common.cmo : gen_common.cmi
|
||||
|
||||
gen_srtm.out : ../lib/ocaml/lib-pprz.cma
|
||||
gen_srtm.out : gen_common.cmo
|
||||
@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 $^
|
||||
|
||||
mergelogs: mergelogs.c
|
||||
gcc mergelogs.c -o mergelogs
|
||||
|
||||
%.out : %.ml gen_common.ml Makefile
|
||||
%.out : %.ml gen_common.cmo $(LIBPPRZCMA)
|
||||
@echo OC $<
|
||||
$(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 > $@
|
||||
@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 $@
|
||||
|
||||
%.cmo : %.ml ../lib/ocaml/lib-pprz.cma
|
||||
%.cmo : %.ml
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||
|
||||
@@ -66,17 +62,22 @@ mergelogs: mergelogs.c
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLC) $(INCLUDES) -c $<
|
||||
|
||||
%.ml : %.mll
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLLEX) $<
|
||||
# dependency on lib-pprz
|
||||
gen_flight_plan.out gen_srtm.out : $(LIBPPRZCMA)
|
||||
|
||||
%.ml : %.mly
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLYACC) $<
|
||||
|
||||
%.mli : %.mly
|
||||
@echo OC $<
|
||||
$(Q)$(OCAMLYACC) $<
|
||||
|
||||
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