blob: 77fd6d579cddacdecd97d997bf13928b1926fafd [file] [log] [blame]
Roger Meier18a90d12012-10-24 18:40:06 +00001#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under the License is distributed on an
14# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15# KIND, either express or implied. See the License for the
16# specific language governing permissions and limitations
17# under the License.
18#
Kevin Wojniaka3925662019-07-01 11:07:45 -070019AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc
Roger Meier81a1f992014-10-22 14:09:43 +020020
Nobuaki Sukegawaa0c5ab72015-02-01 00:27:12 +090021BUILT_SOURCES = gen-cpp/shared_types.cpp \
22 gen-cpp/tutorial_types.cpp
23
Roger Meier18a90d12012-10-24 18:40:06 +000024noinst_LTLIBRARIES = libtutorialgencpp.la
25nodist_libtutorialgencpp_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020026 gen-cpp/Calculator.cpp \
27 gen-cpp/Calculator.h \
28 gen-cpp/SharedService.cpp \
29 gen-cpp/SharedService.h \
Jens Geyer79f988c2014-10-03 20:42:54 +020030 gen-cpp/shared_types.cpp \
31 gen-cpp/shared_types.h \
32 gen-cpp/tutorial_constants.cpp \
33 gen-cpp/tutorial_constants.h \
34 gen-cpp/tutorial_types.cpp \
35 gen-cpp/tutorial_types.h
Roger Meier18a90d12012-10-24 18:40:06 +000036
37
38
39libtutorialgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la
40
41noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020042 TutorialServer \
43 TutorialClient
Roger Meier18a90d12012-10-24 18:40:06 +000044
45TutorialServer_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020046 CppServer.cpp
Roger Meier18a90d12012-10-24 18:40:06 +000047
48TutorialServer_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020049 libtutorialgencpp.la \
50 $(top_builddir)/lib/cpp/libthrift.la
Roger Meier18a90d12012-10-24 18:40:06 +000051
52TutorialClient_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 CppClient.cpp
Roger Meier18a90d12012-10-24 18:40:06 +000054
55TutorialClient_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020056 libtutorialgencpp.la \
57 $(top_builddir)/lib/cpp/libthrift.la
Roger Meier18a90d12012-10-24 18:40:06 +000058
59#
60# Common thrift code generation rules
61#
zeshuai00757c25072020-04-09 11:17:05 +080062gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp: $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020063 $(THRIFT) --gen cpp -r $<
Roger Meier18a90d12012-10-24 18:40:06 +000064
Konrad Grochowski1ff4a972014-09-19 23:57:57 +020065AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp
Roger Meierec300e32014-10-13 02:13:35 +020066AM_CXXFLAGS = -Wall -Wextra -pedantic
Roger Meier18a90d12012-10-24 18:40:06 +000067AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS)
68
69clean-local:
Roger Meierf57b57a2015-11-03 23:28:43 +010070 $(RM) gen-cpp/*
Roger Meier18a90d12012-10-24 18:40:06 +000071
72tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020073 ./TutorialServer
Roger Meier18a90d12012-10-24 18:40:06 +000074
75tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020076 ./TutorialClient
Roger Meier18a90d12012-10-24 18:40:06 +000077
Konrad Grochowski16a23a62014-11-13 15:33:38 +010078style-local:
79 $(CPPSTYLE_CMD)
80
Roger Meier18a90d12012-10-24 18:40:06 +000081EXTRA_DIST = \
jfarrellf13e4312015-08-25 00:39:29 -040082 CMakeLists.txt \
Jens Geyer79f988c2014-10-03 20:42:54 +020083 CppClient.cpp \
84 CppServer.cpp