Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the Makefile is so unstable? #530

Closed
inglor opened this issue Feb 22, 2025 · 5 comments
Closed

Why the Makefile is so unstable? #530

inglor opened this issue Feb 22, 2025 · 5 comments
Labels

Comments

@inglor
Copy link
Contributor

inglor commented Feb 22, 2025

Hello,

I've been maintaining corefreq in AUR for some time now and latest releases have the Makefile modified. (1.97.1, 1.98.1 1.98.5). One of those time it was re-written completely? Why is it so unstable?

I'm asking because I've been maintaining a patch on top of it to honor the distribution specific (sane) default and it was no problem when the Makefile is stable but recently it's not and it's a pain to figure out again the changes, especially once it's re-written.

Also I understand if you still figuring out Makefile syntax and config, just trying to understand why.

Thanks,
artafinde

@cyring
Copy link
Owner

cyring commented Feb 23, 2025

Hello,

Main changes from current master branch explained bellow.

1.98.5

  • From git diff 1.98.5 Makefile

Explanations

  1. Commit 8597fe1 to allow User change the WARNING
  2. make info prints other variables
diff --git a/Makefile b/Makefile
index 887ffea..baa0901 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
 # CoreFreq
-# Copyright (C) 2015-2024 CYRIL COURTIAT
+# Copyright (C) 2015-2025 CYRIL COURTIAT
 # Licenses: GPL2
 
-COREFREQ_MAJOR = 1
-COREFREQ_MINOR = 98
-COREFREQ_REV = 5
+COREFREQ_MAJOR = 2
+COREFREQ_MINOR = 0
+COREFREQ_REV = 1
 HW = $(shell uname -m)
 CC ?= cc
-WARNING = -Wall -Wfatal-errors
+WARNING ?= -Wall -Wfatal-errors
 SYMLINK ?= ln -s
 INSTALL ?= install
 DEPMOD ?= depmod
@@ -318,6 +318,10 @@ info:
        $(info FEAT_DBG [$(FEAT_DBG)])
        $(info DELAY_TSC [$(DELAY_TSC)])
        $(info OPTIM_LVL [$(OPTIM_LVL)])
+       $(info CORE_COUNT [$(CORE_COUNT)])
+       $(info TASK_ORDER [$(TASK_ORDER)])
+       $(info MAX_FREQ_HZ [$(MAX_FREQ_HZ)])
+       $(info HWM_CHIPSET [$(HWM_CHIPSET)])
        $(info MSR_CORE_PERF_UCC [$(MSR_CORE_PERF_UCC)])
        $(info MSR_CORE_PERF_URC [$(MSR_CORE_PERF_URC)])
        $(info ARCH_PMC [$(ARCH_PMC)])
@@ -341,7 +345,7 @@ help:
        "|    where <COMPILER> is cc, gcc, clang                         |\n"\
        "|                                                               |\n"\
        "|  WARNING=<ARG>                                                |\n"\
-       "|    where default argument is -Wall                            |\n"\
+       "|    where default argument is -Wall -Wfatal-errors             |\n"\
        "|                                                               |\n"\
        "|  KERNELDIR=<PATH>                                             |\n"\
        "|    where <PATH> is the Kernel source directory                |\n"\

1.98.1

  • From git diff 1.98.1 Makefile

Explanations

  1. The build output had been made less verbose; as shown bellow
$ make 
  CC [build/corefreqd.o]
  CC [build/corefreqm.o]
  LD [build/corefreqd]
  CC [build/corefreq-cli.o]
  CC [build/corefreq-ui.o]
  CC [build/corefreq-cli-rsc.o]
  CC [build/corefreq-cli-json.o]
  CC [build/corefreq-cli-extra.o]
  LD [build/corefreq-cli]
  CC [M]  module/corefreqk.o
  LD [M]  corefreqk.o
  MODPOST Module.symvers
  CC [M]  corefreqk.mod.o
  CC [M]  .module-common.o
  LD [M]  corefreqk.ko
  BTF [M] corefreqk.ko
  • Using the V kernel variable, detail can be printed back with make V=1
diff --git a/Makefile b/Makefile
index 539fbe6..baa0901 100644
--- a/Makefile
+++ b/Makefile
@@ -1,13 +1,13 @@
 # CoreFreq
-# Copyright (C) 2015-2024 CYRIL COURTIAT
+# Copyright (C) 2015-2025 CYRIL COURTIAT
 # Licenses: GPL2
 
-COREFREQ_MAJOR = 1
-COREFREQ_MINOR = 98
+COREFREQ_MAJOR = 2
+COREFREQ_MINOR = 0
 COREFREQ_REV = 1
 HW = $(shell uname -m)
 CC ?= cc
-WARNING = -Wall -Wfatal-errors
+WARNING ?= -Wall -Wfatal-errors
 SYMLINK ?= ln -s
 INSTALL ?= install
 DEPMOD ?= depmod
@@ -32,6 +32,16 @@ DELAY_TSC = 0
 endif
 ARCH_PMC ?=
 
+SILENT = 0
+ifneq ($(findstring s,$(firstword -$(MAKEFLAGS))),)
+       SILENT = 1
+else
+       ifneq ($(V),)
+               RMDIR += -v
+               RM += -v
+       endif
+endif
+
 obj-m := corefreqk.o
 corefreqk-y := module/corefreqk.o
 
@@ -194,50 +204,61 @@ module-install:
 clean:
        @if [ -e $(BUILD)/Makefile ]; then \
            if [ -z ${V} ]; then \
-               echo "  CLEAN [M] $(PWD)/$(BUILD)"; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  CLEAN [M] $(PWD)/$(BUILD)"; \
+               fi; \
                $(MAKE) -s -C $(KERNELDIR) M=$(PWD)/$(BUILD) clean; \
            else \
                $(MAKE) -C $(KERNELDIR) M=$(PWD)/$(BUILD) clean; \
            fi \
        fi
        @if [ -e $(BUILD)/corefreqd ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/corefreqd]"; \
-               $(RM)) $(BUILD)/corefreqd; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  CLEAN [$(BUILD)/corefreqd]"; \
+               fi; \
+               $(RM) $(BUILD)/corefreqd; \
        fi
        @if [ -e $(BUILD)/corefreq-cli ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/corefreq-cli]"; \
-               $(RM)) $(BUILD)/corefreq-cli; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  CLEAN [$(BUILD)/corefreq-cli]"; \
+               fi; \
+               $(RM) $(BUILD)/corefreq-cli; \
        fi
        @if [ -e $(BUILD)/module/corefreqk.c ]; then \
-               $(if $(V), $(RM) -v, \
-               echo "  CLEAN [$(BUILD)/module/corefreqk.c]"; \
-               $(RM)) $(BUILD)/module/corefreqk.c; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  CLEAN [$(BUILD)/module/corefreqk.c]"; \
+               fi; \
+               $(RM) $(BUILD)/module/corefreqk.c; \
        fi
        @if [ -e $(BUILD)/Makefile ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/Makefile]"; \
-               $(RM)) $(BUILD)/Makefile; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  CLEAN [$(BUILD)/Makefile]"; \
+               fi; \
+               $(RM) $(BUILD)/Makefile; \
        fi
        @if [ -d $(BUILD)/module ]; then \
-               $(if $(V), $(RMDIR) -v, echo "  RMDIR [$(BUILD)/module]"; \
-               $(RMDIR)) $(BUILD)/module; \
+               if [ ${SILENT} -eq 0 ]; then \
+                       echo "  RMDIR [$(BUILD)/module]"; \
+               fi; \
+               $(RMDIR) $(BUILD)/module; \
        fi
        @if [ -d $(BUILD) ] && [ -z "$(ls -A $(BUILD))" ]; then \
-               $(if $(V), $(RMDIR) -v, echo "  RMDIR [$(BUILD)]"; \
-               $(RMDIR)) $(BUILD); \
+               if [ ${SILENT} -eq 0 ]; then echo "  RMDIR [$(BUILD)]"; fi; \
+               $(RMDIR) $(BUILD); \
        fi
 
 $(BUILD)/corefreqm.o: $(HW)/corefreqm.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
          -c $(HW)/corefreqm.c -o $(BUILD)/corefreqm.o
 
 $(BUILD)/corefreqd.o: $(HW)/corefreqd.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
          -c $(HW)/corefreqd.c -o $(BUILD)/corefreqd.o
 
 $(BUILD)/corefreqd: $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o
-       $(if $(V), $(CC), @echo "  LD [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  LD [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) -o $(BUILD)/corefreqd \
          $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o -lpthread -lm -lrt -lc
 
@@ -245,27 +266,27 @@ $(BUILD)/corefreqd: $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o
 corefreqd: $(BUILD)/corefreqd
 
 $(BUILD)/corefreq-ui.o: $(HW)/corefreq-ui.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-ui.c -o $(BUILD)/corefreq-ui.o
 
 $(BUILD)/corefreq-cli.o: $(HW)/corefreq-cli.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
          -c $(HW)/corefreq-cli.c -o $(BUILD)/corefreq-cli.o
 
 $(BUILD)/corefreq-cli-rsc.o: $(HW)/corefreq-cli-rsc.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
          -c $(HW)/corefreq-cli-rsc.c -o $(BUILD)/corefreq-cli-rsc.o
 
 $(BUILD)/corefreq-cli-json.o: $(HW)/corefreq-cli-json.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-cli-json.c -o $(BUILD)/corefreq-cli-json.o
 
 $(BUILD)/corefreq-cli-extra.o: $(HW)/corefreq-cli-extra.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  CC [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-cli-extra.c -o $(BUILD)/corefreq-cli-extra.o
 
@@ -274,7 +295,7 @@ $(BUILD)/corefreq-cli:      $(BUILD)/corefreq-cli.o \
                        $(BUILD)/corefreq-cli-rsc.o \
                        $(BUILD)/corefreq-cli-json.o \
                        $(BUILD)/corefreq-cli-extra.o
-       $(if $(V), $(CC), @echo "  LD [$@]"; \
+       $(if $(V), $(CC), @if [ ${SILENT} -eq 0 ]; then echo "  LD [$@]"; fi; \
        $(CC)) $(OPTIM_FLG) -o $(BUILD)/corefreq-cli \
          $(BUILD)/corefreq-cli.o $(BUILD)/corefreq-ui.o \
          $(BUILD)/corefreq-cli-rsc.o $(BUILD)/corefreq-cli-json.o \
@@ -297,6 +318,10 @@ info:
        $(info FEAT_DBG [$(FEAT_DBG)])
        $(info DELAY_TSC [$(DELAY_TSC)])
        $(info OPTIM_LVL [$(OPTIM_LVL)])
+       $(info CORE_COUNT [$(CORE_COUNT)])
+       $(info TASK_ORDER [$(TASK_ORDER)])
+       $(info MAX_FREQ_HZ [$(MAX_FREQ_HZ)])
+       $(info HWM_CHIPSET [$(HWM_CHIPSET)])
        $(info MSR_CORE_PERF_UCC [$(MSR_CORE_PERF_UCC)])
        $(info MSR_CORE_PERF_URC [$(MSR_CORE_PERF_URC)])
        $(info ARCH_PMC [$(ARCH_PMC)])
@@ -304,6 +329,7 @@ info:
        $(info NO_FOOTER [$(NO_FOOTER)])
        $(info NO_UPPER [$(NO_UPPER)])
        $(info NO_LOWER [$(NO_LOWER)])
+       $(info SILENT [$(SILENT)])
        @echo -n
 
 .PHONY: help
@@ -319,7 +345,7 @@ help:
        "|    where <COMPILER> is cc, gcc, clang                         |\n"\
        "|                                                               |\n"\
        "|  WARNING=<ARG>                                                |\n"\
-       "|    where default argument is -Wall                            |\n"\
+       "|    where default argument is -Wall -Wfatal-errors             |\n"\
        "|                                                               |\n"\
        "|  KERNELDIR=<PATH>                                             |\n"\
        "|    where <PATH> is the Kernel source directory                |\n"\
@@ -351,7 +377,7 @@ help:
        "|    where <freq> is at least 4850000000 Hz                     |\n"\
        "|                                                               |\n"\
        "|  HWM_CHIPSET=<chipset>                                        |\n"\
-       "|    where <chipset> is W83627 or IT8720 or COMPATIBLE          |\n"\
+       "|    where <chipset> is W83627; IT8720; AMD_VCO or COMPATIBLE   |\n"\
        "|                                                               |\n"\
        "|  Performance Counters:                                        |\n"\
        "|    -------------------------------------------------------    |\n"\

1.97.1

  • From git diff 1.98.1 1.97.1 Makefile

Explanations

  1. The CoreFreq version is now centralized into Makefile and shared among x86_64 and aarch64 architectures
COREFREQ_MAJOR = 
COREFREQ_MINOR = 
COREFREQ_REV = 
diff --git a/Makefile b/Makefile
index 539fbe6..a21614a 100644
--- a/Makefile
+++ b/Makefile
@@ -2,9 +2,6 @@
 # Copyright (C) 2015-2024 CYRIL COURTIAT
 # Licenses: GPL2
 
-COREFREQ_MAJOR = 1
-COREFREQ_MINOR = 98
-COREFREQ_REV = 1
 HW = $(shell uname -m)
 CC ?= cc
 WARNING = -Wall -Wfatal-errors
@@ -36,10 +33,7 @@ obj-m := corefreqk.o
 corefreqk-y := module/corefreqk.o
 
 ccflags-y := -I$(PWD)/$(HW)
-ccflags-y +=   -D COREFREQ_MAJOR=$(COREFREQ_MAJOR) \
-               -D COREFREQ_MINOR=$(COREFREQ_MINOR) \
-               -D COREFREQ_REV=$(COREFREQ_REV) \
-               -D CORE_COUNT=$(CORE_COUNT) \
+ccflags-y +=   -D CORE_COUNT=$(CORE_COUNT) \
                -D TASK_ORDER=$(TASK_ORDER) \
                -D MAX_FREQ_HZ=$(MAX_FREQ_HZ)
 ccflags-y += $(WARNING)
@@ -53,10 +47,7 @@ ccflags-y += -D OPTIM_LVL=$(OPTIM_LVL)
 ccflags-y += $(OPTIM_FLG)
 endif
 
-DEFINITIONS =  -D COREFREQ_MAJOR=$(COREFREQ_MAJOR) \
-               -D COREFREQ_MINOR=$(COREFREQ_MINOR) \
-               -D COREFREQ_REV=$(COREFREQ_REV) \
-               -D CORE_COUNT=$(CORE_COUNT) -D TASK_ORDER=$(TASK_ORDER) \
+DEFINITIONS =  -D CORE_COUNT=$(CORE_COUNT) -D TASK_ORDER=$(TASK_ORDER) \
                -D MAX_FREQ_HZ=$(MAX_FREQ_HZ) -D UBENCH=$(UBENCH)
 
 ifneq ($(FEAT_DBG),)
@@ -106,23 +97,10 @@ ifneq ($(UI_TRANSPARENCY),)
 LAYOUT += -D UI_TRANSPARENCY=$(UI_TRANSPARENCY)
 endif
 
-ifneq ($(UI_RULER_MINIMUM),)
-LAYOUT += -D UI_RULER_MINIMUM=$(UI_RULER_MINIMUM)
-endif
-
-ifneq ($(UI_RULER_MAXIMUM),)
-LAYOUT += -D UI_RULER_MAXIMUM=$(UI_RULER_MAXIMUM)
-endif
-
 .PHONY: all
 all: prepare corefreqd corefreq-cli | prepare
        @if [ -e $(BUILD)/Makefile ]; then \
-           if [ -z ${V} ]; then \
-               $(MAKE) --no-print-directory -C $(KERNELDIR) \
-                       M=$(PWD)/$(BUILD) modules; \
-           else \
                $(MAKE) -C $(KERNELDIR) M=$(PWD)/$(BUILD) modules; \
-           fi \
        fi
 
 .PHONY: prepare
@@ -193,80 +171,60 @@ module-install:
 .PHONY: clean
 clean:
        @if [ -e $(BUILD)/Makefile ]; then \
-           if [ -z ${V} ]; then \
-               echo "  CLEAN [M] $(PWD)/$(BUILD)"; \
-               $(MAKE) -s -C $(KERNELDIR) M=$(PWD)/$(BUILD) clean; \
-           else \
                $(MAKE) -C $(KERNELDIR) M=$(PWD)/$(BUILD) clean; \
-           fi \
        fi
        @if [ -e $(BUILD)/corefreqd ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/corefreqd]"; \
-               $(RM)) $(BUILD)/corefreqd; \
+               $(RM) $(BUILD)/corefreqd; \
        fi
        @if [ -e $(BUILD)/corefreq-cli ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/corefreq-cli]"; \
-               $(RM)) $(BUILD)/corefreq-cli; \
+               $(RM) $(BUILD)/corefreq-cli; \
        fi
        @if [ -e $(BUILD)/module/corefreqk.c ]; then \
-               $(if $(V), $(RM) -v, \
-               echo "  CLEAN [$(BUILD)/module/corefreqk.c]"; \
-               $(RM)) $(BUILD)/module/corefreqk.c; \
+               $(RM) $(BUILD)/module/corefreqk.c; \
        fi
        @if [ -e $(BUILD)/Makefile ]; then \
-               $(if $(V), $(RM) -v, echo "  CLEAN [$(BUILD)/Makefile]"; \
-               $(RM)) $(BUILD)/Makefile; \
+               $(RM) $(BUILD)/Makefile; \
        fi
        @if [ -d $(BUILD)/module ]; then \
-               $(if $(V), $(RMDIR) -v, echo "  RMDIR [$(BUILD)/module]"; \
-               $(RMDIR)) $(BUILD)/module; \
+               $(RMDIR) $(BUILD)/module; \
        fi
        @if [ -d $(BUILD) ] && [ -z "$(ls -A $(BUILD))" ]; then \
-               $(if $(V), $(RMDIR) -v, echo "  RMDIR [$(BUILD)]"; \
-               $(RMDIR)) $(BUILD); \
+               $(RMDIR) $(BUILD); \
        fi
 
 $(BUILD)/corefreqm.o: $(HW)/corefreqm.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
+       $(CC) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
          -c $(HW)/corefreqm.c -o $(BUILD)/corefreqm.o
 
 $(BUILD)/corefreqd.o: $(HW)/corefreqd.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
+       $(CC) $(OPTIM_FLG) $(WARNING) -pthread $(DEFINITIONS) \
          -c $(HW)/corefreqd.c -o $(BUILD)/corefreqd.o
 
 $(BUILD)/corefreqd: $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o
-       $(if $(V), $(CC), @echo "  LD [$@]"; \
-       $(CC)) $(OPTIM_FLG) -o $(BUILD)/corefreqd \
+       $(CC) $(OPTIM_FLG) -o $(BUILD)/corefreqd \
          $(BUILD)/corefreqd.o $(BUILD)/corefreqm.o -lpthread -lm -lrt -lc
 
 .PHONY: corefreqd
 corefreqd: $(BUILD)/corefreqd
 
 $(BUILD)/corefreq-ui.o: $(HW)/corefreq-ui.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
+       $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-ui.c -o $(BUILD)/corefreq-ui.o
 
 $(BUILD)/corefreq-cli.o: $(HW)/corefreq-cli.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
+       $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
          -c $(HW)/corefreq-cli.c -o $(BUILD)/corefreq-cli.o
 
 $(BUILD)/corefreq-cli-rsc.o: $(HW)/corefreq-cli-rsc.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
+       $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) $(LAYOUT) \
          -c $(HW)/corefreq-cli-rsc.c -o $(BUILD)/corefreq-cli-rsc.o
 
 $(BUILD)/corefreq-cli-json.o: $(HW)/corefreq-cli-json.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
+       $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-cli-json.c -o $(BUILD)/corefreq-cli-json.o
 
 $(BUILD)/corefreq-cli-extra.o: $(HW)/corefreq-cli-extra.c
-       $(if $(V), $(CC), @echo "  CC [$@]"; \
-       $(CC)) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
+       $(CC) $(OPTIM_FLG) $(WARNING) $(DEFINITIONS) \
          -c $(HW)/corefreq-cli-extra.c -o $(BUILD)/corefreq-cli-extra.o
 
 $(BUILD)/corefreq-cli: $(BUILD)/corefreq-cli.o \
@@ -274,8 +232,7 @@ $(BUILD)/corefreq-cli:      $(BUILD)/corefreq-cli.o \
                        $(BUILD)/corefreq-cli-rsc.o \
                        $(BUILD)/corefreq-cli-json.o \
                        $(BUILD)/corefreq-cli-extra.o
-       $(if $(V), $(CC), @echo "  LD [$@]"; \
-       $(CC)) $(OPTIM_FLG) -o $(BUILD)/corefreq-cli \
+       $(CC) $(OPTIM_FLG) -o $(BUILD)/corefreq-cli \
          $(BUILD)/corefreq-cli.o $(BUILD)/corefreq-ui.o \
          $(BUILD)/corefreq-cli-rsc.o $(BUILD)/corefreq-cli-json.o \
          $(BUILD)/corefreq-cli-extra.o -lm -lrt -lc
@@ -312,9 +269,6 @@ help:
        "o---------------------------------------------------------------o\n"\
        "|  make [all] [clean] [info] [help] [install] [module-install]  |\n"\
        "|                                                               |\n"\
-       "|  V=<n>                                                        |\n"\
-       "|    where <n> is the verbose build level                       |\n"\
-       "|                                                               |\n"\
        "|  CC=<COMPILER>                                                |\n"\
        "|    where <COMPILER> is cc, gcc, clang                         |\n"\
        "|                                                               |\n"\
@@ -378,13 +332,12 @@ help:
        "|      when <F> is 1: don't build and display this area part    |\n"\
        "|    UI_TRANSPARENCY=<F>                                        |\n"\
        "|      when <F> is 1: build with background transparency        |\n"\
-       "|    UI_RULER_MINIMUM=<N>, UI_RULER_MAXIMUM=<N>                 |\n"\
-       "|      set ruler left or right bound to <N> frequency ratio     |\n"\
        "|                                                               |\n"\
        "|  Example:                                                     |\n"\
-       "|    make CC=gcc OPTIM_LVL=3 FEAT_DBG=1 ARCH_PMC=PCU \\          |\n"\
-       "|         MSR_CORE_PERF_UCC=MSR_CORE_PERF_FIXED_CTR1 \\          |\n"\
-       "|         MSR_CORE_PERF_URC=MSR_CORE_PERF_FIXED_CTR2 \\          |\n"\
-       "|         HWM_CHIPSET=W83627 MAX_FREQ_HZ=5350000000  \\          |\n"\
+       "|    make CC=gcc OPTIM_LVL=3 FEAT_DBG=1 ARCH_PMC=PCU            |\n"\
+       "|         MSR_CORE_PERF_UCC=MSR_CORE_PERF_FIXED_CTR1            |\n"\
+       "|         MSR_CORE_PERF_URC=MSR_CORE_PERF_FIXED_CTR2            |\n"\
+       "|         HWM_CHIPSET=W83627 MAX_FREQ_HZ=5350000000             |\n"\
        "|         CORE_COUNT=1024 NO_FOOTER=1 NO_UPPER=1                |\n"\
+       "|         clean all                                             |\n"\
        "o---------------------------------------------------------------o"

@cyring
Copy link
Owner

cyring commented Mar 2, 2025

@inglor: Hello
Do you still have an issue ?

@inglor
Copy link
Contributor Author

inglor commented Mar 2, 2025

@cyring You provided context on what changes are doing on Makefile which I could (and was) already knew from reading the commits. In fact I already knew what each of those are doing because I needed to re-write my patch for each of them.

My issue (question) was more why the Makefile is not mostly static as per most of projects. This raises another topic (again) about why this project doesn't take into account environmental variables set from user when calling the make commands which is something most projects do. I've raised this before and didn't get a clear answer hence I was patching the Makefile myself. I understand if you want it your way of doing things but this just raises questions downstream (packaging in distros) on why this is the case, hence my question.

@cyring
Copy link
Owner

cyring commented Mar 2, 2025

@cyring You provided context on what changes are doing on Makefile which I could (and was) already knew from reading the commits. In fact I already knew what each of those are doing because I needed to re-write my patch for each of them.

My issue (question) was more why the Makefile is not mostly static as per most of projects. This raises another topic (again) about why this project doesn't take into account environmental variables set from user when calling the make commands which is something most projects do. I've raised this before and didn't get a clear answer hence I was patching the Makefile myself. I understand if you want it your way of doing things but this just raises questions downstream (packaging in distros) on why this is the case, hence my question.

I tried to find a way for a building solution which pleases the various distros.
Pull Requests are welcomed on this project ; although proposed changes to the Makefile have to cover more than one disto and be retro-compatible down to old version 3 kernels.
The Makefile is also used by the Live CD.
I'm truly opened to any PR

@cyring
Copy link
Owner

cyring commented Mar 16, 2025

Hello,

Among new changes, Makefile is impacted at these lines

ccflags-y += -D DT_VIRTUAL_BOARD='{ \

This a list of device tree strings which identify a virtual machine. List is shared between the 3 ISA: aarch64, riscv, ppc64.
Purpose is to extend that list at will in future.

CyrIng

Repository owner locked and limited conversation to collaborators Mar 22, 2025
@cyring cyring converted this issue into discussion #534 Mar 22, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Projects
None yet
Development

No branches or pull requests

2 participants