blob: 37729848825e38dd3c047f729fd14b3561693584 [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
Roger Meier81a1f992014-10-22 14:09:43 +020021AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) @GCOV_CFLAGS@
Roger Meier2814c2e2014-07-29 23:28:46 +020022AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
23AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) @GCOV_LDFLAGS@
24
25THRIFT = $(top_builddir)/compiler/cpp/thrift
26
Roger Meier2814c2e2014-07-29 23:28:46 +020027noinst_LTLIBRARIES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020028 libtutorialgencglib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020029
30nodist_libtutorialgencglib_la_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020031 gen-c_glib/calculator.c \
32 gen-c_glib/calculator.h \
33 gen-c_glib/shared_service.c \
34 gen-c_glib/shared_service.h \
35 gen-c_glib/shared_types.c \
36 gen-c_glib/shared_types.h \
37 gen-c_glib/tutorial_types.c \
38 gen-c_glib/tutorial_types.h
Roger Meier2814c2e2014-07-29 23:28:46 +020039
40libtutorialgencglib_la_LIBADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020041 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020042
43
44noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020045 tutorial_server \
46 tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020047
Roger Meier4606d7d2014-09-29 21:01:58 +020048tutorial_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020049 c_glib_server.c
Roger Meier4606d7d2014-09-29 21:01:58 +020050
51tutorial_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020052 libtutorialgencglib.la \
53 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier4606d7d2014-09-29 21:01:58 +020054
Roger Meier2814c2e2014-07-29 23:28:46 +020055tutorial_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020056 c_glib_client.c
Roger Meier2814c2e2014-07-29 23:28:46 +020057
58tutorial_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020059 libtutorialgencglib.la \
60 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020061
62
63$(nodist_libtutorialgencglib_la_SOURCES): $(top_srcdir)/tutorial/tutorial.thrift
Jens Geyer79f988c2014-10-03 20:42:54 +020064 $(THRIFT) --gen c_glib -r $<
Roger Meier2814c2e2014-07-29 23:28:46 +020065
66clean-local:
Jens Geyer79f988c2014-10-03 20:42:54 +020067 $(RM) -r gen-c_glib
Roger Meier2814c2e2014-07-29 23:28:46 +020068
Roger Meier4606d7d2014-09-29 21:01:58 +020069tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020070 ./tutorial_server
Roger Meier4606d7d2014-09-29 21:01:58 +020071
Roger Meier2814c2e2014-07-29 23:28:46 +020072tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020073 ./tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020074
75EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020076 c_glib_server.c \
77 c_glib_client.c