Some changes
- Move config.h to include/ - Move config.mk to root - Remove $RM from configurepull/1/head
parent
f2e33ad320
commit
f25cd3ca01
|
@ -1,3 +1,2 @@
|
|||
obj/
|
||||
game
|
||||
config/
|
||||
|
|
9
Makefile
9
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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#define SIZE 10
|
||||
#define DEFX 0
|
||||
#define DEFY 0
|
Loading…
Reference in New Issue