~mil/sxmo-svkbd

ref: 4fc0c19ff3055da274ddbb7db40efd1a00839642 sxmo-svkbd/Makefile -rw-r--r-- 1.8 KiB
4fc0c19fMiles Alan Restore original svkbd colorscheme and bump up to use monospace-18 as font 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# svkbd - simple virtual keyboard
# See LICENSE file for copyright and license details.

include config.mk

SRC = drw.c svkbd.c util.c

all: options svkbd-${LAYOUT}

options:
	@echo svkbd build options:
	@echo "CFLAGS   = ${CFLAGS}"
	@echo "LDFLAGS  = ${LDFLAGS}"
	@echo "CC       = ${CC}"

config.h: config.mk
	@echo creating $@ from config.def.h
	@cp config.def.h $@

svkbd-%: layout.%.h config.h ${SRC}
	@echo creating layout.h from $<
	@cp $< layout.h
	@echo CC -o $@
	@${CC} -o $@ ${SRC} ${LDFLAGS} ${CFLAGS}

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

dist: clean
	@echo creating dist tarball
	@mkdir -p svkbd-${VERSION}
	@cp LICENSE Makefile README config.def.h config.mk \
		${SRC} svkbd-${VERSION}
	@for i in layout.*.h; \
	do \
		cp $$i svkbd-${VERSION}; \
	done
	@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
	@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

uninstall:
	@echo removing executable files from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/svkbd-*
#	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
#	@rm -f ${DESTDIR}${MANPREFIX}/man1/svkbd.1

.PHONY: all options clean dist install uninstall