blob: 252edb9baba44e305a624dce114a6c1298cb28c5 [file] [log] [blame]
Roger Meierb3c84092014-09-01 21:53:40 +02001#
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#
Roger Meier81a1f992014-10-22 14:09:43 +020019AUTOMAKE_OPTIONS = subdir-objects serial-tests
20
Roger Meierb3c84092014-09-01 21:53:40 +020021noinst_LTLIBRARIES = libtestcglib.la
22nodist_libtestcglib_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020023 gen-c_glib/t_test_second_service.c \
24 gen-c_glib/t_test_second_service.h \
25 gen-c_glib/t_test_thrift_test.c \
26 gen-c_glib/t_test_thrift_test.h \
27 gen-c_glib/t_test_thrift_test_types.c \
28 gen-c_glib/t_test_thrift_test_types.h
Roger Meierb3c84092014-09-01 21:53:40 +020029
30libtestcglib_la_LIBADD = $(top_builddir)/lib/c_glib/libthrift_c_glib.la
31
32check_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020033 test_client \
34 test_server
Roger Meierb3c84092014-09-01 21:53:40 +020035
36test_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020037 src/test_client.c
Roger Meierb3c84092014-09-01 21:53:40 +020038
39test_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020040 libtestcglib.la \
41 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meierb3c84092014-09-01 21:53:40 +020042
Roger Meier15df0762014-09-29 20:50:56 +020043test_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020044 src/thrift_test_handler.c \
45 src/thrift_test_handler.h \
46 src/test_server.c
Roger Meier15df0762014-09-29 20:50:56 +020047
48test_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020049 libtestcglib.la \
50 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier15df0762014-09-29 20:50:56 +020051
Roger Meierb3c84092014-09-01 21:53:40 +020052#
53# Common thrift code generation rules
54#
55THRIFT = $(top_builddir)/compiler/cpp/thrift
56
57gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h: $(top_srcdir)/test/ThriftTest.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020058 $(THRIFT) --gen c_glib -r $<
Roger Meierb3c84092014-09-01 21:53:40 +020059
60AM_CFLAGS = -g -Wall -Wextra $(GLIB_CFLAGS) $(GOBJECT_CFLAGS)
61AM_CXXFLAGS = $(AM_CFLAGS)
62AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
63AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
64
65clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020066 $(RM) -r gen-c_glib
Roger Meierb3c84092014-09-01 21:53:40 +020067
68EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020069 src/test_client.c \
70 src/thrift_test_handler.c \
71 src/thrift_test_handler.h \
72 src/test_server.c