diff --git a/.gitignore b/.gitignore index 1402d83..26a5b93 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ obj/ +build/ game *.core -src/config.h +include/config.h config.mk diff --git a/CMakeLists.txt b/CMakeLists.txt index 09c536c..e1d85c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(csnake VERSION 0.1.0 LANGUAGES C) +project(csnake VERSION 1.0 LANGUAGES C) if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) message(FATAL_ERROR "In-source builds are not allowed.") @@ -12,7 +12,7 @@ add_executable(csnake src/player.c ) -set_target_properties(csnake PROPERTIES C_STANDARD 11) +set_target_properties(csnake PROPERTIES C_STANDARD 99) set_target_properties(csnake PROPERTIES C_EXTENSIONS FALSE) target_include_directories(csnake PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include) diff --git a/README.md b/README.md index 74bf33b..33d26eb 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,19 @@ # csnake Snakegame written in C. -Controls +Controls -- - WASD - movement - P - Pause + +Supported platforms +-- +Was tested on: +- FreeBSD 13.2 +- Windows 11 (both MinGW and MSVC) +- Linux 6.5.8 (glibc 2.38-7) + +Building +-- +- On \*nix-like systems you can use GNU Make with configure script providing arguments through environment variables or CMake +- On Windows you can use CMake diff --git a/configure b/configure index 0843f06..e5add12 100755 --- a/configure +++ b/configure @@ -6,7 +6,7 @@ then CC - compiler (default: cc) CFLAGS - flags for compiler LDFLAGS - flags for linker - OUT - out file (default: game + OUT - out file (default: csnake SIZE - size of game field DEFX - start x DEFY - start y" @@ -16,7 +16,7 @@ fi CC=${CC:-cc} CFLAGS=${CFLAGS:-} LDFLAGS=${LDFLAGS:-} -OUT=${OUT:-game} +OUT=${OUT:-csnake} SIZE=${SIZE:-10} DEFX=${DEFX:-0} DEFY=${DEFY:-0}