diff --git a/.gitignore b/.gitignore index 0fd9bb7..1c154dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ obj/ game +config.mk diff --git a/Makefile b/Makefile index e93e1de..0fd3380 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,6 @@ $(OUT): obj $(OBJ) $(CC) -o $@ $(OBJ) $(LDFLAGS) clean: - $(RM) $(OUT) $(OBJDIR)/* + $(RM) $(OUT) config.mk $(OBJDIR)/* .PHONY: default clean diff --git a/configure b/configure new file mode 100755 index 0000000..071c032 --- /dev/null +++ b/configure @@ -0,0 +1,19 @@ +#!/bin/sh + +CC=${CC:-cc} +RM=${RM:-rm -f} +CFLAGS=${CFLAGS:-} +LDFLAGS=${LDFLAGS:-} +OUT=${OUT:-game} + +echo "Compiler: $CC" +echo "Remove: $RM" +echo "CFLAGS: $CFLAGS" +echo "LDFLAGS: $LDFLAGS" +echo "Out file: $OUT" + +echo "CC = $CC +RM = $RM +CFLAGS = $CFLAGS +LDFLAGS = $LDFLAGS +OUT = $OUT" > config.mk