PROJECT=photobox CC=gcc CFLAGS=-Wall -Wextra -std=c11 SRCDIR=src SRCS=$(wildcard $(SRCDIR)/*.c) OBJS=$(SRCS:.c=.o) LIBS=-lgphoto2 -lgphoto2_port -lqrencode -lmipea `pkg-config --cflags --libs gtk+-3.0` `curl-config --cflags --libs` %.o: %.c $(CC) -c -o $@ $< $(CFLAGS) $(LIBS) .PHONY: all all: $(PROJECT) $(PROJECT): $(OBJS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS) .PHONY: clean clean: rm -f src/*.o $(PROJECT)