Makefile uses Bear to improve clangd
This commit is contained in:
parent
f6a4c76b54
commit
9f304641b2
3 changed files with 10 additions and 5 deletions
2
Makefile
2
Makefile
|
|
@ -38,7 +38,7 @@ setup:
|
||||||
all: setup $(BIN)/$(BINARY) $(BUILD)/$(BINARY).desktop
|
all: setup $(BIN)/$(BINARY) $(BUILD)/$(BINARY).desktop
|
||||||
$(BIN)/$(BINARY): $(call mkobj,main.o util.o)
|
$(BIN)/$(BINARY): $(call mkobj,main.o util.o)
|
||||||
$(CC) $^ $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
$(CC) $^ $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||||
$(OBJ)/main.o: $(call mksrc,main.c client.h) config.mk $(call mkinclude,config.h cursor-shape-v1-protocol.h \
|
$(OBJ)/main.o: $(call mksrc,main.c) config.mk $(call mkinclude,config.h cursor-shape-v1-protocol.h \
|
||||||
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-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)
|
||||||
$(OBJ)/util.o: $(call mksrc,util.c util.h)
|
$(OBJ)/util.o: $(call mksrc,util.c util.h)
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,5 @@ XLIBS =
|
||||||
# dwl itself only uses C99 features, but wlroots' headers use anonymous unions (C11).
|
# dwl itself only uses C99 features, but wlroots' headers use anonymous unions (C11).
|
||||||
# To avoid warnings about them, we do not use -std=c99 and instead of using the
|
# To avoid warnings about them, we do not use -std=c99 and instead of using the
|
||||||
# gmake default 'CC=c99', we use cc.
|
# gmake default 'CC=c99', we use cc.
|
||||||
CC = cc
|
# NOTE: Bear is used if available+executable (generate compile_commands.json)
|
||||||
|
CC = $$([ -x "$$(command -v bear)" ] && echo 'bear -- ') cc
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -19,12 +19,16 @@
|
||||||
pkgs.mkShell {
|
pkgs.mkShell {
|
||||||
packages = with pkgs;
|
packages = with pkgs;
|
||||||
[
|
[
|
||||||
# NativeBuildInputs
|
# CryWL Build Utils
|
||||||
|
gnumake
|
||||||
|
bear
|
||||||
|
|
||||||
|
# DWL - NativeBuildInputs
|
||||||
installShellFiles
|
installShellFiles
|
||||||
pkg-config
|
pkg-config
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
|
|
||||||
# BuildInputs
|
# DWL - BuildInputs
|
||||||
libinput
|
libinput
|
||||||
xorg.libxcb
|
xorg.libxcb
|
||||||
libxkbcommon
|
libxkbcommon
|
||||||
|
|
@ -35,7 +39,7 @@
|
||||||
]
|
]
|
||||||
++ lib.optionals enableXWayland
|
++ lib.optionals enableXWayland
|
||||||
[
|
[
|
||||||
# XWayland
|
# DWL - XWayland
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
xorg.xcbutilwm
|
xorg.xcbutilwm
|
||||||
xwayland
|
xwayland
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue