blob: fb3aee8067b34be6cfbf198be002d1528be8a0a2 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From 35f14bd5aba2ed6cee258e11eab42c408afc04d0 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 4 Nov 2015 02:29:05 -0500
4Subject: [PATCH] Makefile: support cross compile for linux
5
6Upstream-Status: Pending
7Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
8---
9 Makefile | 5 +++--
10 1 file changed, 3 insertions(+), 2 deletions(-)
11
12diff --git a/Makefile b/Makefile
13index 17d9758..9e74cdf 100644
14--- a/Makefile
15+++ b/Makefile
16@@ -41,7 +41,7 @@
17 # Linux 2.0.x
18 #
19
20-CC_LINUX=gcc
21+CC_LINUX=$(CC)
22 CCO_LINUX=-Wall -DHAVE_DEV_URANDOM -DHAVE_OSYNC -DHAVE_STRCASECMP -DHAVE_RANDOM -DWEAK_RC6 -DSYNC_WAITS_FOR_SYNC -DFIND_DEVICE_SIZE_BY_BLKGETSIZE -DSIXTYFOUR -D__USE_LARGEFILE -D_FILE_OFFSET_BITS=64
23 # default should be to turn off debugging and to turn on optimization.
24 #CCO_LINUX+=-O9 -pipe -fomit-frame-pointer -finline-functions -funroll-loops -fstrength-reduce
25@@ -185,6 +185,7 @@ clean :
26 rm -f wipe $(OBJECTS) wipe.tr-asc.1 version.h
27
28 install:
29- install -m755 -o root -g root wipe $(DESTDIR)/usr/bin
30+ [ -e $(DESTDIR)$(bindir) ] || mkdir -p $(DESTDIR)$(bindir)
31+ install -m755 -o root -g root wipe $(DESTDIR)$(bindir)
32
33 .PHONY: always clean install
34--
351.9.1
36