Files
paparazzi/Makefile.gen
T
2006-04-26 22:46:07 +00:00

62 lines
1.8 KiB
Makefile

# Hey Emacs, this is a -*- makefile -*-
#
# Paparazzi main $Id$
# Copyright (C) 2004-2006 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
# Quiet compilation
Q=@
include conf/Makefile.local
CONF=conf
XML_GET=sw/lib/ocaml/xml_get.out
STATICINCLUDE =$(PAPARAZZI_HOME)/var/include
MESSAGES_H=$(STATICINCLUDE)/messages.h
MESSAGES_FBW_H=$(STATICINCLUDE)/messages_fbw.h
UBX_PROTOCOL_H=$(STATICINCLUDE)/ubx_protocol.h
DL_PROTOCOL_H=$(STATICINCLUDE)/dl_protocol.h
MESSAGES_XML = $(CONF)/messages.xml
UBX_XML = $(CONF)/ubx.xml
static: $(MESSAGES_H) $(UBX_PROTOCOL_H) $(DL_PROTOCOL_H)
$(MESSAGES_H) : $(MESSAGES_XML) $(CONF_XML) $(TOOLS)/gen_messages.out
$(Q)test -d $(STATICINCLUDE) || mkdir -p $(STATICINCLUDE)
@echo BUILD $@
$(Q)$(TOOLS)/gen_messages.out $< telemetry > /tmp/msg.h
$(Q)mv /tmp/msg.h $@
$(Q)chmod a+r $@
$(UBX_PROTOCOL_H) : $(UBX_XML)
@echo BUILD $@
$(Q)$(TOOLS)/gen_ubx.out $< > /tmp/ubx.h
$(Q)mv /tmp/ubx.h $@
$(DL_PROTOCOL_H) : $(MESSAGES_XML)
@echo BUILD $@
$(Q)$(TOOLS)/gen_messages.out $< datalink > /tmp/dl.h
$(Q)mv /tmp/dl.h $@
clean :
rm -f $(H_OF_XML)