xref: /openbmc/linux/tools/arch/x86/kcpuid/Makefile (revision 08f3e087)
1# SPDX-License-Identifier: GPL-2.0
2# Makefile for x86/kcpuid tool
3
4kcpuid : kcpuid.c
5
6CFLAGS = -Wextra
7
8BINDIR ?= /usr/sbin
9
10HWDATADIR ?= /usr/share/misc/
11
12override CFLAGS += -O2 -Wall -I../../../include
13
14%: %.c
15	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)
16
17.PHONY : clean
18clean :
19	@rm -f kcpuid
20
21install : kcpuid
22	install -d  $(DESTDIR)$(BINDIR)
23	install -m 755 -p kcpuid $(DESTDIR)$(BINDIR)/kcpuid
24	install -m 444 -p cpuid.csv $(HWDATADIR)/cpuid.csv
25