refactor code to multiple modules

This commit is contained in:
DanyLE
2024-03-30 00:18:51 +01:00
parent 48543efbbd
commit c1960f0438
17 changed files with 1899 additions and 828 deletions

View File

@@ -5,6 +5,14 @@ LIBS=\
$(shell pkg-config --cflags --libs wayland-server) \
$(shell pkg-config --cflags --libs xkbcommon)
OBJS=\
diyac.c \
cursor.c \
output.c \
seat.c \
xdg.c \
xdg-shell-protocol.c
# wayland-scanner is a tool which generates C headers and rigging for Wayland
# protocols, which are specified in XML. wlroots requires you to rig these up
# to your build system yourself and provide them in the include path.
@@ -16,11 +24,16 @@ xdg-shell-protocol.c: xdg-shell-protocol.h
$(WAYLAND_SCANNER) private-code \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
diyac: diyac.c xdg-shell-protocol.h xdg-shell-protocol.c
wlr-layer-shell-unstable-v1-protocol.h:
$(WAYLAND_SCANNER) server-header \
protocol/wlr-layer-shell-unstable-v1.xml $@
diyac: $(OBJS)
echo "Object is $(OBJS)"
$(CC) $(CFLAGS) \
-g -Werror -I. \
-DWLR_USE_UNSTABLE \
-o $@ $< \
-o $@ $(OBJS) \
$(LIBS)
clean: