summaryrefslogtreecommitdiff
path: root/src/Makefile.am
blob: 8dce4db4e2c86e30b6504c56eb5682efa7ae4937 (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
44
45
46
47
48
49
50
51
52
53
54
55
pm_utils_libdir = $(libdir)/pm-utils
pm_utils_bindir = $(pm_utils_libdir)/bin
pm_sysconfdir = $(sysconfdir)/pm

pm_utils_bin_PROGRAMS =		\
	pm-pmu			\
	pm-reset-swap

pm_utils_bin_SCRIPTS =		\
	pm-action

pm_utils_usr_bindir = $(bindir)

pm_utils_usr_bin_SCRIPTS =	\
	pm-is-supported

pm_pmu_SOURCES = 		\
	pm-pmu.c

pm_reset_swap_SOURCES = 	\
	pm-reset-swap.c

extradir = $(sbindir)

extra_SCRIPTS =			\
	pm-powersave

acpowerdir = $(bindir)

acpower_SCRIPTS =		\
	on_ac_power

do_subst = sed -e 's,[@]PM-UTILS-LIBDIR[@],$(pm_utils_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_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend
	-ln -s $(pm_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-hibernate
	-ln -s $(pm_utils_bindir)/pm-action $(DESTDIR)$(sbindir)/pm-suspend-hybrid

EXTRA_DIST =				\
	$(extra_SCRIPTS)		\
	$(acpower_SCRIPTS)		\
	$(pm_utils_bin_SCRIPTS)		\
	$(pm_utils_usr_bin_SCRIPTS)

clean-local :
	rm -f *~