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
44 TARGET_CPPFLAGS
:=-I
$(STAGING_DIR
)/usr
/include -I
$(STAGING_DIR
)/include
45 TARGET_LDFLAGS
:=-L
$(STAGING_DIR
)/usr
/lib
-L
$(STAGING_DIR
)/lib
48 --target
=$(GNU_TARGET_NAME
) \
49 --host
=$(GNU_TARGET_NAME
) \
50 --build
=$(GNU_HOST_NAME
) \
57 --libexecdir
=/usr
/lib \
59 --datadir=/usr
/share \
60 --localstatedir
=/var \
66 $(TARGET_CONFIGURE_OPTS
) \
67 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
68 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
69 CPPFLAGS
="$(TARGET_CPPFLAGS) $(EXTRA_CPPFLAGS)" \
70 LDFLAGS
="$(TARGET_LDFLAGS)" \
71 PKG_CONFIG_PATH
="$(STAGING_DIR)/usr/lib/pkgconfig" \
72 PKG_CONFIG_LIBDIR
="$(STAGING_DIR)/usr/lib/pkgconfig"
75 CONFIGURE_CMD
= .
/configure
77 define Build
/Configure
/Default
78 (cd
$(PKG_BUILD_DIR
)/$(CONFIGURE_PATH
)/$(strip $(3)); \
79 if
[ -x
$(CONFIGURE_CMD
) ]; then \
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
) \