From f25cd3ca01f2891f2cf642b19cc2f0d160a5fc26 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Mon, 30 Oct 2023 15:50:12 +0300 Subject: [PATCH] Some changes - Move config.h to include/ - Move config.mk to root - Remove $RM from configure --- .gitignore | 1 - Makefile | 9 ++------- config.mk | 4 ++++ configure | 14 ++------------ include/config.h | 3 +++ 5 files changed, 11 insertions(+), 20 deletions(-) create mode 100644 config.mk create mode 100644 include/config.h diff --git a/.gitignore b/.gitignore index e17cc81..0fd9bb7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ obj/ game -config/ diff --git a/Makefile b/Makefile index d3e229f..48a69b6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.mk b/config.mk new file mode 100644 index 0000000..eff6dc2 --- /dev/null +++ b/config.mk @@ -0,0 +1,4 @@ +CC = cc +CFLAGS = +LDFLAGS = +OUT = game diff --git a/configure b/configure index 04228a3..0843f06 100755 --- a/configure +++ b/configure @@ -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 diff --git a/include/config.h b/include/config.h new file mode 100644 index 0000000..061c7be --- /dev/null +++ b/include/config.h @@ -0,0 +1,3 @@ +#define SIZE 10 +#define DEFX 0 +#define DEFY 0