From 70e40cfd095c48b57908c932a545d4df216a86b3 Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Fri, 10 Apr 2026 17:03:26 +0900 Subject: [PATCH 1/2] Use pkg-config to find include dirs --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9c3cafa..562deec 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ CC = gcc LIB = -lbluetooth -lnotify -INC = -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -I /usr/include/gdk-pixbuf-2.0 +INC = $(shell pkg-config --cflags gdk-pixbuf-2.0) BASE = lampify INST = /usr/local/bin/ CFLAG = -Wall -Ofast From 4b57e02837ec360805dabff63c8e7a2609779b26 Mon Sep 17 00:00:00 2001 From: Nick Hastings Date: Fri, 10 Apr 2026 17:05:47 +0900 Subject: [PATCH 2/2] Make source file first to not confuse the linker --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 562deec..db2cf58 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ INST = /usr/local/bin/ CFLAG = -Wall -Ofast all: - $(CC) $(CFLAG) $(INC) $(LIB) -o $(BASE) $(BASE).c + $(CC) $(BASE).c $(CFLAG) $(INC) $(LIB) -o $(BASE) clean: rm -f $(BASE)