this makes modules with a binary helper simpler to build using the parent module build harness as much as possible. i probably could simplify this down to a single binary only and it is either setuid or not... define the deps and flags ... it could be a bit simpler. not much. i also removed the if's in the build for battery and ifdefs in src handle it instead (imho simpler to maintain in src). sysinfo still uses the if's there.devs/derekf/for_derbyw
parent
fe7c39fa18
commit
16a702ac73
8 changed files with 112 additions and 185 deletions
@ -1,45 +1,18 @@ |
||||
battery_dist = [ |
||||
'e-module-battery.edj', |
||||
'module.desktop', |
||||
] |
||||
src = files( |
||||
'e_mod_main.c', |
||||
'e_mod_config.c', |
||||
'e_mod_sysctl.c', |
||||
'e_mod_udev.c', |
||||
'e_mod_upower.c', |
||||
'e_mod_main.h' |
||||
) |
||||
|
||||
battery_src = [ |
||||
'e_mod_config.c', |
||||
'e_mod_main.c', |
||||
'e_mod_main.h', |
||||
] |
||||
|
||||
if config_h.has('HAVE_EEZE') == true |
||||
battery_src += 'e_mod_udev.c' |
||||
elif host_machine.system().contains('bsd') == true |
||||
battery_src += 'e_mod_sysctl.c' |
||||
else |
||||
battery_src += 'e_mod_upower.c' |
||||
endif |
||||
|
||||
battery_dir = join_paths(dir_module_e, 'battery', module_arch) |
||||
if get_option('battery') == true |
||||
config_h.set('USE_MODULE_BATTERY', '1') |
||||
|
||||
install_data(battery_dist, |
||||
install_dir: join_paths(dir_module_e, 'battery') |
||||
) |
||||
|
||||
module_files += join_paths(battery_dir, 'battery.so') |
||||
shared_module('battery', |
||||
battery_src, |
||||
include_directories: include_directories(module_includes), |
||||
name_prefix: '', |
||||
dependencies: module_deps, |
||||
install_dir: battery_dir, |
||||
install: true |
||||
) |
||||
|
||||
executable('batget', |
||||
'batget.c', |
||||
include_directories: include_directories(module_includes), |
||||
dependencies: [dep_eina, dep_ecore, dep_ecore_con, dep_ecore_file], |
||||
install_dir: battery_dir, |
||||
install: true |
||||
) |
||||
if get_option(m) == true |
||||
executable('batget', |
||||
'batget.c', |
||||
include_directories: include_directories(module_includes), |
||||
dependencies : [ dep_eina, dep_ecore, dep_ecore_con, dep_ecore_file ], |
||||
install_dir : _dir_bin, |
||||
install : true |
||||
) |
||||
endif |
||||
|
@ -1,40 +1,17 @@ |
||||
cpufreq_dist = [ |
||||
'e-module-cpufreq.edj', |
||||
'module.desktop', |
||||
] |
||||
src = files( |
||||
'e_mod_main.c', |
||||
'e_mod_config.c', |
||||
'e_mod_main.h' |
||||
) |
||||
|
||||
cpufreq_src = [ |
||||
'e_mod_config.c', |
||||
'e_mod_main.c', |
||||
'freqset.c', |
||||
'e_mod_main.h', |
||||
] |
||||
|
||||
cpufreq_dir = join_paths(dir_module_e, 'cpufreq', module_arch) |
||||
if get_option('cpufreq') == true |
||||
config_h.set('USE_MODULE_CPUFREQ', '1') |
||||
|
||||
install_data(cpufreq_dist, |
||||
install_dir: join_paths(dir_module_e, 'cpufreq') |
||||
) |
||||
|
||||
module_files += join_paths(cpufreq_dir, 'cpufreq.so') |
||||
shared_module('cpufreq', |
||||
cpufreq_src, |
||||
include_directories: include_directories(module_includes), |
||||
name_prefix: '', |
||||
dependencies: module_deps, |
||||
install_dir: cpufreq_dir, |
||||
install: true |
||||
) |
||||
|
||||
executable('freqset', |
||||
'freqset.c', |
||||
c_args: suid_cflags, |
||||
link_args: suid_ldflags, |
||||
install_dir: cpufreq_dir, |
||||
install: true |
||||
) |
||||
suid_exes += join_paths(cpufreq_dir, 'freqset') |
||||
if get_option(m) == true |
||||
executable('freqset', |
||||
'freqset.c', |
||||
c_args : suid_cflags, |
||||
link_args : suid_ldflags, |
||||
install_dir: _dir_bin, |
||||
install : true |
||||
) |
||||
suid_exes += join_paths(_dir_bin, 'freqset') |
||||
endif |
||||
|
||||
|
Loading…
Reference in new issue