blob: 43748c0a5f9f326cb8f4a01538630172219b474b [file] [log] [blame]
Roger Meier2814c2e2014-07-29 23:28:46 +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
Roger Meier2814c2e2014-07-29 23:28:46 +020020
Nobuaki Sukegawaef0a8fa2015-05-10 20:21:17 +090021BUILT_SOURCES = \
22 gen-c_glib/calculator.h \
23 gen-c_glib/shared_service.h \
24 gen-c_glib/shared_types.h \
25 gen-c_glib/tutorial_types.h
26
Roger Meier81a1f992014-10-22 14:09:43 +020027AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) @GCOV_CFLAGS@
Roger Meier2814c2e2014-07-29 23:28:46 +020028AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
29AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
30
31THRIFT = $(top_builddir)/compiler/cpp/thrift
32
Roger Meier2814c2e2014-07-29 23:28:46 +020033noinst_LTLIBRARIES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020034 libtutorialgencglib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020035
36nodist_libtutorialgencglib_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020037 gen-c_glib/calculator.c \
38 gen-c_glib/calculator.h \
39 gen-c_glib/shared_service.c \
40 gen-c_glib/shared_service.h \
41 gen-c_glib/shared_types.c \
42 gen-c_glib/shared_types.h \
43 gen-c_glib/tutorial_types.c \
44 gen-c_glib/tutorial_types.h
Roger Meier2814c2e2014-07-29 23:28:46 +020045
46libtutorialgencglib_la_LIBADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020047 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020048
49
50noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020051 tutorial_server \
52 tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020053
Roger Meier4606d7d2014-09-29 21:01:58 +020054tutorial_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020055 c_glib_server.c
Roger Meier4606d7d2014-09-29 21:01:58 +020056
57tutorial_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020058 libtutorialgencglib.la \
59 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier4606d7d2014-09-29 21:01:58 +020060
Roger Meier2814c2e2014-07-29 23:28:46 +020061tutorial_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020062 c_glib_client.c
Roger Meier2814c2e2014-07-29 23:28:46 +020063
64tutorial_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020065 libtutorialgencglib.la \
66 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020067
68
Roger Meier4712f8c2014-11-08 23:19:02 +010069gen-c_glib/calculator.c gen-c_glib/calculator.h gen-c_glib/shared_service.c gen-c_glib/shared_service.h gen-c_glib/shared_types.c gen-c_glib/shared_types.h gen-c_glib/tutorial_types.c gen-c_glib/tutorial_types.h: $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020070 $(THRIFT) --gen c_glib -r $<
Roger Meier2814c2e2014-07-29 23:28:46 +020071
72clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020073 $(RM) -r gen-c_glib
Roger Meier2814c2e2014-07-29 23:28:46 +020074
Roger Meier4606d7d2014-09-29 21:01:58 +020075tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020076 ./tutorial_server
Roger Meier4606d7d2014-09-29 21:01:58 +020077
Roger Meier2814c2e2014-07-29 23:28:46 +020078tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020079 ./tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020080
81EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020082 c_glib_server.c \
83 c_glib_client.c