Discussion:
[PATCH 2/2] allow control over the build compiler
Mike Frysinger
2011-08-23 22:16:27 UTC
Permalink
Signed-off-by: Mike Frysinger <vapier-aBrp7R+bbdUdnm+***@public.gmane.org>
---
Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index f637bfe..75e6e63 100644
--- a/Makefile
+++ b/Makefile
@@ -80,8 +80,9 @@ install: powertop
@(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@)


+BUILD_CC ?= gcc
csstoh: csstoh.c
- gcc -o csstoh csstoh.c
+ $(BUILD_CC) -o csstoh csstoh.c

css.h: csstoh powertop.css
./csstoh powertop.css css.h
--
1.7.6
Paul Menzel
2011-08-23 22:35:09 UTC
Permalink
Dear Mike,
Post by Mike Frysinger
---
Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index f637bfe..75e6e63 100644
--- a/Makefile
+++ b/Makefile
@@ -80,8 +80,9 @@ install: powertop
@(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@)
+BUILD_CC ?= gcc
Why not just use `CC`?
Post by Mike Frysinger
csstoh: csstoh.c
- gcc -o csstoh csstoh.c
+ $(BUILD_CC) -o csstoh csstoh.c
css.h: csstoh powertop.css
./csstoh powertop.css css.h
Thanks,

Paul
Mike Frysinger
2011-08-24 02:55:48 UTC
Permalink
Post by Paul Menzel
Post by Mike Frysinger
---
Makefile | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index f637bfe..75e6e63 100644
--- a/Makefile
+++ b/Makefile
@@ -80,8 +80,9 @@ install: powertop
@(cd po/ && env LOCALESDIR=$(LOCALESDIR) DESTDIR=$(DESTDIR) $(MAKE) $@)
+BUILD_CC ?= gcc
Why not just use `CC`?
using a makefile instead of a configure script means it's hard to auto-detect
when you're cross-compiling (and thus pick whether to default to $CC or gcc).
so i picked gcc.

if people want "BUILD_CC ?= $(CC)", i dont have strong feelings either way.
-mike

Loading...