From f1b8a48bfca8652e49cb86a114b15601de192b81 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Wed, 4 Mar 2015 13:22:05 +0100 Subject: [PATCH] Fix source path and include flag for Contiki build As the libcoap sources have been moved to the sub-directory src it must be added to the vpath. The header files now reside in include/coap, so we need an additional -I compiler flag for this. The root path for libcoap is derived from the variable APPDS which is set by $(CONTIKI)/Makefile.include. This is a bit fragile but the best we have... --- Makefile.libcoap | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile.libcoap b/Makefile.libcoap index 65d05e97..bd51e8c1 100644 --- a/Makefile.libcoap +++ b/Makefile.libcoap @@ -1 +1,7 @@ libcoap_src = pdu.c net.c debug.c encode.c uri.c subscribe.c resource.c hashkey.c str.c option.c async.c block.c mem.c coap_io.c + +libcoap_dir := $(filter %libcoap,$(APPDS)) +vpath %c $(libcoap_dir)/src + +# set include path for coap sources +CFLAGS += -I$(libcoap_dir)/include/coap