Skip to content

Commit a5ca660

Browse files
committed
[Build] Clarify Makefile help, info, and version targets
1 parent 7d00073 commit a5ca660

File tree

2 files changed

+37
-11
lines changed

2 files changed

+37
-11
lines changed

Makefile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,9 @@ install: module-install
234234

235235
.PHONY: module-install
236236
module-install:
237-
$(MAKE) -C $(KERNELDIR) M=$(PWD)/$(BUILD) modules_install
237+
@if [ -e $(BUILD)/corefreqk.ko ]; then \
238+
$(MAKE) -C $(KERNELDIR) M=$(PWD)/$(BUILD) modules_install; \
239+
fi
238240

239241
.PHONY: clean
240242
clean:
@@ -367,13 +369,25 @@ info:
367369
$(info NO_UPPER [$(NO_UPPER)])
368370
$(info NO_LOWER [$(NO_LOWER)])
369371
$(info SILENT [$(SILENT)])
370-
@echo -n
372+
@:
373+
374+
.PHONY: version
375+
version:
376+
$(info $(COREFREQ_MAJOR).$(COREFREQ_MINOR).$(COREFREQ_REV))
377+
@:
371378

372379
.PHONY: help
373380
help:
374381
@echo -e \
375382
"o---------------------------------------------------------------o\n"\
376-
"| make [all] [clean] [info] [help] [install] [module-install] |\n"\
383+
"| make [corefreqd] [corefreq-cli] [corefreqk.ko] [all] |\n"\
384+
"| make [install] [module-install] [uninstall] |\n"\
385+
"| make [info] [help] [version] |\n"\
386+
"| make [clean] |\n"\
387+
"| |\n"\
388+
"| Options: |\n"\
389+
"| -j [N], --jobs[=N] |\n"\
390+
"| -s, --silent, --quiet |\n"\
377391
"| |\n"\
378392
"| V=<n> |\n"\
379393
"| where <n> is the verbose build level |\n"\

README.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,26 @@ cd CoreFreq
8989
make -j
9090
```
9191
```console
92+
MD [build]
93+
MD [build/module]
94+
LN [build/Makefile]
95+
LN [build/module/corefreqk.c]
9296
CC [build/corefreqd.o]
9397
CC [build/corefreqm.o]
98+
LD [build/corefreqd]
9499
CC [build/corefreq-cli.o]
95100
CC [build/corefreq-ui.o]
96101
CC [build/corefreq-cli-rsc.o]
97102
CC [build/corefreq-cli-json.o]
98103
CC [build/corefreq-cli-extra.o]
99-
LD [build/corefreqd]
100104
LD [build/corefreq-cli]
101-
CC [M] CoreFreq/build/module/corefreqk.o
102-
LD [M] CoreFreq/build/corefreqk.o
103-
MODPOST CoreFreq/build/Module.symvers
104-
CC [M] CoreFreq/build/corefreqk.mod.o
105-
LD [M] CoreFreq/build/corefreqk.ko
106-
BTF [M] CoreFreq/build/corefreqk.ko
105+
CC [M] module/corefreqk.o
106+
LD [M] corefreqk.o
107+
MODPOST Module.symvers
108+
CC [M] corefreqk.mod.o
109+
CC [M] .module-common.o
110+
LD [M] corefreqk.ko
111+
BTF [M] corefreqk.ko
107112
```
108113
4. (Optionally) Sign the driver
109114
If module signature verification is enabled into Kernel, you will have to sign the `corefreqk.ko` driver.
@@ -688,7 +693,14 @@ gmake CC=clang
688693

689694
```
690695
o---------------------------------------------------------------o
691-
| make [all] [clean] [info] [help] [install] [module-install] |
696+
| make [corefreqd] [corefreq-cli] [corefreqk.ko] [all] |
697+
| make [install] [module-install] [uninstall] |
698+
| make [info] [help] [version] |
699+
| make [clean] |
700+
| |
701+
| Options: |
702+
| -j [N], --jobs[=N] |
703+
| -s, --silent, --quiet |
692704
| |
693705
| V=<n> |
694706
| where <n> is the verbose build level |

0 commit comments

Comments
 (0)