mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-05 01:12:55 +03:00
Doing up some housekeeping around the used CFLAGS. To be more generic put the default declaration for additional warning CFLAGS into configure.ac and clean up the Makefile.am's. There are the default CFLAGS variable that is a global variable if not re adjusted inside the different targets. The second variable for CFLAGS is the AM_CFLAGS definition that is used inside a Makefile as a global variable. There is also the possibility to graduate the CFLAGS for a single target. But currently there are nothing more than one target within each Makefile so we can set for now the target specific CFLAGS to the AM_CFLAGS. A new variable called WARNING_CFLAGS is inside the configure.ac created, this variable holds all the warnings flags inside. The Makefile.am's are taking the values and is setting the variable AM_CFLAGS which is used in the target specific CFLAGS. Also the options 'DWITH_POSIX' and 'D_GNU_SOURCE' are now appended to the CFLAGS if the configure script is detecting a *-[uc]linux* system.
39 lines
953 B
Makefile
39 lines
953 B
Makefile
# doc/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 anything if 'HAVE_CUNIT' is defined
|
|
if HAVE_CUNIT
|
|
|
|
# picking up the default warning CFLAGS
|
|
AM_CFLAGS = $(WARNING_CFLAGS) -std=c99
|
|
|
|
noinst_PROGRAMS = \
|
|
testdriver
|
|
|
|
testdriver_SOURCES = \
|
|
testdriver.c \
|
|
test_error_response.c \
|
|
test_options.c \
|
|
test_pdu.c \
|
|
test_sendqueue.c \
|
|
test_uri.c \
|
|
test_wellknown.c
|
|
|
|
testdriver_LDADD = @CUNIT_LIBS@ @top_builddir@/.libs/libcoap-$(LIBCOAP_API_VERSION).a
|
|
|
|
# If there is a API change to something $(LIBCOAP_API_VERSION) > 1 there is
|
|
# nothing to adopt here. No needed to implement something here because the test
|
|
# unit will always be build againts the actual header files!
|
|
#
|
|
testdriver_CFLAGS = -I @top_builddir@/include/coap/ $(AM_CFLAGS)
|
|
|
|
CLEANFILES = testdriver
|
|
|
|
all-am: testdriver
|
|
|
|
endif # HAVE_CUNIT
|