qemu-server/query-machine-capabilities/Makefile
Markus Frank c9eee44b47 add C program to get hardware capabilities from CPUID
Implement a C program that extracts AMD SEV hardware information such
as reduced-phys-bios and cbitpos from CPUID, looks if SEV, SEV-ES &
SEV-SNP are enabled, and outputs these details as JSON to
/run/qemu-server/host-hw-capabilities.json

This program can also be used to read and save other hardware
information.

Signed-off-by: Markus Frank <m.frank@proxmox.com>
Co-authored-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Reviewed-by: Fiona Ebner <f.ebner@proxmox.com>
2024-11-17 18:37:03 +01:00

19 lines
466 B
Makefile

DESTDIR=
PREFIX=/usr
BINDIR=${PREFIX}/libexec/qemu-server
CC ?= gcc
CFLAGS += -O2 -fanalyzer -Werror -Wall -Wextra -Wpedantic -Wtype-limits -Wl,-z,relro -std=gnu11
query-machine-capabilities: query-machine-capabilities.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
.PHONY: install
install: query-machine-capabilities
install -d ${DESTDIR}/${BINDIR}
install -m 0755 query-machine-capabilities ${DESTDIR}${BINDIR}
.PHONY: clean
clean:
rm -f query-machine-capabilities