summaryrefslogtreecommitdiffstats
path: root/kernel/tools/power/acpi/Makefile.rules
blob: ec87a9e562c0ea0cd08c0cee096850e28f8615e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# tools/power/acpi/Makefile.rules - ACPI tool Makefile
#
# Copyright (c) 2015, Intel Corporation
#   Author: Lv Zheng <lv.zheng@intel.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.

$(OUTPUT)$(TOOL): $(TOOL_OBJS) FORCE
	$(ECHO) "  LD      " $@
	$(QUIET) $(LD) $(CFLAGS) $(LDFLAGS) $(TOOL_OBJS) -L$(OUTPUT) -o $@
	$(QUIET) $(STRIPCMD) $@

$(OUTPUT)%.o: %.c
	$(ECHO) "  CC      " $@
	$(QUIET) $(CC) -c $(CFLAGS) -o $@ $<

all: $(OUTPUT)$(TOOL)
clean:
	-find $(OUTPUT) \( -not -type d \) \
	-and \( -name '*~' -o -name '*.[oas]' \) \
	-type f -print \
	 | xargs rm -f
	-rm -f $(OUTPUT)$(TOOL)

install-tools:
	$(INSTALL) -d $(DESTDIR)${sbindir}
	$(INSTALL_PROGRAM) $(OUTPUT)$(TOOL) $(DESTDIR)${sbindir}
uninstall-tools:
	- rm -f $(DESTDIR)${sbindir}/$(TOOL)

install: all install-tools $(EXTRA_INSTALL)
uninstall: uninstall-tools $(EXTRA_UNINSTALL)

.PHONY: FORCE