summaryrefslogtreecommitdiff
path: root/src/modules/Makefile_cpufreq.am
blob: 2d2bb9672a592db5da939b72d83914bf7227cd07 (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
cpufreqdir = $(MDIR)/cpufreq
cpufreq_DATA = cpufreq/e-module-cpufreq.edj \
	       cpufreq/module.desktop

EXTRA_DIST += $(cpufreq_DATA)

cpufreqpkgdir = $(MDIR)/cpufreq/$(MODULE_ARCH)
cpufreqpkg_LTLIBRARIES = cpufreq/module.la

cpufreq_module_la_SOURCES  = cpufreq/e_mod_main.h \
			     cpufreq/e_mod_main.c

freqsetdir = $(cpufreqpkgdir)
freqset_PROGRAMS = cpufreq/freqset

cpufreq_freqset_SOURCES = cpufreq/freqset.c
cpufreq_freqset_CFLAGS  = @e_cflags@ @SUID_CFLAGS@
cpufreq_freqset_LDFLAGS = @SUID_LDFLAGS@

cpufreq_setuid_root_mode = a=rx,u+xs
cpufreq_setuid_root_user = root

cpufreq-install-data-hook:
	@chown $(cpufreq_setuid_root_user) $(DESTDIR)$(freqsetdir)/freqset$(EXEEXT) || true
	@chmod $(cpufreq_setuid_root_mode) $(DESTDIR)$(freqsetdir)/freqset$(EXEEXT) || true

INSTALL_DATA_HOOKS += cpufreq-install-data-hook

.PHONY: cpufreq install-cpufreq
cpufreq: $(cpufreqpkg_LTLIBRARIES) $(cpufreq_DATA) $(freqset_PROGRAMS)
install-cpufreq: install-cpufreqDATA install-cpufreqpkgLTLIBRARIES install-freqsetPROGRAMS