2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
11 CATEGORY:=Extra packages
15 MAINTAINER:=OpenWrt Developers Team <openwrt-devel@openwrt.org>
16 SOURCE:=$(patsubst $(TOPDIR)/%,%,${shell pwd})
17 ifneq ($(PKG_VERSION),)
18 ifneq ($(PKG_RELEASE),)
19 VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
21 VERSION:=$(PKG_VERSION)
24 VERSION:=$(PKG_RELEASE)
36 ifneq ($(strip $(PKG_UNPACK)),)
37 define Build/Prepare/Default
39 @if [ -d ./patches -a "$$$$(ls ./patches | wc -l)" -gt 0 ]; then \
40 $(PATCH) $(PKG_BUILD_DIR) ./patches; \
45 TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include
46 TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
49 --target=$(GNU_TARGET_NAME) \
50 --host=$(GNU_TARGET_NAME) \
51 --build=$(GNU_HOST_NAME) \
58 --libexecdir=/usr/lib \
60 --datadir=/usr/share \
61 --localstatedir=/var \
67 $(TARGET_CONFIGURE_OPTS) \
68 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
69 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
70 CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
71 LDFLAGS="$(TARGET_LDFLAGS)" \
72 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" \
73 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
77 define Build/Configure/Default
78 (cd $(PKG_BUILD_DIR)/$(strip $(3)); \
79 if [ -x $(CONFIGURE_PATH)/configure ]; then \
82 $(CONFIGURE_PATH)/configure \
90 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
91 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
92 LDFLAGS="$(EXTRA_LDFLAGS) "
95 $(TARGET_CONFIGURE_OPTS) \
96 CROSS="$(TARGET_CROSS)" \
101 define Build/Compile/Default
103 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \