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
)
37 Build
/Patch
:=$(Build
/Patch
/Default
)
38 ifneq ($(strip $(PKG_UNPACK
)),)
39 define Build
/Prepare
/Default
46 --target
=$(GNU_TARGET_NAME
) \
47 --host
=$(GNU_TARGET_NAME
) \
48 --build
=$(GNU_HOST_NAME
) \
55 --libexecdir
=/usr
/lib \
57 --datadir=/usr
/share \
58 --localstatedir
=/var \
64 $(TARGET_CONFIGURE_OPTS
) \
65 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
66 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
67 CPPFLAGS
="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
68 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)" \
69 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig" \
70 PKG_CONFIG_LIBDIR
="$(STAGING_DIR)/usr/lib/pkgconfig"
73 CONFIGURE_CMD
= .
/configure
75 define Build
/Configure
/Default
76 (cd
$(PKG_BUILD_DIR
)/$(CONFIGURE_PATH
)/$(strip $(3)); \
77 if
[ -x
$(CONFIGURE_CMD
) ]; then \
78 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/$(3)/ && \
89 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
90 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS) $(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
91 LDFLAGS
="$(TARGET_LDFLAGS) $(EXTRA_LDFLAGS)"
94 $(TARGET_CONFIGURE_OPTS
) \
95 CROSS
="$(TARGET_CROSS)" \
100 define Build
/Compile
/Default
102 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \