Compare commits
No commits in common. "master" and "fix-mingw" have entirely different histories.
|
@ -3,4 +3,4 @@ build/
|
||||||
csnake
|
csnake
|
||||||
*.core
|
*.core
|
||||||
include/config.h
|
include/config.h
|
||||||
include/config.mk
|
config.mk
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.5)
|
cmake_minimum_required(VERSION 3.5)
|
||||||
project(csnake VERSION 1.2 LANGUAGES C)
|
project(csnake VERSION 1.1 LANGUAGES C)
|
||||||
|
|
||||||
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)
|
||||||
message(FATAL_ERROR "In-source builds are not allowed.")
|
message(FATAL_ERROR "In-source builds are not allowed.")
|
||||||
|
@ -32,7 +32,4 @@ set(DEFX 0 CACHE STRING "Start x")
|
||||||
set(DEFY 0 CACHE STRING "Start y")
|
set(DEFY 0 CACHE STRING "Start y")
|
||||||
set(SLEEP 1000 CACHE STRING "Sleep between frames (ms)")
|
set(SLEEP 1000 CACHE STRING "Sleep between frames (ms)")
|
||||||
|
|
||||||
configure_file(
|
configure_file(include/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/config.h)
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/templates/config.h.in
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/config.h
|
|
||||||
)
|
|
||||||
|
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright 2024 nakidai
|
Copyright 2023 nakidai
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
include include/config.mk
|
include config.mk
|
||||||
|
|
||||||
INCLUDE = -Iinclude
|
INCLUDE = -Iinclude
|
||||||
RM = rm -f
|
RM = rm -f
|
||||||
|
|
|
@ -10,7 +10,7 @@ Supported platforms
|
||||||
--
|
--
|
||||||
Was tested on:
|
Was tested on:
|
||||||
- FreeBSD 13.2
|
- FreeBSD 13.2
|
||||||
- Windows 11 (both MSVC and MinGW)
|
- Windows 11 (MSVC)
|
||||||
- Linux 6.5.8 (glibc 2.38-7)
|
- Linux 6.5.8 (glibc 2.38-7)
|
||||||
|
|
||||||
Building
|
Building
|
||||||
|
|
|
@ -45,5 +45,12 @@ echo "Start x: $DEFX"
|
||||||
echo "Start y: $DEFY"
|
echo "Start y: $DEFY"
|
||||||
echo "Sleep: $SLEEP"
|
echo "Sleep: $SLEEP"
|
||||||
|
|
||||||
eval "echo \"$(cat templates/config.mk.in)\"" > include/config.mk
|
echo "CC = $CC
|
||||||
eval "echo \"$(cat templates/config.h.in)\"" > include/config.h
|
CFLAGS = $CFLAGS
|
||||||
|
LDFLAGS = $LDFLAGS
|
||||||
|
OUT = $OUT" > config.mk
|
||||||
|
|
||||||
|
echo "#define FIELD_SIZE $FIELD_SIZE
|
||||||
|
#define DEFX $DEFX
|
||||||
|
#define DEFY $DEFY
|
||||||
|
#define SLEEP $SLEEP" > include/config.h
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
CC = ${CC}
|
|
||||||
CFLAGS = ${CFLAGS}
|
|
||||||
LDFLAGS = ${LDFLAGS}
|
|
||||||
OUT = ${OUT}
|
|
Loading…
Reference in New Issue