lkml.org 
[lkml]   [2014]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] fix build error for vm tools
This patch fix the build error when make like this:
make O=/xx/x vm

use $(OUTPUT) to generate to the right place.

Signed-off-by: Yalin Wang <yalin.wang@sonymobile.com>
---
tools/vm/Makefile | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 3d907da..28d4bd9 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -1,9 +1,10 @@
# Makefile for vm tools
#
+include ../scripts/Makefile.include
TARGETS=page-types slabinfo

LIB_DIR = ../lib/api
-LIBS = $(LIB_DIR)/libapikfs.a
+LIBS = $(OUTPUT)../lib/api/libapikfs.a

CC = $(CROSS_COMPILE)gcc
CFLAGS = -Wall -Wextra -I../lib/
@@ -12,11 +13,11 @@ LDFLAGS = $(LIBS)
$(TARGETS): $(LIBS)

$(LIBS):
- make -C $(LIB_DIR)
+ $(call descend,../lib/api libapikfs.a)

%: %.c
- $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
+ $(CC) $(CFLAGS) -o $(OUTPUT)$@ $< $(LDFLAGS)

clean:
- $(RM) page-types slabinfo
+ $(RM) $(OUTPUT)page-types $(OUTPUT)slabinfo
make -C $(LIB_DIR) clean
--
2.1.3

\
 
 \ /
  Last update: 2014-12-09 04:41    [W:0.032 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site