1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-23 00:00:01 +01:00
VILLASnode/lib/io/Makefile.inc

42 lines
1.5 KiB
PHP
Raw Normal View History

2017-07-28 18:11:52 +02:00
# Makefile.
#
# @author Steffen Vogel <stvogel@eonerc.rwth-aachen.de>
# @copyright 2017, Institute for Automation of Complex Power Systems, EONERC
# @license GNU General Public License (version 3)
#
# VILLASnode
#
# This program 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 3 of the License, or
# any later version.
#
# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
###################################################################################
2018-04-09 08:28:21 +02:00
LIB_FORMATS += json json-reserve villas_binary villas_human csv raw
LIB_SRCS += lib/io/msg.c
2017-10-27 19:16:09 +02:00
# Enable Google Protobuf IO format
ifeq ($(WITH_FORMAT_PROTOBUF),1)
2017-10-27 19:16:09 +02:00
ifeq ($(shell $(PKGCONFIG) libprotobuf-c; echo $$?),0)
LIB_SRCS += lib/io/protobuf.c lib/io/villas.pb-c.c
LIB_PKGS += libprotobuf-c
LIB_FORMATS += protobuf
2017-10-27 19:16:09 +02:00
endif
endif
2017-10-28 16:45:38 +02:00
%.pb-c.c %.pb-c.h: %.proto
2018-02-17 11:18:10 +01:00
protoc-c --proto_path=$(SRCDIR) --c_out=$(SRCDIR) --dependency_out=$(BUILDDIR)/$*.d $(realpath $^)
2018-02-17 11:18:10 +01:00
$(BUILDDIR)/%.pb-c.o: LIB_CFLAGS += -I$(SRCDIR)
$(BUILDDIR)/lib/io/protobuf.o: LIB_CFLAGS += -I$(SRCDIR)/lib/io
$(BUILDDIR)/lib/io/protobuf.o: lib/io/villas.pb-c.h