1# SPDX-License-Identifier: GPL-2.0
2OUTPUT=./
3ifeq ("$(origin O)", "command line")
4	OUTPUT := $(O)/
5endif
6
7DESTDIR =
8bindir  = /usr/bin
9
10INSTALL = /usr/bin/install
11
12
13default: all
14
15$(OUTPUT)centrino-decode: ../i386/centrino-decode.c
16	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
17
18$(OUTPUT)powernow-k8-decode: ../i386/powernow-k8-decode.c
19	$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $<
20
21all: $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
22
23clean:
24	rm -rf $(OUTPUT)centrino-decode $(OUTPUT)powernow-k8-decode
25
26install:
27	$(INSTALL) -d $(DESTDIR)${bindir}
28	$(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir}
29	$(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir}
30
31.PHONY: all default clean install
32