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-05-29 14:24:17 +02:00
|
|
|
OBJ = ${NAME}-${LAYOUT}.o
|
|
|
|
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 $@
|
|
|
|
|
|
|
|
${BIN}:
|
2020-08-02 15:46:12 +02:00
|
|
|
${CC} -o $@ ${SRC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} ${SVKBD_LDFLAGS}
|
2008-07-15 18:53:38 +02:00
|
|
|
|
|
|
|
clean:
|
2020-05-29 14:24:17 +02:00
|
|
|
rm -f ${NAME}-?? ${NAME}-??.o ${OBJ}
|
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}"
|
|
|
|
cp LICENSE Makefile README config.def.h config.mk ${MAN1} \
|
|
|
|
${SRC} ${NAME}-${VERSION}
|
|
|
|
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
|