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 Build/Patch:=$(Build/Patch/Default)
37 ifneq ($(strip $(PKG_UNPACK)),)
38 define Build/Prepare/Default
41 $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
45 CONFIGURE_PREFIX:=/usr
47 --target=$(GNU_TARGET_NAME) \
48 --host=$(GNU_TARGET_NAME) \
49 --build=$(GNU_HOST_NAME) \
52 --prefix=$(CONFIGURE_PREFIX) \
53 --exec-prefix=$(CONFIGURE_PREFIX) \
54 --bindir=$(CONFIGURE_PREFIX)/bin \
55 --sbindir=$(CONFIGURE_PREFIX)/sbin \
56 --libexecdir=$(CONFIGURE_PREFIX)/lib \
58 --datadir=$(CONFIGURE_PREFIX)/share \
59 --localstatedir=/var \
60 --mandir=$(CONFIGURE_PREFIX)/man \
61 --infodir=$(CONFIGURE_PREFIX)/info \
65 $(TARGET_CONFIGURE_OPTS) \
66 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
67 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
68 CPPFLAGS="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
69 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
70 PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR_HOST)/usr/lib/pkgconfig" \
71 PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig"
74 CONFIGURE_CMD = ./configure
76 define Build/Configure/Default
77 (cd $(PKG_BUILD_DIR)/$(CONFIGURE_PATH)/$(strip $(3)); \
78 if [ -x $(CONFIGURE_CMD) ]; then \
79 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/$(3)/ && \
90 CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
91 CXXFLAGS="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
92 LDFLAGS="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
95 $(TARGET_CONFIGURE_OPTS) \
96 CROSS="$(TARGET_CROSS)" \
101 define Build/Compile/Default
103 $(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \