forked from nakidai/csnake
Add configure for make
parent
d6b4f0be32
commit
2ebe6fccea
|
@ -1,2 +1,3 @@
|
|||
obj/
|
||||
game
|
||||
config.mk
|
||||
|
|
2
Makefile
2
Makefile
|
@ -22,6 +22,6 @@ $(OUT): obj $(OBJ)
|
|||
$(CC) -o $@ $(OBJ) $(LDFLAGS)
|
||||
|
||||
clean:
|
||||
$(RM) $(OUT) $(OBJDIR)/*
|
||||
$(RM) $(OUT) config.mk $(OBJDIR)/*
|
||||
|
||||
.PHONY: default clean
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue