2008-07-15 16:53:38 +00:00
|
|
|
# svkbd - simple virtual keyboard
|
|
|
|
# See LICENSE file for copyright and license details.
|
2020-05-29 12:24:17 +00:00
|
|
|
.POSIX:
|
|
|
|
|
|
|
|
NAME = svkbd
|
2020-09-16 14:07:31 +00:00
|
|
|
VERSION = 0.2.1
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
2020-05-29 12:24:17 +00:00
|
|
|
BIN = ${NAME}-${LAYOUT}
|
2020-08-02 13:46:12 +00:00
|
|
|
SRC = drw.c ${NAME}.c util.c
|
2020-08-02 16:23:30 +00:00
|
|
|
OBJ = ${SRC:.c=.o}
|
2020-05-29 12:24:17 +00:00
|
|
|
MAN1 = ${NAME}.1
|
2008-07-15 16:53:38 +00:00
|
|
|
|
2020-05-29 12:24:17 +00:00
|
|
|
all: ${BIN}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
options:
|
|
|
|
@echo svkbd build options:
|
2020-05-29 12:24:17 +00:00
|
|
|
@echo "CFLAGS = ${SVKBD_CFLAGS}"
|
|
|
|
@echo "CPPLAGS = ${SVKBD_CPPFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${SVKBD_LDFLAGS}"
|
2008-07-15 16:53:38 +00:00
|
|
|
@echo "CC = ${CC}"
|
|
|
|
|
2020-05-29 12:24:17 +00:00
|
|
|
config.h:
|
|
|
|
cp config.def.h $@
|
|
|
|
|
2020-08-02 16:23:30 +00:00
|
|
|
.c.o:
|
|
|
|
${CC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c $<
|
|
|
|
|
|
|
|
${OBJ}: config.h config.mk
|
|
|
|
|
|
|
|
${BIN}: ${OBJ}
|
|
|
|
${CC} -o ${BIN} ${OBJ} ${SVKBD_LDFLAGS}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
clean:
|
2020-08-02 16:23:30 +00:00
|
|
|
rm -f ${NAME}-?? ${NAME}-??.o ${OBJ} ${BIN}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
2020-05-29 12:24:17 +00:00
|
|
|
dist:
|
|
|
|
rm -rf "${NAME}-${VERSION}"
|
|
|
|
mkdir -p "${NAME}-${VERSION}"
|
2020-08-14 10:48:47 +00:00
|
|
|
cp LICENSE Makefile README.md config.def.h config.mk ${MAN1} \
|
2020-09-13 20:29:42 +00:00
|
|
|
drw.h util.h ${SRC} ${NAME}-${VERSION}
|
2020-05-29 12:24:17 +00:00
|
|
|
for i in layout.*.h; \
|
2011-04-04 11:39:31 +00:00
|
|
|
do \
|
2020-05-29 12:24:17 +00:00
|
|
|
cp $$i ${NAME}-${VERSION}; \
|
2011-04-04 11:39:31 +00:00
|
|
|
done
|
2020-05-29 12:24:17 +00:00
|
|
|
tar -cf - "${NAME}-${VERSION}" | \
|
|
|
|
gzip -c > "${NAME}-${VERSION}.tar.gz"
|
|
|
|
rm -rf "${NAME}-${VERSION}"
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
install: all
|
2020-05-29 12:24:17 +00:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
2020-09-16 14:07:31 +00:00
|
|
|
cp ${NAME}-${LAYOUT} ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}-${LAYOUT}
|
2020-05-29 12:24:17 +00:00
|
|
|
mkdir -p "${DESTDIR}${MANPREFIX}/man1"
|
|
|
|
sed "s/VERSION/${VERSION}/g" < ${MAN1} > ${DESTDIR}${MANPREFIX}/man1/${MAN1}
|
|
|
|
chmod 644 ${DESTDIR}${MANPREFIX}/man1/${MAN1}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
uninstall:
|
2020-05-29 12:24:17 +00:00
|
|
|
rm -f ${DESTDIR}${PREFIX}/bin/${NAME}-??
|
|
|
|
rm -f ${DESTDIR}${MANPREFIX}/man1/${MAN1}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
2020-05-29 14:12:46 +00:00
|
|
|
.PHONY: all clean dist options install uninstall
|