diff options
author | Franck Bui-Huu <fbuihuu@gmail.com> | 2012-02-07 11:15:56 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2012-03-03 08:40:11 -0500 |
commit | 7490ca1ea5af18bd0ceb3b96ddb2f10b09e08b5d (patch) | |
tree | 6baf8727f77bc2eeeb75349a12fe4e7cf5c620a5 /tools/power/cpupower/debug | |
parent | 62d5a67d65d69d1c8ba6d2638193bc2864c14fdf (diff) |
cpupower tools: allow to build debug tools in a separate directory too
Signed-off-by: Franck Bui-Huu <fbuihuu@gmail.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'tools/power/cpupower/debug')
-rw-r--r-- | tools/power/cpupower/debug/i386/Makefile | 26 | ||||
-rw-r--r-- | 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 d08cc1ead9bc..626478b8a554 100644 --- a/tools/power/cpupower/debug/i386/Makefile +++ b/tools/power/cpupower/debug/i386/Makefile | |||
@@ -1,20 +1,26 @@ | |||
1 | OUTPUT=./ | ||
2 | ifeq ("$(origin O)", "command line") | ||
3 | OUTPUT := $(O)/ | ||
4 | endif | ||
5 | |||
6 | |||
1 | default: all | 7 | default: all |
2 | 8 | ||
3 | centrino-decode: centrino-decode.c | 9 | $(OUTPUT)centrino-decode: centrino-decode.c |
4 | $(CC) $(CFLAGS) -o centrino-decode centrino-decode.c | 10 | $(CC) $(CFLAGS) -o $@ centrino-decode.c |
5 | 11 | ||
6 | dump_psb: dump_psb.c | 12 | $(OUTPUT)dump_psb: dump_psb.c |
7 | $(CC) $(CFLAGS) -o dump_psb dump_psb.c | 13 | $(CC) $(CFLAGS) -o $@ dump_psb.c |
8 | 14 | ||
9 | intel_gsic: intel_gsic.c | 15 | $(OUTPUT)intel_gsic: intel_gsic.c |
10 | $(CC) $(CFLAGS) -o intel_gsic -llrmi intel_gsic.c | 16 | $(CC) $(CFLAGS) -o $@ -llrmi intel_gsic.c |
11 | 17 | ||
12 | powernow-k8-decode: powernow-k8-decode.c | 18 | $(OUTPUT)powernow-k8-decode: powernow-k8-decode.c |
13 | $(CC) $(CFLAGS) -o powernow-k8-decode powernow-k8-decode.c | 19 | $(CC) $(CFLAGS) -o $@ powernow-k8-decode.c |
14 | 20 | ||
15 | all: centrino-decode dump_psb intel_gsic powernow-k8-decode | 21 | all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)powernow-k8-decode |
16 | 22 | ||
17 | clean: | 23 | clean: |
18 | rm -rf centrino-decode dump_psb intel_gsic powernow-k8-decode | 24 | rm -rf $(OUTPUT){centrino-decode,dump_psb,intel_gsic,powernow-k8-decode} |
19 | 25 | ||
20 | .PHONY: all default clean | 26 | .PHONY: all default clean |
diff --git a/tools/power/cpupower/debug/x86_64/Makefile b/tools/power/cpupower/debug/x86_64/Makefile index 3326217dd311..8e26d67525cd 100644 --- a/tools/power/cpupower/debug/x86_64/Makefile +++ b/tools/power/cpupower/debug/x86_64/Makefile | |||
@@ -1,14 +1,20 @@ | |||
1 | OUTPUT=./ | ||
2 | ifeq ("$(origin O)", "command line") | ||
3 | OUTPUT := $(O)/ | ||
4 | endif | ||
5 | |||
6 | |||
1 | default: all | 7 | default: all |
2 | 8 | ||
3 | centrino-decode: ../i386/centrino-decode.c | 9 | $(OUTPUT)centrino-decode: ../i386/centrino-decode.c |
4 | $(CC) $(CFLAGS) -o $@ $< | 10 | $(CC) $(CFLAGS) -o $@ $< |
5 | 11 | ||
6 | powernow-k8-decode: ../i386/powernow-k8-decode.c | 12 | $(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c |
7 | $(CC) $(CFLAGS) -o $@ $< | 13 | $(CC) $(CFLAGS) -o $@ $< |
8 | 14 | ||
9 | all: centrino-decode powernow-k8-decode | 15 | all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode |
10 | 16 | ||
11 | clean: | 17 | clean: |
12 | rm -rf centrino-decode powernow-k8-decode | 18 | rm -rf $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode |
13 | 19 | ||
14 | .PHONY: all default clean | 20 | .PHONY: all default clean |