xref: /OK3568_Linux_fs/buildroot/package/pv/pv.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun################################################################################
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# pv
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyun################################################################################
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunPV_VERSION = 1.6.20
8*4882a593SmuzhiyunPV_SOURCE = pv-$(PV_VERSION).tar.bz2
9*4882a593SmuzhiyunPV_SITE = http://www.ivarch.com/programs/sources
10*4882a593SmuzhiyunPV_LICENSE = Artistic-2.0
11*4882a593SmuzhiyunPV_LICENSE_FILES = doc/COPYING
12*4882a593SmuzhiyunPV_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun# --relax linker option is enabled by default on sparc/sparc64
15*4882a593Smuzhiyun# architectures, and it can't be used together with -r option, so
16*4882a593Smuzhiyun# disable it.
17*4882a593Smuzhiyunifeq ($(BR2_sparc)$(BR2_sparc64),y)
18*4882a593SmuzhiyunPV_LDFLAGS = "-Wl,--no-relax"
19*4882a593Smuzhiyunendif
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun# While 'pv' uses autoconf, it does not use automake for its
22*4882a593Smuzhiyun# makefiles. It uses $(LD) $(LDFLAGS) to achieve partial linking, but
23*4882a593Smuzhiyun# using 'ld' directly doesn't work well with some toolchain
24*4882a593Smuzhiyun# configuration, as the ld default emulation may not necessarily be
25*4882a593Smuzhiyun# the correct one. By passing the below values for LD and LDFLAGS, we
26*4882a593Smuzhiyun# ensure that 'gcc' is used to do these partial linking steps.
27*4882a593SmuzhiyunPV_MAKE_OPTS = \
28*4882a593Smuzhiyun	LD="$(TARGET_CC)" \
29*4882a593Smuzhiyun	LDFLAGS="-Wl,-r -nostdlib $(PV_LDFLAGS)"
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun$(eval $(autotools-package))
32