mirror of
https://github.com/jjsullivan5196/wvkbd.git
synced 2026-01-30 15:09:32 +01:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9fb1964f5d | ||
|
|
5b29d8c1a7 | ||
|
|
987ea03f84 | ||
|
|
0c743d9518 | ||
|
|
1963de0165 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -5,8 +5,6 @@
|
|||||||
include/config.h
|
include/config.h
|
||||||
.gdb_history
|
.gdb_history
|
||||||
*.log
|
*.log
|
||||||
wvkbd
|
|
||||||
*.1
|
*.1
|
||||||
config.h
|
build-*/*
|
||||||
wvkbd-mobintl
|
wvkbd-*
|
||||||
wvkbd-deskintl
|
|
||||||
|
|||||||
18
Makefile
18
Makefile
@@ -1,5 +1,7 @@
|
|||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
|
BUILDDIR=build-${LAYOUT}
|
||||||
|
|
||||||
NAME=wvkbd
|
NAME=wvkbd
|
||||||
BIN=${NAME}-${LAYOUT}
|
BIN=${NAME}-${LAYOUT}
|
||||||
SRC=.
|
SRC=.
|
||||||
@@ -9,6 +11,7 @@ PKGS = wayland-client xkbcommon pangocairo
|
|||||||
|
|
||||||
WVKBD_SOURCES += $(wildcard $(SRC)/*.c)
|
WVKBD_SOURCES += $(wildcard $(SRC)/*.c)
|
||||||
WVKBD_HEADERS += $(wildcard $(SRC)/*.h)
|
WVKBD_HEADERS += $(wildcard $(SRC)/*.h)
|
||||||
|
WVKBD_DIR_SOURCES = $(foreach src, $(WVKBD_SOURCES), $(addprefix $(BUILDDIR)/, $(src)))
|
||||||
|
|
||||||
PKG_CONFIG ?= pkg-config
|
PKG_CONFIG ?= pkg-config
|
||||||
CFLAGS += -std=gnu99 -Wall -g -DWITH_WAYLAND_SHM -DLAYOUT=\"layout.${LAYOUT}.h\" -DKEYMAP=\"keymap.${LAYOUT}.h\"
|
CFLAGS += -std=gnu99 -Wall -g -DWITH_WAYLAND_SHM -DLAYOUT=\"layout.${LAYOUT}.h\" -DKEYMAP=\"keymap.${LAYOUT}.h\"
|
||||||
@@ -20,16 +23,21 @@ WAYLAND_HEADERS = $(wildcard proto/*.xml)
|
|||||||
HDRS = $(WAYLAND_HEADERS:.xml=-client-protocol.h)
|
HDRS = $(WAYLAND_HEADERS:.xml=-client-protocol.h)
|
||||||
WAYLAND_SRC = $(HDRS:.h=.c)
|
WAYLAND_SRC = $(HDRS:.h=.c)
|
||||||
SOURCES = $(WVKBD_SOURCES) $(WAYLAND_SRC)
|
SOURCES = $(WVKBD_SOURCES) $(WAYLAND_SRC)
|
||||||
|
OBJECTS = $(WVKBD_DIR_SOURCES:.c=.o) $(WAYLAND_SRC:.c=.o)
|
||||||
|
|
||||||
SCDOC=scdoc
|
SCDOC=scdoc
|
||||||
DOCS = wvkbd.1
|
DOCS = wvkbd.1
|
||||||
|
|
||||||
OBJECTS = $(SOURCES:.c=.o)
|
|
||||||
|
|
||||||
all: ${BIN} ${DOCS}
|
all: ${BIN} ${DOCS}
|
||||||
|
|
||||||
config.h:
|
$(BUILDDIR)/config.h:
|
||||||
cp config.${LAYOUT}.h config.h
|
mkdir -p $(BUILDDIR)
|
||||||
|
cp config.$(LAYOUT).h $@
|
||||||
|
|
||||||
|
$(BUILDDIR)/%.o: %.c
|
||||||
|
mkdir -p $(BUILDDIR)
|
||||||
|
$(CC) -I $(CURDIR) -I $(CURDIR)/$(BUILDDIR) -c $(CFLAGS) -o $@ $<
|
||||||
|
|
||||||
proto/%-client-protocol.c: proto/%.xml
|
proto/%-client-protocol.c: proto/%.xml
|
||||||
wayland-scanner code < $? > $@
|
wayland-scanner code < $? > $@
|
||||||
@@ -39,11 +47,11 @@ proto/%-client-protocol.h: proto/%.xml
|
|||||||
|
|
||||||
$(OBJECTS): $(HDRS) $(WVKBD_HEADERS)
|
$(OBJECTS): $(HDRS) $(WVKBD_HEADERS)
|
||||||
|
|
||||||
wvkbd-${LAYOUT}: config.h $(OBJECTS) layout.${LAYOUT}.h
|
wvkbd-${LAYOUT}: $(BUILDDIR)/config.h $(OBJECTS) layout.${LAYOUT}.h
|
||||||
$(CC) -o wvkbd-${LAYOUT} $(OBJECTS) $(LDFLAGS)
|
$(CC) -o wvkbd-${LAYOUT} $(OBJECTS) $(LDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJECTS) config.h $(HDRS) $(WAYLAND_SRC) ${BIN} ${DOCS}
|
rm -rf "$(BUILDDIR)" wvkbd-$(LAYOUT)
|
||||||
|
|
||||||
format:
|
format:
|
||||||
clang-format -i $(WVKBD_SOURCES) $(WVKBD_HEADERS)
|
clang-format -i $(WVKBD_SOURCES) $(WVKBD_HEADERS)
|
||||||
|
|||||||
Reference in New Issue
Block a user