1
0
mirror of git://git.suckless.org/svkbd synced 2024-12-17 19:54:45 +00:00
svkbd/Makefile

67 lines
1.5 KiB
Makefile
Raw Permalink Normal View History

2008-07-15 16:53:38 +00:00
# svkbd - simple virtual keyboard
# See LICENSE file for copyright and license details.
.POSIX:
NAME = svkbd
2024-11-26 17:30:20 +00:00
VERSION = 0.4.2
2008-07-15 16:53:38 +00:00
include config.mk
BIN = ${NAME}-${LAYOUT}
SRC = drw.c ${NAME}.c util.c
OBJ = drw.o ${NAME}-${LAYOUT}.o util.o
MAN1 = ${NAME}.1
2008-07-15 16:53:38 +00:00
all: ${BIN}
2008-07-15 16:53:38 +00:00
options:
@echo svkbd build options:
@echo "CFLAGS = ${SVKBD_CFLAGS}"
@echo "CPPLAGS = ${SVKBD_CPPFLAGS}"
@echo "LDFLAGS = ${SVKBD_LDFLAGS}"
2008-07-15 16:53:38 +00:00
@echo "CC = ${CC}"
config.h:
cp config.def.h $@
svkbd-${LAYOUT}.o: config.h layout.${LAYOUT}.h
${CC} ${SVKBD_CFLAGS} ${SVKBD_CPPFLAGS} -c svkbd.c -o $@
.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:
rm -f ${NAME}-?? ${NAME}-*.o ${OBJ} ${BIN}
2008-07-15 16:53:38 +00:00
dist:
rm -rf "${NAME}-${VERSION}"
mkdir -p "${NAME}-${VERSION}"
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}
for i in layout.*.h; \
do \
cp $$i ${NAME}-${VERSION}; \
done
tar -cf - "${NAME}-${VERSION}" | \
gzip -c > "${NAME}-${VERSION}.tar.gz"
rm -rf "${NAME}-${VERSION}"
2008-07-15 16:53:38 +00:00
install: all
mkdir -p ${DESTDIR}${PREFIX}/bin
cp -f ${NAME}-${LAYOUT} ${DESTDIR}${PREFIX}/bin
chmod 755 ${DESTDIR}${PREFIX}/bin/${NAME}-${LAYOUT}
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:
rm -f ${DESTDIR}${PREFIX}/bin/${NAME}-??
rm -f ${DESTDIR}${MANPREFIX}/man1/${MAN1}
2008-07-15 16:53:38 +00:00
.PHONY: all clean dist options install uninstall