Reading this [1] it looks like you are not setting the openWRT's
CFLAGS for the compilation but use the PIMD defaults. Reading the PIMD
makefile, I'd suggest to add this at the end of your $(MAKE) line :

USERCOMPILE="$TARGET_CFLAGS"

This is awesome !!! Everythings seems to be working, only the line should be USERCOMPILE="$(TARGET_FLAGS)" I will share (attached) final makefile, which seems to be working and its now possible to include pimd into SDK build. Thank you Mickael !!!
#
# Copyright (C) 2009 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#

include $(TOPDIR)/rules.mk

PKG_NAME:=pimd
PKG_VERSION:=2.1.8
PKG_RELEASE:=1

PKG_SOURCE:=pimd_2.1.8-2.tar.gz
PKG_SOURCE_URL:=http://ftp.de.debian.org/debian/pool/main/p/pimd/
PKG_MD5SUM:=56cbc360a0fae4c8ad81289bf8891e4d

include $(INCLUDE_DIR)/package.mk

define Package/pimd/Default
 DEPENDS:=@LINUX_2_6
endef

define Package/pimd
$(call Package/pimd/Default)
 SECTION:=net
 CATEGORY:=Network
 SUBMENU:=Routing and Redirection
 DEPENDS+= +libc
 TITLE:=Multicast routing daemon (PIMv2)
 URL:=http://packages.debian.org/unstable/net/pimd/
endef

define Package/pimd/description
 pimd is implementation of Protocol Independent Multicast routing
daemon. It supports PIMv2-SM on FreeBSD, NetBSD, OpenBSD, Linux.
Enabled PIM support in kernel is needed.
endef

CC_FLAGS := 
/home/darius/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/mips-openwrt-linux-uclibc-gcc
LD_FLAGS := 
/home/darius/openwrt/backfire/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/mips-openwrt-linux-uclibc-ld

define Build/Compile
        $(MAKE) -C $(PKG_BUILD_DIR) NO_EXTRA_WARN_FLAGS=yes CC=$(CC_FLAGS) 
LD=$(LD_FLAGS) USERCOMPILE="$(TARGET_CFLAGS)"
endef

define Package/pimd/conffiles
/etc/pimd.conf
endef

define Package/pimd/install
        $(INSTALL_DIR) $(1)/etc
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/pimd.conf $(1)/etc/
        $(INSTALL_DIR) $(1)/usr/bin
        $(INSTALL_BIN) $(PKG_BUILD_DIR)/pimd $(1)/usr/bin/
endef

$(eval $(call BuildPackage,pimd))
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users

Reply via email to