diff options
author | Karol Lewandowski <k.lewandowsk@samsung.com> | 2019-03-26 15:00:42 +0100 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2019-03-26 15:12:07 +0100 |
commit | d8dc7ed6a38eb9e3af75f599885e4003c14a2d68 (patch) | |
tree | 92c824993044c2f0929df4bc49c995840b15cca5 | |
parent | a155687265c946a3187f2afe42ed118287babff1 (diff) | |
download | crash-worker-d8dc7ed6a38eb9e3af75f599885e4003c14a2d68.tar.gz crash-worker-d8dc7ed6a38eb9e3af75f599885e4003c14a2d68.tar.bz2 crash-worker-d8dc7ed6a38eb9e3af75f599885e4003c14a2d68.zip |
defs
Change-Id: I683267555f45b3b0896b48ee9988568a9964dabb
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | include/CMakeLists.txt | 4 | ||||
-rw-r--r-- | include/defs.h.in | 14 | ||||
-rw-r--r-- | src/crash-manager/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/crash-manager/crash-manager.c | 2 | ||||
-rw-r--r-- | src/crash-manager/crash-manager.h.in | 33 |
6 files changed, 22 insertions, 35 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8003dae..49a9356 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,9 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) ADD_DEFINITIONS(-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE=1) # Sub modules +ADD_SUBDIRECTORY(include) +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) + ADD_SUBDIRECTORY(src/crash-manager) IF("${SYS_ASSERT}" STREQUAL "ON") diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt new file mode 100644 index 0000000..ce9314c --- /dev/null +++ b/include/CMakeLists.txt @@ -0,0 +1,4 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(crash-manager C) + +CONFIGURE_FILE(defs.h.in defs.h @ONLY) diff --git a/include/defs.h.in b/include/defs.h.in new file mode 100644 index 0000000..25e465e --- /dev/null +++ b/include/defs.h.in @@ -0,0 +1,14 @@ +#ifndef __DEFS_H__ +#define __DEFS_H__ + +#define CRASH_PATH "@CRASH_PATH@" +#define CRASH_ROOT_PATH "@CRASH_ROOT_PATH@" +#define CRASH_TEMP "@CRASH_TEMP@" +#define SYS_ASSERT "@SYS_ASSERT@" +#define CRASH_STACK_PATH "@CRASH_STACK_PATH@" +#define CRASH_MANAGER_CONFIG_PATH "@CRASH_MANAGER_CONFIG_PATH@" +#define MINICOREDUMPER_BIN_PATH "@MINICOREDUMPER_BIN_PATH@" +#define MINICOREDUMPER_CONFIG_PATH "@MINICOREDUMPER_CONFIG_PATH@" +#define DEBUGMODE_PATH "@DEBUGMODE_PATH@" + +#endif /* __DEFS_H__ */ diff --git a/src/crash-manager/CMakeLists.txt b/src/crash-manager/CMakeLists.txt index 8e6a356..49ae92b 100644 --- a/src/crash-manager/CMakeLists.txt +++ b/src/crash-manager/CMakeLists.txt @@ -26,7 +26,6 @@ ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIE") -CONFIGURE_FILE(crash-manager.h.in crash-manager.h @ONLY) ADD_EXECUTABLE(${PROJECT_NAME} ${CRASH_MANAGER_SRCS}) TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${crash-manager_pkgs_LDFLAGS} -pie -lrt) diff --git a/src/crash-manager/crash-manager.c b/src/crash-manager/crash-manager.c index 8aba8ae..0198901 100644 --- a/src/crash-manager/crash-manager.c +++ b/src/crash-manager/crash-manager.c @@ -41,7 +41,7 @@ #undef LOG_TAG #define LOG_TAG "CRASH_MANAGER" -#include "crash-manager.h" +#include "defs.h" #include "dbus_notify.h" #include "shared/log.h" #include "shared/spawn.h" diff --git a/src/crash-manager/crash-manager.h.in b/src/crash-manager/crash-manager.h.in deleted file mode 100644 index f5a8c4b..0000000 --- a/src/crash-manager/crash-manager.h.in +++ /dev/null @@ -1,33 +0,0 @@ -/* - * crash-manager - * - * Copyright (c) 2016 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef __CRASH_MANAGER_H__ -#define __CRASH_MANAGER_H__ - -/* Make build variables to string */ -#define CRASH_PATH "@CRASH_PATH@" -#define CRASH_ROOT_PATH "@CRASH_ROOT_PATH@" -#define CRASH_TEMP "@CRASH_TEMP@" -#define SYS_ASSERT "@SYS_ASSERT@" -#define CRASH_STACK_PATH "@CRASH_STACK_PATH@" -#define CRASH_MANAGER_CONFIG_PATH "@CRASH_MANAGER_CONFIG_PATH@" -#define MINICOREDUMPER_BIN_PATH "@MINICOREDUMPER_BIN_PATH@" -#define MINICOREDUMPER_CONFIG_PATH "@MINICOREDUMPER_CONFIG_PATH@" -#define DEBUGMODE_PATH "@DEBUGMODE_PATH@" - -#endif |