Prepare for release

fix-mingw
Nakidai 2023-11-25 00:52:02 +03:00
parent 8e8a1c5abd
commit e6995af34a
4 changed files with 19 additions and 6 deletions

3
.gitignore vendored
View File

@ -1,5 +1,6 @@
obj/
build/
game
*.core
src/config.h
include/config.h
config.mk

View File

@ -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)

View File

@ -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

4
configure vendored
View File

@ -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}