fork of github.com/rxi/lite that removes windows support and improves useability
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lite/makefile

43 lines
1.3 KiB

4 years ago
.POSIX:
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
#CC ?= gcc
4 years ago
SRCDIR = ./src
4 years ago
CFLAGS = -Wall -Werror -pedantic -O3 -std=c11 -fno-strict-aliasing \
-I${SRCDIR} -I${PREFIX}/include/ -DLUA_USE_POSIX -D_PREFIX="${PREFIX}"
4 years ago
# remove this
LDFLAGS = -L${PREFIX}/lib -lSDL2 -lm -llua5.2
4 years ago
FILES != find ${SRCDIR} -name '*.c'
OBJS = ${FILES:.c=.o}
.c.o:
${CC} -c ${CFLAGS} $< -o $@
4 years ago
lite: ${OBJS}
${CC} ${LDFLAGS} -o $@ ${OBJS}
4 years ago
install: lite
mkdir -p ${DESTDIR}${PREFIX}/share/lite
cp -f lite ${DESTDIR}${PREFIX}/share/lite/lite
chmod 755 ${DESTDIR}${PREFIX}/share/lite/lite
rm -rf ${DESTDIR}${PREFIX}/share/lite/data
cp -rf data/. ${DESTDIR}${PREFIX}/share/lite/data
mkdir -p ${DESTDIR}${PREFIX}/bin
ln -sf ${DESTDIR}${PREFIX}/share/lite/lite ${DESTDIR}${PREFIX}/bin/lite
# mkdir -p ${DESTDIR}${MANPREFIX}/man1
# cp -f us.1 ${DESTDIR}${MANPREFIX}/man1/us.1
# chmod 644 ${DESTDIR}${MANPREFIX}/man1/us.1
cp -f lite.desktop ${DESTDIR}${PREFIX}/share/applications/lite.desktop
cp -f icon.ico ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/lite.ico
uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/lite \
${DESTDIR}${PREFIX}/share/applications/lite.desktop \
${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/lite.ico
# ${DESTDIR}${MANPREFIX}/man1/us.1
rm -rf ${DESTDIR}${PREFIX}/share/lite
4 years ago
clean:
rm -f lite *.o ${OBJS}