refactor code to multiple modules
This commit is contained in:
17
Makefile
17
Makefile
@@ -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:
|
||||
|
Reference in New Issue
Block a user