On 5 August 2015 at 21:03, Baptiste Clenet <[email protected]> wrote:
> 2015-08-05 14:58 GMT+02:00 Yousong Zhou <[email protected]>:
>> On 5 August 2015 at 16:09, Baptiste Clenet <[email protected]> wrote:
>>>
>>> define Build/Compile
>>> $(MAKE) -C $(PKG_BUILD_DIR) \
>>> $(TARGET_CONFIGURE_OPTS) \
>>> CFLAGS="$(TARGET_CFLAGS) -I$(PKG_BUILD_DIR)" \
>>> CPPFLAGS="$(TARGET_CPPFLAGS) -I$(PKG_BUILD_DIR)" \
>>> LDFLAGS="$(TARGET_LDFLAGS) -L$(PKG_BUILD_DIR) -lcoap"
>>> endef
>>>
>>
>> Ahh, this should be the cause. Just dropping this section then the
>> package should compile.
>>
>> yousong
>
> Yes it was, thanks!
> Could give details why it didn't work then?
> If I am right, the compilation is done by libcoap itself so we don't
> need Build/Compile?
> It's not totally clear for me.
>
The problem is that values of variables from command line has higher
precedence over assignment within Makefile itself (the "override"
directive is an exception). The configure step run prior to compile
correctly set WITH_POSIX macro with CPPFLAGS within the generated
Makefile. But the way Build/Compile was defined preciously will
override the CPPFLAGS with a value without the -DWITH_POSIX.
yousong
>
> --
> Baptiste
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel