From ce05175372a9ddca1a225db0765ace1127a39293 Mon Sep 17 00:00:00 2001 From: Nicholas Date: Fri, 12 Nov 2021 09:22:01 -0800 Subject: chore: simplified organizational structure --- src/cmd/wm/rules.mk | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/cmd/wm/rules.mk (limited to 'src/cmd/wm/rules.mk') diff --git a/src/cmd/wm/rules.mk b/src/cmd/wm/rules.mk new file mode 100644 index 0000000..30d786d --- /dev/null +++ b/src/cmd/wm/rules.mk @@ -0,0 +1,62 @@ +include share/push.mk +# Iterate through subdirectory tree + +# local sources +SRCS_$(d):=\ + $(d)/xdg-shell-protocol.c\ + $(d)/wlr-layer-shell-unstable-v1-protocol.c\ + $(d)/util.c\ + $(d)/input.c\ + $(d)/render.c\ + $(d)/layer.c\ + $(d)/xdg.c\ + $(d)/client.c\ + $(d)/monitor.c\ + $(d)/main.c + +# local outputs +BINS_$(d) := $(d)/wm + +include share/paths.mk + +# Local rules +include share/dynamic.mk + +$(d)/xdg-shell-protocol.h: + @echo "MK $(notdir $@)";\ + $(WL_SCAN) server-header $(WL_PROTO)/stable/xdg-shell/xdg-shell.xml $@ + +$(d)/xdg-shell-protocol.c: $(d)/xdg-shell-protocol.h + @echo "MK $(notdir $@)";\ + $(WL_SCAN) private-code $(WL_PROTO)/stable/xdg-shell/xdg-shell.xml $@ + +$(d)/wlr-layer-shell-unstable-v1-protocol.h: + @echo "MK $(notdir $@)";\ + $(WL_SCAN) server-header $(dir $@)protocol/wlr-layer-shell-unstable-v1.xml $@ + +$(d)/wlr-layer-shell-unstable-v1-protocol.c: $(d)/wlr-layer-shell-unstable-v1-protocol.h + @echo "MK $(notdir $@)";\ + $(WL_SCAN) private-code $(dir $@)protocol/wlr-layer-shell-unstable-v1.xml $@ + +GENS+=\ + $(d)/xdg-shell-protocol.h\ + $(d)/xdg-shell-protocol.c\ + $(d)/wlr-layer-shell-unstable-v1-protocol.h\ + $(d)/wlr-layer-shell-unstable-v1-protocol.c + +$(BINS_$(d)): TCINCS=-I cmd/wm + +$(BINS_$(d)): TCFLAGS=\ + `$(PKG) --cflags wlroots`\ + `$(PKG) --cflags wayland-server`\ + `$(PKG) --cflags xkbcommon` + +$(BINS_$(d)): TCLIBS=\ + `$(PKG) --libs wlroots`\ + `$(PKG) --libs wayland-server`\ + `$(PKG) --libs xkbcommon`\ + +$(BINS_$(d)): $(OBJS_$(d)) $(OBJ_DIR)/base/base.a + $(COMPLINK) + +include share/pop.mk -- cgit v1.2.1