blob: 24075dd496ea17594fdb06309827b61023cd9377 [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#
19
20AM_CFLAGS = -g -Wall -Wextra $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) @GCOV_CFLAGS@
21AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
22AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
23
24THRIFT = $(top_builddir)/compiler/cpp/thrift
25
26
27.NOTPARALLEL:
28noinst_LTLIBRARIES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020029 libtutorialgencglib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020030
31nodist_libtutorialgencglib_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020032 gen-c_glib/calculator.c \
33 gen-c_glib/calculator.h \
34 gen-c_glib/shared_service.c \
35 gen-c_glib/shared_service.h \
36 gen-c_glib/shared_types.c \
37 gen-c_glib/shared_types.h \
38 gen-c_glib/tutorial_types.c \
39 gen-c_glib/tutorial_types.h
Roger Meier2814c2e2014-07-29 23:28:46 +020040
41libtutorialgencglib_la_LIBADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020042 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020043
44
45noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020046 tutorial_server \
47 tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020048
Roger Meier4606d7d2014-09-29 21:01:58 +020049tutorial_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020050 c_glib_server.c
Roger Meier4606d7d2014-09-29 21:01:58 +020051
52tutorial_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 libtutorialgencglib.la \
54 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier4606d7d2014-09-29 21:01:58 +020055
Roger Meier2814c2e2014-07-29 23:28:46 +020056tutorial_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020057 c_glib_client.c
Roger Meier2814c2e2014-07-29 23:28:46 +020058
59tutorial_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020060 libtutorialgencglib.la \
61 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020062
63
64$(nodist_libtutorialgencglib_la_SOURCES): $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020065 $(THRIFT) --gen c_glib -r $<
Roger Meier2814c2e2014-07-29 23:28:46 +020066
67clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020068 $(RM) -r gen-c_glib
Roger Meier2814c2e2014-07-29 23:28:46 +020069
Roger Meier4606d7d2014-09-29 21:01:58 +020070tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020071 ./tutorial_server
Roger Meier4606d7d2014-09-29 21:01:58 +020072
Roger Meier2814c2e2014-07-29 23:28:46 +020073tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020074 ./tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020075
76EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020077 c_glib_server.c \
78 c_glib_client.c