summaryrefslogtreecommitdiffstats
path: root/package/linuxptp
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-06 21:08:05 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-06 21:08:05 +0200
commit3692b63fb1b94fe93b40336f97657d77bf0011bd (patch)
treef2fca87c34fef37b68bf1c04743f14396d5b3b6c /package/linuxptp
parent23a0f8808ea86612c9b2ce48b65fcf8c0701c04a (diff)
downloadbuildroot-3692b63fb1b94fe93b40336f97657d77bf0011bd.tar.gz
buildroot-3692b63fb1b94fe93b40336f97657d77bf0011bd.zip
linuxptp: refactor with LINUXPTP_MAKE_{ENV,OPTS} variables
Since there is quite some duplication in the variables to be passed in the make environment and as make options between the build and install steps, this commit introduces LINUXPTP_MAKE_ENV and LINUXPTP_MAKE_OPTS to avoid the duplication. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/linuxptp')
-rw-r--r--package/linuxptp/linuxptp.mk26
1 files changed, 11 insertions, 15 deletions
diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
index d8bcc2bf95..6516659303 100644
--- a/package/linuxptp/linuxptp.mk
+++ b/package/linuxptp/linuxptp.mk
@@ -10,27 +10,23 @@ LINUXPTP_SITE = git://git.code.sf.net/p/linuxptp/code
LINUXPTP_LICENSE = GPL-2.0+
LINUXPTP_LICENSE_FILES = COPYING
-define LINUXPTP_BUILD_CMDS
+LINUXPTP_MAKE_ENV = \
$(TARGET_MAKE_ENV) \
CROSS_COMPILE="$(TARGET_CROSS)" \
KBUILD_OUTPUT=$(STAGING_DIR) \
- $(MAKE) \
- prefix=/usr \
- EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
- EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
- -C $(@D) all
+
+LINUXPTP_MAKE_OPTS = \
+ prefix=/usr \
+ EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
+ EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
+
+define LINUXPTP_BUILD_CMDS
+ $(LINUXPTP_MAKE_ENV) $(MAKE) $(LINUXPTP_MAKE_OPTS) -C $(@D) all
endef
define LINUXPTP_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) \
- CROSS_COMPILE="$(TARGET_CROSS)" \
- KBUILD_OUTPUT=$(STAGING_DIR) \
- $(MAKE) \
- prefix=/usr \
- DESTDIR=$(TARGET_DIR) \
- EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
- EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \
- -C $(@D) install
+ $(LINUXPTP_MAKE_ENV) $(MAKE) $(LINUXPTP_MAKE_OPTS) \
+ DESTDIR=$(TARGET_DIR) -C $(@D) install
$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.cfg \
$(TARGET_DIR)/etc/linuxptp.cfg
OpenPOWER on IntegriCloud