diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-11-21 17:22:21 -0800 |
| commit | 4843f6873f7c4835e62f2c73ba0fd538e57a2f22 (patch) | |
| tree | ee620501a1ffbad9a83141e3a70154e1fe641040 /tools/platform/x86/amd/Makefile | |
| download | linux-master.tar.gz linux-master.zip | |
Merge tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctlgraftedHEADmaster
Pull sysctl fix from Joel Granados:
"Fix sysctl jiffy / milliseconds conversion:
- Writing a previously read value "X" shall keep the same "X" value
- Remove truncation that was causing incorrect saturation of valid
timeouts"
* tag 'sysctl-7.04-fixes-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/sysctl/sysctl:
sysctl: Do jiffy / ms conversion in ulong space
Diffstat (limited to 'tools/platform/x86/amd/Makefile')
| -rw-r--r-- | tools/platform/x86/amd/Makefile | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tools/platform/x86/amd/Makefile b/tools/platform/x86/amd/Makefile new file mode 100644 index 000000000..5d820df58 --- /dev/null +++ b/tools/platform/x86/amd/Makefile @@ -0,0 +1,60 @@ +# SPDX-License-Identifier: GPL-2.0 +ifeq ($(srctree),) +srctree := $(patsubst %/,%,$(dir $(CURDIR))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +srctree := $(patsubst %/,%,$(dir $(srctree))) +endif + +# Include common tools build infrastructure +include $(srctree)/tools/scripts/Makefile.include + +CC = $(CROSS_COMPILE)gcc +BUILD_OUTPUT := $(CURDIR) +PREFIX ?= /usr +DESTDIR ?= + +ifeq ("$(origin O)", "command line") + BUILD_OUTPUT := $(O) +endif + +# Include paths: tools/include has linux/kernel.h with ARRAY_SIZE +INCLUDES = -I$(srctree)/tools/include +INCLUDES += -I$(srctree)/tools/include/uapi +INCLUDES += -I$(srctree)/include/uapi +INCLUDES += -I$(srctree)/include + +override CFLAGS += -O2 -Wall -Wextra -D_GNU_SOURCE $(INCLUDES) +override CFLAGS += -D_FILE_OFFSET_BITS=64 +override CFLAGS += -D__EXPORTED_HEADERS__ + +TARGETS = test_amd_pmf + +all: $(TARGETS) + +test_amd_pmf: test-pmf.c + $(QUIET_CC)$(CC) $(CFLAGS) $< -o $(BUILD_OUTPUT)/$@ $(LDFLAGS) + +.PHONY: clean +clean: + $(call QUIET_CLEAN, test_amd_pmf)$(RM) $(BUILD_OUTPUT)/test_amd_pmf + +.PHONY: install +install: $(TARGETS) + $(INSTALL) -d $(DESTDIR)$(PREFIX)/bin + $(INSTALL) $(BUILD_OUTPUT)/test_amd_pmf $(DESTDIR)$(PREFIX)/bin/test_amd_pmf + +.PHONY: help +help: + @echo "AMD Platform Tools Makefile" + @echo "" + @echo "Targets:" + @echo " all - Build all tools (default)" + @echo " test_amd_pmf - Build the PMF test tool" + @echo " clean - Remove built files" + @echo " install - Install tools to $(PREFIX)/bin" + @echo "" + @echo "Variables:" + @echo " O=<dir> - Build output directory" + @echo " PREFIX - Installation prefix (default: /usr)" + @echo " DESTDIR - Destination directory for install" |
