use config.def.h

This commit is contained in:
korei999 2023-11-29 21:22:42 +02:00
parent 7341d047da
commit 325145d4c6
3 changed files with 6 additions and 8 deletions

View file

@ -16,7 +16,7 @@ LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` $(LIBS)
all: dwl
dwl: dwl.o util.o
$(CC) dwl.o util.o $(LDLIBS) $(LDFLAGS) $(DWLCFLAGS) -o $@
dwl.o: dwl.c config.mk config.h client.h cursor-shape-v1-protocol.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
dwl.o: dwl.c config.mk config.def.h client.h cursor-shape-v1-protocol.h xdg-shell-protocol.h wlr-layer-shell-unstable-v1-protocol.h
util.o: util.c util.h
# wayland-scanner is a tool which generates C headers and rigging for Wayland
@ -35,8 +35,6 @@ cursor-shape-v1-protocol.h:
$(WAYLAND_SCANNER) server-header \
$(WAYLAND_PROTOCOLS)/staging/cursor-shape/cursor-shape-v1.xml $@
config.h:
cp config.def.h $@
clean:
rm -f dwl *.o *-protocol.h

View file

@ -8,8 +8,8 @@ PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man
DATADIR = $(PREFIX)/share
XWAYLAND =
XLIBS =
# XWAYLAND =
# XLIBS =
# Uncomment to build XWayland support
#XWAYLAND = -DXWAYLAND
#XLIBS = xcb xcb-icccm
XWAYLAND = -DXWAYLAND
XLIBS = xcb xcb-icccm

2
dwl.c
View file

@ -391,7 +391,7 @@ static xcb_atom_t netatom[NetLast];
#endif
/* configuration, allows nested code to access above variables */
#include "config.h"
#include "config.def.h"
/* attempt to encapsulate suck into one file */
#include "client.h"