--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@
 PREFIX ?= /usr/local
 BINDIR ?= $(PREFIX)/bin
 MANDIR ?= $(PREFIX)/share/man
-CFLAGS ?= -std=c99 -Wall -Wextra -Wno-unused-parameter -Wno-strict-prototypes
+CFLAGS += -std=c99 -Wall -Wextra -Wno-unused-parameter -Wno-strict-prototypes
 PKG_CONFIG ?= pkg-config
 INSTALL ?= install
 
@@ -32,7 +32,7 @@
 all: wlr-dpms
 
 wlr-dpms: wlr-dpms.c wlr-output-power-management-unstable-v1-protocol.c
-	$(CC) $(CFLAGS) -o $@ $^ $(WAYLAND_FLAGS)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(WAYLAND_FLAGS)
 
 wlr-output-power-management-unstable-v1-client-protocol.h: wlr-output-power-management-unstable-v1.xml
 	$(WAYLAND_SCANNER) client-header $< $@
