hal: Move LOG_TAG definition to makefile to remove the duplicate 24/184524/1
authorChanwoo Choi <cw00.choi@samsung.com>
Tue, 17 Jul 2018 09:38:21 +0000 (18:38 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Wed, 18 Jul 2018 11:04:32 +0000 (20:04 +0900)
Each log header file defines LOG_TAG. It defines LOG_TAG on Makefile
in order to remove the duplicate definitions.

Change-Id: I3b4b08008e259fe3a0c8257ffaad0f291666a0c4
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
CMakeLists.txt
include/pass/log.h
src/hal/hal-log.h

index 6fe5f974e1da3c63517a022da8b39489cd02cb68..a16e74c2d48a61acbe64d1c413da89b1b60880dd 100644 (file)
@@ -66,6 +66,7 @@ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functi
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -lrt")
 SET(CMAKE_EXE_LINKER_FLAGS "-pie")
 
+ADD_DEFINITIONS("-DLOG_TAG=\"PASS\"")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DFACTORYFS=\"$ENV{FACTORYFS}\"")
 ADD_DEFINITIONS("-DLIBPATH=\"${LIB_INSTALL_DIR}\"")
index d170161de83a93c70629dd19cafd6c4a0618f9f8..1edba9f727dc35e1d65e41bc3077a04f2d4a88ca 100644 (file)
 #define __LOG_H__
 
 #include <dlog.h>
-#ifdef LOG_TAG
-#undef LOG_TAG
-#define LOG_TAG "PASS"
-#endif /* LOG_TAG */
 
 #define _D(fmt, arg...)                do { SLOGD(fmt, ##arg); } while (0)
 #define _I(fmt, arg...)                do { SLOGI(fmt, ##arg); } while (0)
index 69a86d554dc8ed60aad2b3c109ab2d274efc804a..4b43f614292bc4641f5041862600ce9a73bf7fb0 100644 (file)
 #define __HAL_LOG_H__
 
 #include <dlog.h>
-#ifdef LOG_TAG
-#undef LOG_TAG
-#define LOG_TAG "PASS"
-#endif /* LOG_TAG */
 
 #define _D(fmt, arg...)                do { SLOGD(fmt, ##arg); } while (0)
 #define _I(fmt, arg...)                do { SLOGI(fmt, ##arg); } while (0)