1# examples/Makefile.am
2#
3# Copyright (C)      2015 Carsten Schoenert <c.schoenert@t-online.de>
4#
5# This file is part of the CoAP C library libcoap. Please see README and
6# COPYING for terms of use.
7
8# just do nothing if 'BUILD_EXAMPLES' isn't defined
9if BUILD_EXAMPLES
10
11# picking up the default warning CFLAGS into AM_CFLAGS
12AM_CFLAGS = -isystem@top_builddir@/include/coap/ $(WARNING_CFLAGS) -std=c99
13
14# etsi_iot_01 and tiny are missing
15bin_PROGRAMS = coap-client coap-server coap-rd
16
17coap_client_SOURCES = client.c coap_list.c
18coap_client_LDADD = @top_builddir@/.libs/libcoap-$(LIBCOAP_API_VERSION).la
19
20coap_server_SOURCES = coap-server.c
21coap_server_LDADD = @top_builddir@/.libs/libcoap-$(LIBCOAP_API_VERSION).la
22
23coap_rd_SOURCES = coap-rd.c
24coap_rd_LDADD = @top_builddir@/.libs/libcoap-$(LIBCOAP_API_VERSION).la
25
26# build manuals only if 'BUILD_DOCUMENTATION' is defined
27if BUILD_DOCUMENTATION
28
29# building the manpages
30TXT5 = coap-client.txt \
31       coap-rd.txt \
32       coap-server.txt
33
34MAN5 = $(TXT5:%.txt=%.5)
35
36man5_MANS = $(MAN5)
37
38.txt.5:
39	$(A2X) --doctype manpage --format manpage $<
40
41CLEANFILES = *.5
42endif # BUILD_DOCUMENTATION
43
44endif # BUILD_EXAMPLES
45