@@ -252,8 +252,11 @@ all_cmd: $(CMD_TARGETS)
CMAKE_COMMAND = /usr/bin/cmake
+# Build with "BUILD_TYPE=Release" to remove cmake debug info
+BUILD_TYPE ?= RelWithDebInfo
+
$(kshark-dir)/build/Makefile: $(kshark-dir)/CMakeLists.txt
- $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -D_INSTALL_PREFIX=$(prefix) ..
+ $(Q) cd $(kshark-dir)/build && $(CMAKE_COMMAND) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -D_INSTALL_PREFIX=$(prefix) ..
gui: force $(CMD_TARGETS) $(kshark-dir)/build/Makefile
$(Q)$(MAKE) $(S) -C $(kshark-dir)/build
@@ -37,7 +37,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -pthread -fPIC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pthread -fPIC")
if (NOT CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE Debug)
+ set(CMAKE_BUILD_TYPE RelWithDebInfo)
endif (NOT CMAKE_BUILD_TYPE)
message("\n Build type: ${CMAKE_BUILD_TYPE}")
@@ -59,9 +59,13 @@ CMAKE_XXXX_FLAGS_PACKAGE Command-Line options (see the example below).
Note that when built as a "Package" the RPATH-s of the executables are
set directly to _INSTALL_PREFIX/lib/kernelshark/
-If no build types is specified, the type will be "Debug".
+If no build types is specified, the type will be "RelWithDebInfo".
Examples:
+ make BUILD_TYPE=Release
+
+ or directly with cmake in the kernel-shark/build directory:
+
cmake -D_DOXYGEN_DOC=1 -D_INSTALL_PREFIX=/usr ../
cmake -DCMAKE_BUILD_TYPE=Package -DCMAKE_C_FLAGS_PACKAGE="-O3 -pedantic" ../