svkbd

Simple X11 onscreen keyboard.
git clone git://r-36.net/svkbd
Log | Files | Refs | LICENSE

Makefile (1786B)


      1 # svkbd - simple virtual keyboard
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 SRC = svkbd.c
      7 
      8 all: options svkbd-${LAYOUT}
      9 
     10 options:
     11 	@echo svkbd build options:
     12 	@echo "CFLAGS   = ${CFLAGS}"
     13 	@echo "LDFLAGS  = ${LDFLAGS}"
     14 	@echo "CC       = ${CC}"
     15 
     16 config.h: config.mk
     17 	@echo creating $@ from config.def.h
     18 	@cp config.def.h $@
     19 
     20 svkbd-%: layout.%.h config.h ${SRC}
     21 	@echo creating layout.h from $<
     22 	@cp $< layout.h
     23 	@echo CC -o $@
     24 	@${CC} -o $@ ${SRC} ${LDFLAGS} ${CFLAGS}
     25 
     26 clean:
     27 	@echo cleaning
     28 	@for i in svkbd-*; \
     29 	do \
     30 		if [ -x $$i ]; \
     31 		then \
     32 			rm -f $$i 2> /dev/null; \
     33 		fi \
     34 	done; true
     35 	@rm -f ${OBJ} svkbd-${VERSION}.tar.gz 2> /dev/null; true
     36 
     37 dist: clean
     38 	@echo creating dist tarball
     39 	@mkdir -p svkbd-${VERSION}
     40 	@cp LICENSE Makefile README config.def.h config.mk \
     41 		${SRC} svkbd-${VERSION}
     42 	@for i in layout.*.h; \
     43 	do \
     44 		cp $$i svkbd-${VERSION}; \
     45 	done
     46 	@tar -cf svkbd-${VERSION}.tar svkbd-${VERSION}
     47 	@gzip svkbd-${VERSION}.tar
     48 	@rm -rf svkbd-${VERSION}
     49 
     50 install: all
     51 	@echo installing executable files to ${DESTDIR}${PREFIX}/bin
     52 	@mkdir -p ${DESTDIR}${PREFIX}/bin
     53 	@for i in svkbd-*; \
     54 	do \
     55 		if [ -x $$i ]; \
     56 		then \
     57 			echo CP $$i; \
     58 			cp $$i ${DESTDIR}${PREFIX}/bin; \
     59 			chmod 755 ${DESTDIR}${PREFIX}/bin/$$i; \
     60 		fi \
     61 	done
     62 #	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
     63 #	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     64 #	@sed "s/VERSION/${VERSION}/g" < svkbd.1 > ${DESTDIR}${MANPREFIX}/man1/svkbd.1
     65 #	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/svkbd.1
     66 
     67 uninstall:
     68 	@echo removing executable files from ${DESTDIR}${PREFIX}/bin
     69 	@rm -f ${DESTDIR}${PREFIX}/bin/svkbd-*
     70 #	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
     71 #	@rm -f ${DESTDIR}${MANPREFIX}/man1/svkbd.1
     72 
     73 .PHONY: all options clean dist install uninstall