1# 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# 19AUTOMAKE_OPTIONS = subdir-objects serial-tests nostdinc 20 21BUILT_SOURCES = gen-cpp/shared_types.cpp \ 22 gen-cpp/tutorial_types.cpp 23 24noinst_LTLIBRARIES = libtutorialgencpp.la 25nodist_libtutorialgencpp_la_SOURCES = \ 26 gen-cpp/Calculator.cpp \ 27 gen-cpp/Calculator.h \ 28 gen-cpp/SharedService.cpp \ 29 gen-cpp/SharedService.h \ 30 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 36 37 38 39libtutorialgencpp_la_LIBADD = $(top_builddir)/lib/cpp/libthrift.la 40 41noinst_PROGRAMS = \ 42 TutorialServer \ 43 TutorialClient 44 45TutorialServer_SOURCES = \ 46 CppServer.cpp 47 48TutorialServer_LDADD = \ 49 libtutorialgencpp.la \ 50 $(top_builddir)/lib/cpp/libthrift.la 51 52TutorialClient_SOURCES = \ 53 CppClient.cpp 54 55TutorialClient_LDADD = \ 56 libtutorialgencpp.la \ 57 $(top_builddir)/lib/cpp/libthrift.la 58 59# 60# Common thrift code generation rules 61# 62gen-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 63 $(THRIFT) --gen cpp -r $< 64 65AM_CPPFLAGS = $(BOOST_CPPFLAGS) $(LIBEVENT_CPPFLAGS) -I$(top_srcdir)/lib/cpp/src -Igen-cpp 66AM_CXXFLAGS = -Wall -Wextra -pedantic 67AM_LDFLAGS = $(BOOST_LDFLAGS) $(LIBEVENT_LDFLAGS) 68 69clean-local: 70 $(RM) gen-cpp/* 71 72tutorialserver: all 73 ./TutorialServer 74 75tutorialclient: all 76 ./TutorialClient 77 78style-local: 79 $(CPPSTYLE_CMD) 80 81EXTRA_DIST = \ 82 CMakeLists.txt \ 83 CppClient.cpp \ 84 CppServer.cpp 85