[OpenWrt-Devel] package libcoap for OpenWRT, Makefile
yszhou4tech at gmail.com
Wed Aug 5 09:20:01 EDT 2015
On 5 August 2015 at 21:03, Baptiste Clenet <bapclenet at gmail.com> wrote:
> 2015-08-05 14:58 GMT+02:00 Yousong Zhou <yszhou4tech at gmail.com>:
>> On 5 August 2015 at 16:09, Baptiste Clenet <bapclenet at gmail.com> 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"
>> Ahh, this should be the cause. Just dropping this section then the
>> package should compile.
> 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.
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel