svkbd_dvorak/Makefile

74 lines
1.7 KiB
Makefile
Raw Normal View History

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