diff --git a/.gitignore b/.gitignore index cd531cf..efd5d82 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ Module.symvers Mkfile.old dkms.conf +# build folder +build/** diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9243902 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.10) +project(playergame C) + +set(CMAKE_CXX_STANDARD 99) +set(CMAKE_CXX_STANDARD_REQUIRED True) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror") + +include_directories(src) +add_definitions(-g) +add_definitions(-p) +# add_definitions(-s) +# add_definitions(-fsanitize=address) + +file(GLOB SOURCES "src/*.c" "src/**/*.c") + +add_executable(${CMAKE_PROJECT_NAME} ${SOURCES}) +target_link_libraries(${CMAKE_PROJECT_NAME} curses) +target_link_options(${CMAKE_PROJECT_NAME} PRIVATE -fsanitize=address) diff --git a/playergame.c b/src/playergame.c similarity index 100% rename from playergame.c rename to src/playergame.c