2023-10-30 02:33:30 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
CC=${CC:-cc}
|
|
|
|
RM=${RM:-rm -f}
|
|
|
|
CFLAGS=${CFLAGS:-}
|
|
|
|
LDFLAGS=${LDFLAGS:-}
|
|
|
|
OUT=${OUT:-game}
|
2023-10-30 03:00:39 +03:00
|
|
|
SIZE=${SIZE:-10}
|
2023-10-30 03:09:32 +03:00
|
|
|
DEFX=${DEFX:-0}
|
|
|
|
DEFY=${DEFY:-0}
|
2023-10-30 02:33:30 +03:00
|
|
|
|
2023-10-30 03:09:32 +03:00
|
|
|
echo "Makefile configuration:"
|
2023-10-30 02:33:30 +03:00
|
|
|
echo "Compiler: $CC"
|
|
|
|
echo "Remove: $RM"
|
|
|
|
echo "CFLAGS: $CFLAGS"
|
|
|
|
echo "LDFLAGS: $LDFLAGS"
|
|
|
|
echo "Out file: $OUT"
|
2023-10-30 03:09:32 +03:00
|
|
|
echo
|
|
|
|
echo "Code configuration:"
|
|
|
|
echo "Size: $SIZE"
|
|
|
|
echo "Start x: $DEFX"
|
|
|
|
echo "Start y: $DEFY"
|
2023-10-30 02:33:30 +03:00
|
|
|
|
2023-10-30 03:15:24 +03:00
|
|
|
if [ ! test -d config ]; then
|
|
|
|
if [ test-f config ]; then
|
|
|
|
rm config
|
|
|
|
fi
|
|
|
|
mkdir config
|
|
|
|
fi
|
|
|
|
|
2023-10-30 02:33:30 +03:00
|
|
|
echo "CC = $CC
|
|
|
|
RM = $RM
|
|
|
|
CFLAGS = $CFLAGS
|
|
|
|
LDFLAGS = $LDFLAGS
|
2023-10-30 03:00:39 +03:00
|
|
|
OUT = $OUT" > config/config.mk
|
2023-10-30 03:09:32 +03:00
|
|
|
|
|
|
|
echo "#define SIZE $SIZE
|
|
|
|
#define DEFX $DEFX
|
|
|
|
#define DEFY $DEFY" > config/config.h
|