learning-GTK/Makefile

26 lines
411 B
Makefile
Raw Permalink Normal View History

CFLAGS ?= -Wall -g $(shell pkg-config --cflags gtk4)
LDFLAGS ?= $(shell pkg-config --libs gtk4)
CLEANFILES :=
all: main example-3 example-4
example-3: example-3.c
gcc $(CFLAGS) -o $@ $< $(LDFLAGS)
CLEANFILES += example-3
example-4: example-4.c
gcc $(CFLAGS) -o $@ $< $(LDFLAGS)
CLEANFILES += example-4
main: main.c
gcc $(CFLAGS) -o $@ $< $(LDFLAGS)
CLEANFILES += main
clean:
rm -rf $(CLEANFILES)