paxos/Makefile.am

107 lines
2.2 KiB
Makefile
Raw Normal View History

2020-05-05 11:11:48 +00:00
NULL =
EXTRA_DIST = autogen.sh
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
AM_MAKEFLAGS = --no-print-directory
AM_CPPFLAGS = \
-include $(top_builddir)/config.h \
-I${top_srcdir}/src \
-I${top_srcdir}/lib
AM_CXXFLAGS = \
$(WARN_CXXFLAGS) \
$(BOOST_CPPFLAGS) \
-Werror=unused-parameter \
-Werror=missing-field-initializers \
-Werror=overloaded-virtual \
-Wno-inline \
$(NULL)
AM_LDFLAGS = \
$(WARN_LDFLAGS) \
$(BOOST_LDFLAGS) \
-lev \
-lssl \
-lcrypto \
-lstdc++fs \
$(NULL)
AM_LDFLAGS += \
-Wno-unused-command-line-argument \
$(NULL)
bin_PROGRAMS = paxos
CONFIG = \
src/config/config.cc \
2020-05-05 12:11:54 +00:00
src/config/parse.cc
2020-05-05 11:11:48 +00:00
MISC = \
src/misc/addrinfo/addrinfo-error.cc \
src/misc/addrinfo/addrinfo.cc \
src/misc/fd.cc \
src/misc/logger.cc \
2020-05-05 13:39:59 +00:00
src/misc/buffer.cc
2020-05-05 11:11:48 +00:00
MESSAGE = \
src/message/message.cc
2020-05-05 11:11:48 +00:00
EVENTS = \
src/events/event-loop.cc \
src/events/events.cc \
src/events/listener.cc \
src/events/register.cc \
src/events/receive.cc \
2020-05-05 13:39:59 +00:00
src/events/send.cc
2020-05-05 11:11:48 +00:00
2020-05-05 12:47:12 +00:00
LEGISLATOR = \
src/legislator/legislator.cc \
2020-05-05 17:29:14 +00:00
src/legislator/legislator-factory.cc \
src/legislator/ledger.cc
2020-05-05 12:47:12 +00:00
2020-05-05 11:11:48 +00:00
SOCKET = \
src/socket/default-socket.cc \
2020-05-06 18:00:01 +00:00
src/connection/connection.cc
2020-05-05 11:11:48 +00:00
SOURCES = \
$(CONFIG) \
2020-05-05 13:39:59 +00:00
$(EVENTS) \
2020-05-05 12:47:12 +00:00
$(LEGISLATOR) \
$(MESSAGE) \
2020-05-05 11:11:48 +00:00
$(MISC) \
$(SOCKET) \
$(SCHEDULER) \
$(NULL)
paxos_SOURCES = \
2020-05-05 12:11:54 +00:00
$(SOURCES) \
2020-05-05 11:11:48 +00:00
src/main.cc \
$(NULL)
# https://www.gnu.org/software/automake/manual/html_node/Objects-created-both-with-libtool-and-without.html
paxos_CXXFLAGS = $(AM_CXXFLAGS)
#Unit tests
if USING_CRITERION
# Criterion rules.
#test_%: tests/test_%/test_%.cc
# $(CXX) -o $@ $^ -lcriterion
unit: $(TESTS_UNIT) $(SOURCES)
for t in $(TESTS_UNIT); do \
./$$t ; \
done;
tap: $(TESTS_UNIT) $(SOURCES)
for t in $(TESTS_UNIT); do \
./$$t --tap; \
done;
endif