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