1# tools/power/acpi/Makefile.rules - ACPI tool Makefile 2# 3# Copyright (c) 2015, Intel Corporation 4# Author: Lv Zheng <lv.zheng@intel.com> 5# 6# This program is free software; you can redistribute it and/or 7# modify it under the terms of the GNU General Public License 8# as published by the Free Software Foundation; version 2 9# of the License. 10 11$(OUTPUT)$(TOOL): $(TOOL_OBJS) FORCE 12 $(ECHO) " LD " $@ 13 $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(TOOL_OBJS) -L$(OUTPUT) -o $@ 14 $(QUIET) $(STRIPCMD) $@ 15 16$(OUTPUT)%.o: %.c 17 $(ECHO) " CC " $@ 18 $(QUIET) $(CC) -c $(CFLAGS) -o $@ $< 19 20all: $(OUTPUT)$(TOOL) 21clean: 22 -find $(OUTPUT) \( -not -type d \) \ 23 -and \( -name '*~' -o -name '*.[oas]' \) \ 24 -type f -print \ 25 | xargs rm -f 26 -rm -f $(OUTPUT)$(TOOL) 27 28install-tools: 29 $(INSTALL) -d $(DESTDIR)${sbindir} 30 $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)${sbindir} 31uninstall-tools: 32 - rm -f $(DESTDIR)${sbindir}/$(TOOL) 33 34install: all install-tools $(EXTRA_INSTALL) 35uninstall: uninstall-tools $(EXTRA_UNINSTALL) 36 37.PHONY: FORCE 38