|
|
|
@ -2,17 +2,20 @@ |
|
|
|
|
|
|
|
|
|
PREFIX = /usr/local
|
|
|
|
|
MANPREFIX = ${PREFIX}/share/man
|
|
|
|
|
CC ?= gcc
|
|
|
|
|
#CC ?= gcc
|
|
|
|
|
SRCDIR = ./src
|
|
|
|
|
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
|
|
|
|
|
-I${SRCDIR} -DLUA_USE_POSIX
|
|
|
|
|
-I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX
|
|
|
|
|
# remove this
|
|
|
|
|
LDFLAGS = -lSDL2 -lm -llua5.2
|
|
|
|
|
LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2
|
|
|
|
|
FILES != find ${SRCDIR} -name '*.c'
|
|
|
|
|
OBJS = $(FILES:.c=.o)
|
|
|
|
|
OBJS = ${FILES:.c=.o}
|
|
|
|
|
|
|
|
|
|
.c.o: |
|
|
|
|
${CC} -c ${CFLAGS} $< -o $@
|
|
|
|
|
|
|
|
|
|
lite: ${OBJS} |
|
|
|
|
${CC} ${LDFLAGS} $^ -o $@
|
|
|
|
|
${CC} ${LDFLAGS} -o $@ ${OBJS}
|
|
|
|
|
|
|
|
|
|
install: lite |
|
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/share/lite
|
|
|
|
@ -36,4 +39,4 @@ uninstall: |
|
|
|
|
rm -rf ${DESTDIR}${PREFIX}/share/lite
|
|
|
|
|
|
|
|
|
|
clean: |
|
|
|
|
rm -f lite ${OBJS}
|
|
|
|
|
rm -f lite *.o ${OBJS}
|
|
|
|
|