Files
paparazzi/Makefile.gen
T
2005-02-24 17:06:26 +00:00

58 lines
1.7 KiB
Makefile

# Paparazzi main $Id$
# 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.
# Preprocessing of XML configuration files
include conf/Makefile.local
CONF=conf
XML_GET=sw/lib/ocaml/xml_get.out
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
MESSAGES_H=$(STATICINCLUDE)/messages.h
UBX_PROTOCOL_H=$(STATICINCLUDE)/ubx_protocol.h
MESSAGES_XML = $(CONF)/messages.xml
UBX_XML = $(CONF)/ubx.xml
FBW_MESSAGES_H=$(STATICINCLUDE)/fbw_messages.h
static: $(MESSAGES_H) $(UBX_PROTOCOL_H) $(FBW_MESSAGES_H)
$(MESSAGES_H) : $(MESSAGES_XML) $(CONF_XML)
test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
TMP_FILE=`mktemp`;\
$(TOOLS)/gen_messages.out $< telemetry_ap > $$TMP_FILE;\
mv $$TMP_FILE $@
chmod a+r $@
$(FBW_MESSAGES_H) : $(MESSAGES_XML) $(CONF_XML)
TMP_FILE=`mktemp`;\
$(TOOLS)/gen_messages.out $< telemetry_fbw > $$TMP_FILE;\
mv $$TMP_FILE $@
chmod a+r $@
$(UBX_PROTOCOL_H) : $(UBX_XML) $(CONF_XML)
$(TOOLS)/gen_ubx.out $< > /tmp/ubx.h
mv /tmp/ubx.h $@
clean :
rm -f $(H_OF_XML)