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 6fe5f97..a16e74c 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 d170161..1edba9f 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 69a86d5..4b43f61 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)