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"
76 CONFIGURE_CMD
= .
/configure
78 define Build
/Configure
/Default
79 (cd
$(PKG_BUILD_DIR
)/$(CONFIGURE_PATH
)/$(strip $(3)); \
80 if
[ -x
$(CONFIGURE_CMD
) ]; then \
91 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
92 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
93 LDFLAGS
="$(EXTRA_LDFLAGS) "
96 $(TARGET_CONFIGURE_OPTS
) \
97 CROSS
="$(TARGET_CROSS)" \
102 define Build
/Compile
/Default
104 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \