2008-07-15 16:53:38 +00:00
|
|
|
# svkbd - simple virtual keyboard
|
|
|
|
# See LICENSE file for copyright and license details.
|
|
|
|
|
|
|
|
include config.mk
|
|
|
|
|
|
|
|
SRC = svkbd.c
|
2011-03-25 14:14:12 +00:00
|
|
|
LAYOUTS = en de arrows
|
2008-07-15 16:53:38 +00:00
|
|
|
|
2011-04-04 11:47:27 +00:00
|
|
|
all: options svkbd-en
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
options:
|
|
|
|
@echo svkbd build options:
|
|
|
|
@echo "CFLAGS = ${CFLAGS}"
|
|
|
|
@echo "LDFLAGS = ${LDFLAGS}"
|
|
|
|
@echo "CC = ${CC}"
|
2011-03-24 18:31:00 +00:00
|
|
|
@echo "LAYOUT = ${LAYOUT}"
|
2008-07-15 16:53:38 +00:00
|
|
|
|
2011-03-25 14:14:12 +00:00
|
|
|
config.h: config.mk
|
2008-07-15 16:53:38 +00:00
|
|
|
@echo creating $@ from config.def.h
|
|
|
|
@cp config.def.h $@
|
|
|
|
|
2011-04-04 11:47:27 +00:00
|
|
|
svkbd-%: layout.%.h config.h ${SRC}
|
2011-03-25 14:14:12 +00:00
|
|
|
@echo creating layout.h from $<
|
|
|
|
@cp $< layout.h
|
2008-07-15 16:53:38 +00:00
|
|
|
@echo CC -o $@
|
2011-03-25 14:14:12 +00:00
|
|
|
@${CC} -o $@ ${SRC} ${LDFLAGS} ${CFLAGS}
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
clean:
|
|
|
|
@echo cleaning
|
2011-04-04 11:39:31 +00:00
|
|
|
@for i in ${LAYOUTS}; \
|
|
|
|
do \
|
2011-04-04 11:47:27 +00:00
|
|
|
rm -f svkbd-$$i 2> /dev/null; \
|
2011-04-04 11:39:31 +00:00
|
|
|
done; true
|
|
|
|
@rm -f ${OBJ} svkbd-${VERSION}.tar.gz 2> /dev/null; true
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
dist: clean
|
|
|
|
@echo creating dist tarball
|
|
|
|
@mkdir -p svkbd-${VERSION}
|
2011-03-25 14:14:12 +00:00
|
|
|
@cp LICENSE Makefile README config.def.h config.mk \
|
|
|
|
${SRC} svkbd-${VERSION}
|
2011-04-04 11:39:31 +00:00
|
|
|
@for i in ${LAYOUTS}; \
|
|
|
|
do \
|
|
|
|
cp layout.$$i.h svkbd-${VERSION}; \
|
|
|
|
done
|
2008-07-15 16:53:38 +00:00
|
|
|
@tar -cf svkbd-${VERSION}.tar svkbd-${VERSION}
|
|
|
|
@gzip svkbd-${VERSION}.tar
|
|
|
|
@rm -rf svkbd-${VERSION}
|
|
|
|
|
|
|
|
install: all
|
2011-04-04 11:39:31 +00:00
|
|
|
@echo installing executable files to ${DESTDIR}${PREFIX}/bin
|
2008-07-15 16:53:38 +00:00
|
|
|
@mkdir -p ${DESTDIR}${PREFIX}/bin
|
2011-04-04 11:39:31 +00:00
|
|
|
@for i in ${LAYOUTS}; \
|
|
|
|
do \
|
|
|
|
if [ -e svkbd.$$i ]; \
|
|
|
|
then \
|
|
|
|
echo CP svkbd.$$i; \
|
|
|
|
cp svkbd.$$i ${DESTDIR}${PREFIX}/bin; \
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/svkbd.$$i; \
|
|
|
|
fi \
|
|
|
|
done
|
|
|
|
# @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
# @mkdir -p ${DESTDIR}${MANPREFIX}/man1
|
2011-02-01 19:01:10 +00:00
|
|
|
# @sed "s/VERSION/${VERSION}/g" < svkbd.1 > ${DESTDIR}${MANPREFIX}/man1/svkbd.1
|
|
|
|
# @chmod 644 ${DESTDIR}${MANPREFIX}/man1/svkbd.1
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
uninstall:
|
2011-04-04 11:39:31 +00:00
|
|
|
@echo removing executable files from ${DESTDIR}${PREFIX}/bin
|
|
|
|
@rm -f ${DESTDIR}${PREFIX}/bin/svkbd.*
|
2011-02-01 19:01:10 +00:00
|
|
|
# @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
# @rm -f ${DESTDIR}${MANPREFIX}/man1/svkbd.1
|
2008-07-15 16:53:38 +00:00
|
|
|
|
|
|
|
.PHONY: all options clean dist install uninstall
|