Some changes

- Move config.h to include/
- Move config.mk to root
- Remove $RM from configure
pull/1/head
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/
game
config/

View File

@ -1,11 +1,6 @@
include config/config.mk
include config.mk
OUT = game
CFLAGS =
LDFLAGS =
INCLUDE = -Iinclude -Iconfig
CC = cc
LD = ld
INCLUDE = -Iinclude
RM = rm -f
SRCDIR = src
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
CC=${CC:-cc}
RM=${RM:-rm -f}
CFLAGS=${CFLAGS:-}
LDFLAGS=${LDFLAGS:-}
OUT=${OUT:-game}
@ -24,7 +23,6 @@ DEFY=${DEFY:-0}
echo "Makefile configuration:"
echo "Compiler: $CC"
echo "Remove: $RM"
echo "CFLAGS: $CFLAGS"
echo "LDFLAGS: $LDFLAGS"
echo "Out file: $OUT"
@ -34,19 +32,11 @@ echo "Size: $SIZE"
echo "Start x: $DEFX"
echo "Start y: $DEFY"
if ! test -d config; then
if test -f config; then
rm config
fi
mkdir config
fi
echo "CC = $CC
RM = $RM
CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS
OUT = $OUT" > config/config.mk
OUT = $OUT" > config.mk
echo "#define SIZE $SIZE
#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