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 export PKG_CONFIG_PATH
=$(STAGING_DIR
)/usr
/lib
/pkgconfig
:$(STAGING_DIR_HOST
)/usr
/lib
/pkgconfig
46 export PKG_CONFIG_LIBDIR
=$(STAGING_DIR
)/usr
/lib
/pkgconfig
48 CONFIGURE_PREFIX
:=/usr
50 --target
=$(GNU_TARGET_NAME
) \
51 --host
=$(GNU_TARGET_NAME
) \
52 --build
=$(GNU_HOST_NAME
) \
55 --prefix=$(CONFIGURE_PREFIX
) \
56 --exec-prefix
=$(CONFIGURE_PREFIX
) \
57 --bindir=$(CONFIGURE_PREFIX
)/bin \
58 --sbindir
=$(CONFIGURE_PREFIX
)/sbin \
59 --libexecdir
=$(CONFIGURE_PREFIX
)/lib \
61 --datadir=$(CONFIGURE_PREFIX
)/share \
62 --localstatedir
=/var \
63 --mandir=$(CONFIGURE_PREFIX
)/man \
64 --infodir=$(CONFIGURE_PREFIX
)/info \
68 $(TARGET_CONFIGURE_OPTS
) \
69 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
70 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
71 CPPFLAGS
="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
72 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
73 PKG_CONFIG_PATH
="$(PKG_CONFIG_PATH)" \
74 PKG_CONFIG_LIBDIR
="$(PKG_CONFIG_LIBDIR)"
77 CONFIGURE_CMD
= .
/configure
79 define Build
/Configure
/Default
80 (cd
$(PKG_BUILD_DIR
)/$(CONFIGURE_PATH
)/$(strip $(3)); \
81 if
[ -x
$(CONFIGURE_CMD
) ]; then \
82 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/$(3)/ && \
93 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
94 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
95 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
98 $(TARGET_CONFIGURE_OPTS
) \
99 CROSS
="$(TARGET_CROSS)" \
104 define Build
/Compile
/Default
106 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \