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