From 634add7df941011816cd65e03507e1d9e69e38f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Wed, 9 Mar 2016 13:30:36 +0100 Subject: external: use skiboot make_version script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's version like skiboot and other external tools do. There is no need to generate a version.c file. Defining VERSION on the compile commande line is enough. Signed-off-by: Cédric Le Goater [stewart@linux.vnet.ibm.com: fix makefile CFLAGS so can be overwritten] Signed-off-by: Stewart Smith --- external/xscom-utils/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'external/xscom-utils/Makefile') diff --git a/external/xscom-utils/Makefile b/external/xscom-utils/Makefile index b5d0d1cd..f944ff3a 100644 --- a/external/xscom-utils/Makefile +++ b/external/xscom-utils/Makefile @@ -1,7 +1,8 @@ all: getscom putscom getsram -VERSION=0.1 -CFLAGS=-O2 -g -Wall -m64 -DVERSION=$(VERSION) +XSCOM_VERSION ?= $(shell ../../make_version.sh xscom-utils) +CFLAGS?=-O2 -g -Wall -m64 +override CFLAGS += -DVERSION=\"$(XSCOM_VERSION)\" getscom: getscom.c xscom.c $(CC) $(CFLAGS) -o $@ $^ -- cgit v1.2.1