summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 748a956674e9d40f5cba3cb93659dd01fbbc4a34 (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
38
39
40
41
42
43
pm_libdir = $(libdir)/pm-utils
pm_bindir = $(pm_libdir)/bin
pm_sysconfdir = $(sysconfdir)/pm

pm_bin_PROGRAMS =		\
	pm-pmu			\
	pm-reset-swap

pm_pmu_SOURCES = pm-pmu.c

pm_reset_swap_SOURCES = pm-reset-swap.c

pm_bin_SCRIPTS = pm-action service

bin_SCRIPTS = pm-is-supported

dist_bin_SCRIPTS = on_ac_power

sbin_SCRIPTS = pm-powersave

script_in_files = pm-action.in pm-is-supported.in pm-powersave.in service

CLEANFILES =  $(script_in_files:.in=)

EXTRA_DIST = $(script_in_files)

do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_libdir),g' \
	   -e 's,[@]PM-UTILS-SYSCONFDIR[@],$(pm_sysconfdir),g'

SUFFIXES = .in

.in:
	$(do_subst) $< >$@
	chmod +x $@

install-data-hook:
	-mkdir -p $(DESTDIR)$(sbindir)
	-ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend
	-ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate
	-ln -s $(pm_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid

clean-local :
	rm -f *~