ks_features_dir=${modules_dir}/ks_features
sampler_dir=${modules_dir}/sampler
parser_dir=${modules_dir}/parser
+energy_dir=${modules_dir}/energy
install_dir="/opt/swap/sdk"
writer_module_name=swap_writer.ko
writer_inc=${modules_inc}
-make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${writer_dir} modules || exit 1
+make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${writer_dir} \
+ extra_cflags="-I${modules_dir}" modules || exit 1
driver_module_name=swap_driver.ko
make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${driver_dir} \
make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${parser_dir} \
extra_cflags="-I${modules_dir}" modules || exit 1
+energy_module_name=swap_energy.ko
+make CROSS_COMPILE=${cross_compile} ARCH=${arch} -C ${kernel_dir} M=${energy_dir} \
+ extra_cflags="-I${modules_dir} -I${kprobe_dir} -I${kprobe_arch_dir}" modules || exit 1
+
modules=\
"${buffer_dir}/${buffer_module_name} \
${writer_dir}/${writer_module_name} \
${us_manager_dir}/${us_manager_module_name} \
${ks_features_dir}/${ks_features_module_name} \
${sampler_dir}/${sampler_module_name} \
-${parser_dir}/${parser_module_name}"
+${parser_dir}/${parser_module_name} \
+${energy_dir}/${energy_module_name}"
# for m in ${modules} ; do
# sdb -e push $m ${install_dir}