Blob Blame Raw
From 93e52afc389c98880b91d61cf47c0603f4654ccd Mon Sep 17 00:00:00 2001
From: lambdadroid <lambdadroid@gmail.com>
Date: Tue, 6 Jun 2017 15:39:42 +0200
Subject: [PATCH] Android: Fix build file

Android.mk was missing several source files, causing compile
errors. Also removed some unneeded explicit include directories.
---
 Android.mk | 73 ++++++++++++++++++++++++++++----------------------------------
 1 file changed, 33 insertions(+), 40 deletions(-)

diff --git a/Android.mk b/Android.mk
index 8ef9cf3..1a40bda 100644
--- a/Android.mk
+++ b/Android.mk
@@ -2,51 +2,44 @@ LOCAL_PATH:= $(call my-dir)
 
 include $(CLEAR_VARS)
 
-thermald_src_path := ./src
-thermald_src_files := \
-		$(thermald_src_path)/android_main.cpp \
-		$(thermald_src_path)/thd_engine.cpp \
-		$(thermald_src_path)/thd_cdev.cpp \
-		$(thermald_src_path)/thd_cdev_therm_sys_fs.cpp \
-		$(thermald_src_path)/thd_engine_default.cpp \
-		$(thermald_src_path)/thd_sys_fs.cpp \
-		$(thermald_src_path)/thd_trip_point.cpp \
-		$(thermald_src_path)/thd_zone.cpp \
-		$(thermald_src_path)/thd_zone_surface.cpp \
-		$(thermald_src_path)/thd_zone_cpu.cpp \
-		$(thermald_src_path)/thd_zone_therm_sys_fs.cpp \
-		$(thermald_src_path)/thd_preference.cpp \
-		$(thermald_src_path)/thd_model.cpp \
-		$(thermald_src_path)/thd_parse.cpp \
-		$(thermald_src_path)/thd_sensor.cpp \
-		$(thermald_src_path)/thd_sensor_virtual.cpp \
-		$(thermald_src_path)/thd_kobj_uevent.cpp \
-		$(thermald_src_path)/thd_cdev_order_parser.cpp \
-		$(thermald_src_path)/thd_cdev_gen_sysfs.cpp \
-		$(thermald_src_path)/thd_pid.cpp \
-		$(thermald_src_path)/thd_zone_generic.cpp \
-		$(thermald_src_path)/thd_cdev_cpufreq.cpp \
-		$(thermald_src_path)/thd_cdev_rapl.cpp \
-		$(thermald_src_path)/thd_cdev_intel_pstate_driver.cpp \
-		$(thermald_src_path)/thd_msr.cpp \
-		$(thermald_src_path)/thd_rapl_interface.cpp \
-		$(thermald_src_path)/thd_cdev_msr_rapl.cpp \
-		$(thermald_src_path)/thd_rapl_power_meter.cpp \
-		$(thermald_src_path)/thd_trt_art_reader.cpp \
-		$(thermald_src_path)/thd_cdev_rapl_dram.cpp \
-		$(thermald_src_path)/thd_cpu_default_binding.cpp \
-		$(thermald_src_path)/thd_cdev_backlight.cpp
+LOCAL_SRC_FILES := \
+		src/android_main.cpp \
+		src/thd_engine.cpp \
+		src/thd_cdev.cpp \
+		src/thd_cdev_therm_sys_fs.cpp \
+		src/thd_engine_default.cpp \
+		src/thd_sys_fs.cpp \
+		src/thd_trip_point.cpp \
+		src/thd_zone.cpp \
+		src/thd_zone_surface.cpp \
+		src/thd_zone_cpu.cpp \
+		src/thd_zone_therm_sys_fs.cpp \
+		src/thd_zone_dynamic.cpp \
+		src/thd_preference.cpp \
+		src/thd_model.cpp \
+		src/thd_parse.cpp \
+		src/thd_sensor.cpp \
+		src/thd_sensor_virtual.cpp \
+		src/thd_kobj_uevent.cpp \
+		src/thd_cdev_order_parser.cpp \
+		src/thd_cdev_gen_sysfs.cpp \
+		src/thd_pid.cpp \
+		src/thd_zone_generic.cpp \
+		src/thd_cdev_cpufreq.cpp \
+		src/thd_cdev_rapl.cpp \
+		src/thd_cdev_intel_pstate_driver.cpp \
+		src/thd_rapl_power_meter.cpp \
+		src/thd_trt_art_reader.cpp \
+		src/thd_cdev_rapl_dram.cpp \
+		src/thd_cpu_default_binding.cpp \
+		src/thd_cdev_backlight.cpp
 
-LOCAL_C_INCLUDES += $(LOCAL_PATH) $(thermald_src_path) \
-			external/icu4c/common \
-			external/libxml2/include \
-			system/core/include/
+LOCAL_C_INCLUDES += external/libxml2/include
 
 LOCAL_MODULE_TAGS := optional
-LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"'
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter
 LOCAL_STATIC_LIBRARIES := libxml2
 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
 LOCAL_PRELINK_MODULE := false
-LOCAL_SRC_FILES := $(thermald_src_files)
 LOCAL_MODULE := thermal-daemon
 include $(BUILD_EXECUTABLE)