linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too
@ 2012-02-07 16:15 Franck Bui-Huu
  2012-02-07 16:15 ` [PATCH 2/2] cpupower tools: add install target to the debug tools' makefiles Franck Bui-Huu
  2012-02-10 15:06 ` [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Dominik Brodowski
  0 siblings, 2 replies; 3+ messages in thread
From: Franck Bui-Huu @ 2012-02-07 16:15 UTC (permalink / raw)
  To: linux; +Cc: linux-kernel, Franck Bui-Huu

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 tools/power/cpupower/debug/i386/Makefile   |   26 ++++++++++++++++----------
 tools/power/cpupower/debug/x86_64/Makefile |   14 ++++++++++----
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/tools/power/cpupower/debug/i386/Makefile b/tools/power/cpupower/debug/i386/Makefile
index d08cc1e..626478b 100644
--- a/tools/power/cpupower/debug/i386/Makefile
+++ b/tools/power/cpupower/debug/i386/Makefile
@@ -1,20 +1,26 @@
+OUTPUT=./
+ifeq ("$(origin O)", "command line")
+	OUTPUT := $(O)/
+endif
+
+
 default: all
 
-centrino-decode: centrino-decode.c
-	$(CC) $(CFLAGS) -o centrino-decode centrino-decode.c
+$(OUTPUT)centrino-decode: centrino-decode.c
+	$(CC) $(CFLAGS) -o $@ centrino-decode.c
 
-dump_psb: dump_psb.c
-	$(CC) $(CFLAGS) -o dump_psb dump_psb.c
+$(OUTPUT)dump_psb: dump_psb.c
+	$(CC) $(CFLAGS) -o $@ dump_psb.c
 
-intel_gsic: intel_gsic.c
-	$(CC) $(CFLAGS) -o intel_gsic -llrmi intel_gsic.c
+$(OUTPUT)intel_gsic: intel_gsic.c
+	$(CC) $(CFLAGS) -o $@ -llrmi intel_gsic.c
 
-powernow-k8-decode: powernow-k8-decode.c
-	$(CC) $(CFLAGS) -o powernow-k8-decode powernow-k8-decode.c
+$(OUTPUT)powernow-k8-decode: powernow-k8-decode.c
+	$(CC) $(CFLAGS) -o $@ powernow-k8-decode.c
 
-all: centrino-decode dump_psb intel_gsic powernow-k8-decode
+all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)powernow-k8-decode
 
 clean:
-	rm -rf centrino-decode dump_psb intel_gsic powernow-k8-decode
+	rm -rf $(OUTPUT){centrino-decode,dump_psb,intel_gsic,powernow-k8-decode}
 
 .PHONY: all default clean
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile
index 3326217..8e26d67 100644
--- a/tools/power/cpupower/debug/x86_64/Makefile
+++ b/tools/power/cpupower/debug/x86_64/Makefile
@@ -1,14 +1,20 @@
+OUTPUT=./
+ifeq ("$(origin O)", "command line")
+	OUTPUT := $(O)/
+endif
+
+
 default: all
 
-centrino-decode: ../i386/centrino-decode.c
+$(OUTPUT)centrino-decode: ../i386/centrino-decode.c
 	$(CC) $(CFLAGS) -o $@ $<
 
-powernow-k8-decode: ../i386/powernow-k8-decode.c
+$(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
 	$(CC) $(CFLAGS) -o $@ $<
 
-all: centrino-decode powernow-k8-decode
+all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
 
 clean:
-	rm -rf centrino-decode powernow-k8-decode
+	rm -rf $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
 
 .PHONY: all default clean
-- 
1.7.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] cpupower tools: add install target to the debug tools' makefiles
  2012-02-07 16:15 [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Franck Bui-Huu
@ 2012-02-07 16:15 ` Franck Bui-Huu
  2012-02-10 15:06 ` [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Dominik Brodowski
  1 sibling, 0 replies; 3+ messages in thread
From: Franck Bui-Huu @ 2012-02-07 16:15 UTC (permalink / raw)
  To: linux; +Cc: linux-kernel, Franck Bui-Huu

Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
---
 tools/power/cpupower/debug/i386/Makefile   |   14 +++++++++++++-
 tools/power/cpupower/debug/x86_64/Makefile |   12 +++++++++++-
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/tools/power/cpupower/debug/i386/Makefile b/tools/power/cpupower/debug/i386/Makefile
index 626478b..3ba158f 100644
--- a/tools/power/cpupower/debug/i386/Makefile
+++ b/tools/power/cpupower/debug/i386/Makefile
@@ -3,6 +3,11 @@ ifeq ("$(origin O)", "command line")
 	OUTPUT := $(O)/
 endif
 
+DESTDIR =
+bindir  = /usr/bin
+
+INSTALL = /usr/bin/install
+
 
 default: all
 
@@ -23,4 +28,11 @@ all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)pow
 clean:
 	rm -rf $(OUTPUT){centrino-decode,dump_psb,intel_gsic,powernow-k8-decode}
 
-.PHONY: all default clean
+install:
+	$(INSTALL) -d $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir}
+
+.PHONY: all default clean install
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile
index 8e26d67..1c52145 100644
--- a/tools/power/cpupower/debug/x86_64/Makefile
+++ b/tools/power/cpupower/debug/x86_64/Makefile
@@ -3,6 +3,11 @@ ifeq ("$(origin O)", "command line")
 	OUTPUT := $(O)/
 endif
 
+DESTDIR =
+bindir  = /usr/bin
+
+INSTALL = /usr/bin/install
+
 
 default: all
 
@@ -17,4 +22,9 @@ all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
 clean:
 	rm -rf $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
 
-.PHONY: all default clean
+install:
+	$(INSTALL) -d $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
+	$(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
+
+.PHONY: all default clean install
-- 
1.7.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too
  2012-02-07 16:15 [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Franck Bui-Huu
  2012-02-07 16:15 ` [PATCH 2/2] cpupower tools: add install target to the debug tools' makefiles Franck Bui-Huu
@ 2012-02-10 15:06 ` Dominik Brodowski
  1 sibling, 0 replies; 3+ messages in thread
From: Dominik Brodowski @ 2012-02-10 15:06 UTC (permalink / raw)
  To: Franck Bui-Huu; +Cc: linux-kernel

Applied both patches, thanks.

	Dominik

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-10 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 16:15 [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Franck Bui-Huu
2012-02-07 16:15 ` [PATCH 2/2] cpupower tools: add install target to the debug tools' makefiles Franck Bui-Huu
2012-02-10 15:06 ` [PATCH 1/2] cpupower tools: allow to build debug tools in a separate directory too Dominik Brodowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).