2653fe4
From 93e52afc389c98880b91d61cf47c0603f4654ccd Mon Sep 17 00:00:00 2001
2653fe4
From: lambdadroid <lambdadroid@gmail.com>
2653fe4
Date: Tue, 6 Jun 2017 15:39:42 +0200
2653fe4
Subject: [PATCH] Android: Fix build file
2653fe4
2653fe4
Android.mk was missing several source files, causing compile
2653fe4
errors. Also removed some unneeded explicit include directories.
2653fe4
---
2653fe4
 Android.mk | 73 ++++++++++++++++++++++++++++----------------------------------
2653fe4
 1 file changed, 33 insertions(+), 40 deletions(-)
2653fe4
2653fe4
diff --git a/Android.mk b/Android.mk
2653fe4
index 8ef9cf3..1a40bda 100644
2653fe4
--- a/Android.mk
2653fe4
+++ b/Android.mk
2653fe4
@@ -2,51 +2,44 @@ LOCAL_PATH:= $(call my-dir)
2653fe4
 
2653fe4
 include $(CLEAR_VARS)
2653fe4
 
2653fe4
-thermald_src_path := ./src
2653fe4
-thermald_src_files := \
2653fe4
-		$(thermald_src_path)/android_main.cpp \
2653fe4
-		$(thermald_src_path)/thd_engine.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_therm_sys_fs.cpp \
2653fe4
-		$(thermald_src_path)/thd_engine_default.cpp \
2653fe4
-		$(thermald_src_path)/thd_sys_fs.cpp \
2653fe4
-		$(thermald_src_path)/thd_trip_point.cpp \
2653fe4
-		$(thermald_src_path)/thd_zone.cpp \
2653fe4
-		$(thermald_src_path)/thd_zone_surface.cpp \
2653fe4
-		$(thermald_src_path)/thd_zone_cpu.cpp \
2653fe4
-		$(thermald_src_path)/thd_zone_therm_sys_fs.cpp \
2653fe4
-		$(thermald_src_path)/thd_preference.cpp \
2653fe4
-		$(thermald_src_path)/thd_model.cpp \
2653fe4
-		$(thermald_src_path)/thd_parse.cpp \
2653fe4
-		$(thermald_src_path)/thd_sensor.cpp \
2653fe4
-		$(thermald_src_path)/thd_sensor_virtual.cpp \
2653fe4
-		$(thermald_src_path)/thd_kobj_uevent.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_order_parser.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_gen_sysfs.cpp \
2653fe4
-		$(thermald_src_path)/thd_pid.cpp \
2653fe4
-		$(thermald_src_path)/thd_zone_generic.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_cpufreq.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_rapl.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_intel_pstate_driver.cpp \
2653fe4
-		$(thermald_src_path)/thd_msr.cpp \
2653fe4
-		$(thermald_src_path)/thd_rapl_interface.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_msr_rapl.cpp \
2653fe4
-		$(thermald_src_path)/thd_rapl_power_meter.cpp \
2653fe4
-		$(thermald_src_path)/thd_trt_art_reader.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_rapl_dram.cpp \
2653fe4
-		$(thermald_src_path)/thd_cpu_default_binding.cpp \
2653fe4
-		$(thermald_src_path)/thd_cdev_backlight.cpp
2653fe4
+LOCAL_SRC_FILES := \
2653fe4
+		src/android_main.cpp \
2653fe4
+		src/thd_engine.cpp \
2653fe4
+		src/thd_cdev.cpp \
2653fe4
+		src/thd_cdev_therm_sys_fs.cpp \
2653fe4
+		src/thd_engine_default.cpp \
2653fe4
+		src/thd_sys_fs.cpp \
2653fe4
+		src/thd_trip_point.cpp \
2653fe4
+		src/thd_zone.cpp \
2653fe4
+		src/thd_zone_surface.cpp \
2653fe4
+		src/thd_zone_cpu.cpp \
2653fe4
+		src/thd_zone_therm_sys_fs.cpp \
2653fe4
+		src/thd_zone_dynamic.cpp \
2653fe4
+		src/thd_preference.cpp \
2653fe4
+		src/thd_model.cpp \
2653fe4
+		src/thd_parse.cpp \
2653fe4
+		src/thd_sensor.cpp \
2653fe4
+		src/thd_sensor_virtual.cpp \
2653fe4
+		src/thd_kobj_uevent.cpp \
2653fe4
+		src/thd_cdev_order_parser.cpp \
2653fe4
+		src/thd_cdev_gen_sysfs.cpp \
2653fe4
+		src/thd_pid.cpp \
2653fe4
+		src/thd_zone_generic.cpp \
2653fe4
+		src/thd_cdev_cpufreq.cpp \
2653fe4
+		src/thd_cdev_rapl.cpp \
2653fe4
+		src/thd_cdev_intel_pstate_driver.cpp \
2653fe4
+		src/thd_rapl_power_meter.cpp \
2653fe4
+		src/thd_trt_art_reader.cpp \
2653fe4
+		src/thd_cdev_rapl_dram.cpp \
2653fe4
+		src/thd_cpu_default_binding.cpp \
2653fe4
+		src/thd_cdev_backlight.cpp
2653fe4
 
2653fe4
-LOCAL_C_INCLUDES += $(LOCAL_PATH) $(thermald_src_path) \
2653fe4
-			external/icu4c/common \
2653fe4
-			external/libxml2/include \
2653fe4
-			system/core/include/
2653fe4
+LOCAL_C_INCLUDES += external/libxml2/include
2653fe4
 
2653fe4
 LOCAL_MODULE_TAGS := optional
2653fe4
-LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"'
2653fe4
+LOCAL_CFLAGS := -DTDRUNDIR='"/data/thermal-daemon"' -DTDCONFDIR='"/system/etc/thermal-daemon"' -Wno-unused-parameter
2653fe4
 LOCAL_STATIC_LIBRARIES := libxml2
2653fe4
 LOCAL_SHARED_LIBRARIES := liblog libcutils libdl libc++ libicuuc libicui18n libbinder libutils
2653fe4
 LOCAL_PRELINK_MODULE := false
2653fe4
-LOCAL_SRC_FILES := $(thermald_src_files)
2653fe4
 LOCAL_MODULE := thermal-daemon
2653fe4
 include $(BUILD_EXECUTABLE)