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
|
2022-01-07 11:38:18 +00:00
|
|
|
VERSION = 0.4.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
|
2021-09-30 19:36:53 +00:00
|
|
|
OBJ = drw.o ${NAME}-${LAYOUT}.o util.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 $@
|
|
|
|
|
2021-09-30 19:36:53 +00:00
|
|
|
svkbd-${LAYOUT}.o: config.h layout.${LAYOUT}.h
|
|
|
|
${CC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c svkbd.c -o $@
|
2021-03-09 21:52:54 +00:00
|
|
|
|
2020-08-02 16:23:30 +00:00
|
|
|
.c.o:
|
2021-03-27 16:57:26 +00:00
|
|
|
${CC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c $<
|
2020-08-02 16:23:30 +00:00
|
|
|
|
|
|
|
${OBJ}: config.h config.mk
|
|
|
|
|
|
|
|
${BIN}: ${OBJ}
|
2021-03-27 16:57:26 +00:00
|
|
|
${CC} -o ${BIN} ${OBJ} ${SVKBD_LDFLAGS}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
clean:
|
2021-09-30 19:36:53 +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
|
2021-02-25 16:28:16 +00:00
|
|
|
cp -f ${NAME}-${LAYOUT} ${DESTDIR}${PREFIX}/bin
|
2020-09-16 14:07:31 +00:00
|
|
|
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
|