CFLAGS := -Wall -Wextra -std=c17 -D_GNU_SOURCE LIBS := glib-2.0 CFLAGS += $(shell pkg-config --cflags $(LIBS)) LDLIBS := $(shell pkg-config --libs $(LIBS)) .PHONY: all all: main main_hash .PHONY: clean clean: rm -f main main_hash main_hash: CFLAGS += -DUSE_HASH main_hash: main.c $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@