aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoshua Yun <joshua@joshuayun.com>2025-03-12 01:28:59 -0500
committerJoshua Yun <joshua@joshuayun.com>2025-03-12 01:28:59 -0500
commit3dc4dcc4ca0dee958a56f43e8a635a6d961e7ccc (patch)
treea8c5c08ada9f149d5cd0839b0dfd83d4630aa4eb /Makefile
parentdf6d37936bac129d1fd7098cdd37f0cf44f1d4f5 (diff)
downloaddwl-3dc4dcc4ca0dee958a56f43e8a635a6d961e7ccc.tar.gz
Systray patch
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 17 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 279b1c0..6251a2a 100644
--- a/Makefile
+++ b/Makefile
@@ -12,17 +12,28 @@ DWLDEVCFLAGS = -g -Wpedantic -Wall -Wextra -Wdeclaration-after-statement \
-Wfloat-conversion
# CFLAGS / LDFLAGS
-PKGS = wayland-server xkbcommon libinput pixman-1 fcft $(XLIBS)
+PKGS = wayland-server xkbcommon libinput pixman-1 fcft $(XLIBS) dbus-1
DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(WLR_INCS) $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CFLAGS)
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(WLR_LIBS) -lm $(LIBS)
+TRAYOBJS = systray/watcher.o systray/tray.o systray/item.o systray/icon.o systray/menu.o systray/helpers.o
+TRAYDEPS = systray/watcher.h systray/tray.h systray/item.h systray/icon.h systray/menu.h systray/helpers.h
+
all: dwl
-dwl: dwl.o util.o
- $(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
-dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
+dwl: dwl.o util.o dbus.o $(TRAYOJBS) $(TRAYDEPS)
+ $(CC) dwl.o util.o dbus.o $(TRAYOBJS) $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
+dwl.o: dwl.c client.h dbus.h config.h config.mk cursor-shape-v1-protocol.h \
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
- wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
+ wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h \
+ $(TRAYDEPS)
util.o: util.c util.h
+dbus.o: dbus.c dbus.h
+systray/watcher.o: systray/watcher.c $(TRAYDEPS)
+systray/tray.o: systray/tray.c $(TRAYDEPS)
+systray/item.o: systray/item.c $(TRAYDEPS)
+systray/icon.o: systray/icon.c $(TRAYDEPS)
+systray/menu.o: systray/menu.c $(TRAYDEPS)
+systray/helpers.o: systray/helpers.c $(TRAYDEPS)
# 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
@@ -49,7 +60,7 @@ xdg-shell-protocol.h:
config.h:
cp config.def.h $@
clean:
- rm -f dwl *.o *-protocol.h
+ rm -f dwl *.o *-protocol.h systray/*.o
dist: clean
mkdir -p dwl-$(VERSION)