-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (31 loc) · 955 Bytes
/
Makefile
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
INSTDIR = $(HOME)/.local/share/applications
BINDIR ?= $(HOME)/softa/bin
RUNDIR = $(PWD)
BIN_FILES=xkl xkb-unlocker
DESKTOP_FILES=keylayout.desktop
INST_FILE=install -D -m 0644
INST_EXEC=install -D -m 0755
FLAGS=-Wall -Wextra $(shell pkg-config --cflags --libs x11)
.SUFFIXES:
.SUFFIXES: .in .c
TARGETS=$(addprefix $(INSTDIR)/, $(DESKTOP_FILES)) $(addprefix $(BINDIR)/,$(BIN_FILES))
install: $(TARGETS)
clean:
@$(RM) -v $(DESKTOP_FILES) $(BIN_FILES)
uninstall:
@$(RM) -v $(TARGETS)
$(BINDIR)/%: %
$(INST_EXEC) $< $@
$(INSTDIR)/%: %
$(INST_FILE) $< $@
%:: %.in
sed -e 's,@RUNDIR@,$(RUNDIR),g' $< > $@
%:: %.c
$(CC) -o $@ $< $(FLAGS)
image:
for s in $$(seq 1 3); do xkbprint -color -ll $$s -fit :0 -lc en_US.ISO8859-15 -o -; done | ps2pdf - - > keyboard.pdf
pkg:
for control in packages/*; do test -f $$control && { ./generate-deb-pkg.sh $$control || exit 1; }; done
xkl:
echo "Generate the xkl script with generate-xkl.sh"
false