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: centrino-decode.c 15 $(CC) $(CFLAGS) -o $@ centrino-decode.c 16 17$(OUTPUT)dump_psb: dump_psb.c 18 $(CC) $(CFLAGS) -o $@ dump_psb.c 19 20$(OUTPUT)intel_gsic: intel_gsic.c 21 $(CC) $(CFLAGS) -o $@ -llrmi intel_gsic.c 22 23$(OUTPUT)powernow-k8-decode: powernow-k8-decode.c 24 $(CC) $(CFLAGS) -o $@ powernow-k8-decode.c 25 26all: $(OUTPUT)centrino-decode $(OUTPUT)dump_psb $(OUTPUT)intel_gsic $(OUTPUT)powernow-k8-decode 27 28clean: 29 rm -rf $(OUTPUT)centrino-decode 30 rm -rf $(OUTPUT)dump_psb 31 rm -rf $(OUTPUT)intel_gsic 32 rm -rf $(OUTPUT)powernow-k8-decode 33 34install: 35 $(INSTALL) -d $(DESTDIR)${bindir} 36 $(INSTALL) $(OUTPUT)centrino-decode $(DESTDIR)${bindir} 37 $(INSTALL) $(OUTPUT)powernow-k8-decode $(DESTDIR)${bindir} 38 $(INSTALL) $(OUTPUT)dump_psb $(DESTDIR)${bindir} 39 $(INSTALL) $(OUTPUT)intel_gsic $(DESTDIR)${bindir} 40 41.PHONY: all default clean install 42