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
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 \
81 $(CP
) $(SCRIPT_DIR
)/config.
{guess
,sub
} $(PKG_BUILD_DIR
)/$(3)/ && \
92 CFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
93 CXXFLAGS
="$(TARGET_CFLAGS) $(EXTRA_CFLAGS)" \
94 LDFLAGS
="$(EXTRA_LDFLAGS) "
97 $(TARGET_CONFIGURE_OPTS
) \
98 CROSS
="$(TARGET_CROSS)" \
103 define Build
/Compile
/Default
105 $(MAKE
) -C
$(PKG_BUILD_DIR
)/$(MAKE_PATH
) \