forked from nakidai/csnake
1
0
Fork 0

Some changes

- Move config.h to include/
- Move config.mk to root
- Remove $RM from configure
configure
Nakidai 2023-10-30 15:50:12 +03:00
parent f2e33ad320
commit f25cd3ca01
Signed by untrusted user who does not match committer: nakidai
GPG Key ID: 914675D395210A97
5 changed files with 11 additions and 20 deletions

1
.gitignore vendored
View File

@ -1,3 +1,2 @@
obj/ obj/
game game
config/

View File

@ -1,11 +1,6 @@
include config/config.mk include config.mk
OUT = game INCLUDE = -Iinclude
CFLAGS =
LDFLAGS =
INCLUDE = -Iinclude -Iconfig
CC = cc
LD = ld
RM = rm -f RM = rm -f
SRCDIR = src SRCDIR = src
OBJDIR = obj OBJDIR = obj

4
config.mk Normal file
View File

@ -0,0 +1,4 @@
CC = cc
CFLAGS =
LDFLAGS =
OUT = game

14
configure vendored
View File

@ -14,7 +14,6 @@ then
fi fi
CC=${CC:-cc} CC=${CC:-cc}
RM=${RM:-rm -f}
CFLAGS=${CFLAGS:-} CFLAGS=${CFLAGS:-}
LDFLAGS=${LDFLAGS:-} LDFLAGS=${LDFLAGS:-}
OUT=${OUT:-game} OUT=${OUT:-game}
@ -24,7 +23,6 @@ DEFY=${DEFY:-0}
echo "Makefile configuration:" echo "Makefile configuration:"
echo "Compiler: $CC" echo "Compiler: $CC"
echo "Remove: $RM"
echo "CFLAGS: $CFLAGS" echo "CFLAGS: $CFLAGS"
echo "LDFLAGS: $LDFLAGS" echo "LDFLAGS: $LDFLAGS"
echo "Out file: $OUT" echo "Out file: $OUT"
@ -34,19 +32,11 @@ echo "Size: $SIZE"
echo "Start x: $DEFX" echo "Start x: $DEFX"
echo "Start y: $DEFY" echo "Start y: $DEFY"
if ! test -d config; then
if test -f config; then
rm config
fi
mkdir config
fi
echo "CC = $CC echo "CC = $CC
RM = $RM
CFLAGS = $CFLAGS CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS LDFLAGS = $LDFLAGS
OUT = $OUT" > config/config.mk OUT = $OUT" > config.mk
echo "#define SIZE $SIZE echo "#define SIZE $SIZE
#define DEFX $DEFX #define DEFX $DEFX
#define DEFY $DEFY" > config/config.h #define DEFY $DEFY" > include/config.h

3
include/config.h Normal file
View File

@ -0,0 +1,3 @@
#define SIZE 10
#define DEFX 0
#define DEFY 0