Makefile.rules 1023 B

12345678910111213141516171819202122232425262728293031323334353637
  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. $(OUTPUT)$(TOOL): $(TOOL_OBJS) FORCE
  11. $(ECHO) " LD " $@
  12. $(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(TOOL_OBJS) -L$(OUTPUT) -o $@
  13. $(QUIET) $(STRIPCMD) $@
  14. $(OUTPUT)%.o: %.c
  15. $(ECHO) " CC " $@
  16. $(QUIET) $(CC) -c $(CFLAGS) -o $@ $<
  17. all: $(OUTPUT)$(TOOL)
  18. clean:
  19. -find $(OUTPUT) \( -not -type d \) \
  20. -and \( -name '*~' -o -name '*.[oas]' \) \
  21. -type f -print \
  22. | xargs rm -f
  23. -rm -f $(OUTPUT)$(TOOL)
  24. install-tools:
  25. $(INSTALL) -d $(DESTDIR)${sbindir}
  26. $(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)${sbindir}
  27. uninstall-tools:
  28. - rm -f $(DESTDIR)${sbindir}/$(TOOL)
  29. install: all install-tools $(EXTRA_INSTALL)
  30. uninstall: uninstall-tools $(EXTRA_UNINSTALL)
  31. .PHONY: FORCE