blob: 15a9995df005a8dba2935cec9f6c897905a3cb56 [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
James E. King, III36628a22017-02-13 15:25:41 -050027AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSSL_INCLUDES) @GCOV_CFLAGS@
Roger Meier2814c2e2014-07-29 23:28:46 +020028AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
James E. King, III36628a22017-02-13 15:25:41 -050029AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) @GCOV_LDFLAGS@
Roger Meier2814c2e2014-07-29 23:28:46 +020030
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
Jens Geyerf6eebba2015-07-30 20:48:40 +020049libtutorialgencglib_la_CFLAGS = \
50 $(AM_CFLAGS) -Wno-unused-function
Roger Meier2814c2e2014-07-29 23:28:46 +020051
52noinst_PROGRAMS = \
Jens Geyer79f988c2014-10-03 20:42:54 +020053 tutorial_server \
54 tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020055
Roger Meier4606d7d2014-09-29 21:01:58 +020056tutorial_server_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020057 c_glib_server.c
James E. King, III36628a22017-02-13 15:25:41 -050058tutorial_server_LDFLAGS = $(OPENSSL_LIBS)
Roger Meier4606d7d2014-09-29 21:01:58 +020059
60tutorial_server_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020061 libtutorialgencglib.la \
62 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier4606d7d2014-09-29 21:01:58 +020063
Roger Meier2814c2e2014-07-29 23:28:46 +020064tutorial_client_SOURCES = \
Jens Geyer79f988c2014-10-03 20:42:54 +020065 c_glib_client.c
Roger Meier2814c2e2014-07-29 23:28:46 +020066
67tutorial_client_LDADD = \
Jens Geyer79f988c2014-10-03 20:42:54 +020068 libtutorialgencglib.la \
69 $(top_builddir)/lib/c_glib/libthrift_c_glib.la
Roger Meier2814c2e2014-07-29 23:28:46 +020070
71
Roger Meier4712f8c2014-11-08 23:19:02 +010072gen-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 +020073 $(THRIFT) --gen c_glib -r $<
Roger Meier2814c2e2014-07-29 23:28:46 +020074
75clean-local:
Jens Geyer8c5fce92015-07-28 22:59:16 +020076 $(RM) gen-c_glib/*
Roger Meier2814c2e2014-07-29 23:28:46 +020077
Roger Meier4606d7d2014-09-29 21:01:58 +020078tutorialserver: all
Jens Geyer79f988c2014-10-03 20:42:54 +020079 ./tutorial_server
Roger Meier4606d7d2014-09-29 21:01:58 +020080
Roger Meier2814c2e2014-07-29 23:28:46 +020081tutorialclient: all
Jens Geyer79f988c2014-10-03 20:42:54 +020082 ./tutorial_client
Roger Meier2814c2e2014-07-29 23:28:46 +020083
84EXTRA_DIST = \
Jens Geyer79f988c2014-10-03 20:42:54 +020085 c_glib_server.c \
86 c_glib_client.c