mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-30 14:35:48 +03:00
This change excludes the coap subdirectory from the include path reported by pkg-config --cflags to avoid name conflicts with other installed packages. Applications now must add the prefix 'coap/' to include directives for libcoap header files, e.g. #include <coap/coap.h> Jean-Claude Michelou has reported this problem in Bug #82 [1]. [1] https://github.com/obgm/libcoap/issues/82 A minimal Makefile now could look be written as: PKG_LIBCOAP=libcoap-1 CPPFLAGS=$(shell pkg-config --cflags-only-I $(PKG_LIBCOAP)) -DWITH_POSIX LDFLAGS=$(shell pkg-config --libs-only-L $(PKG_LIBCOAP)) LDLIBS=$(shell pkg-config --libs-only-l $(PKG_LIBCOAP))
45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
# examples/Makefile.am
|
|
#
|
|
# Copyright (C) 2015 Carsten Schoenert <c.schoenert@t-online.de>
|
|
#
|
|
# This file is part of the CoAP C library libcoap. Please see README and
|
|
# COPYING for terms of use.
|
|
|
|
# just do nothing if 'BUILD_EXAMPLES' isn't defined
|
|
if BUILD_EXAMPLES
|
|
|
|
# picking up the default warning CFLAGS into AM_CFLAGS
|
|
AM_CFLAGS = -isystem$(top_builddir)/include -I$(top_srcdir)/include $(WARNING_CFLAGS) -std=c99
|
|
|
|
# etsi_iot_01 and tiny are missing
|
|
bin_PROGRAMS = coap-client coap-server coap-rd
|
|
|
|
coap_client_SOURCES = client.c coap_list.c
|
|
coap_client_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la
|
|
|
|
coap_server_SOURCES = coap-server.c
|
|
coap_server_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la
|
|
|
|
coap_rd_SOURCES = coap-rd.c
|
|
coap_rd_LDADD = $(top_builddir)/.libs/libcoap-$(LIBCOAP_API_VERSION).la
|
|
|
|
# build manuals only if 'BUILD_DOCUMENTATION' is defined
|
|
if BUILD_DOCUMENTATION
|
|
|
|
# building the manpages
|
|
TXT5 = coap-client.txt \
|
|
coap-rd.txt \
|
|
coap-server.txt
|
|
|
|
MAN5 = $(TXT5:%.txt=%.5)
|
|
|
|
man5_MANS = $(MAN5)
|
|
|
|
.txt.5:
|
|
$(A2X) --doctype manpage --format manpage $<
|
|
|
|
CLEANFILES = *.5
|
|
endif # BUILD_DOCUMENTATION
|
|
|
|
endif # BUILD_EXAMPLES
|