CC = gcc CFLAGS = -ggdb -std=c99 -pedantic -Wall $(DEFINES) \ $(shell pkg-config --cflags gdk-pixbuf-2.0 gtk+-2.0 glib-2.0 gthread-2.0) \ -DN_THREADS=$(shell grep -c ^processor /proc/cpuinfo || echo 2) LDFLAGS = $(LIBS) -lm \ $(shell pkg-config --libs gdk-pixbuf-2.0 gtk+-2.0 glib-2.0 gthread-2.0) PROGS = wimmel wimmel_gl roi OBJS = wimmel.o wimmel_gl.o util.o roi.o all: $(PROGS) wimmel: wimmel.o util.o wimmel_gl: wimmel_gl.o util.o roi: roi.o .PHONY: clean all %: $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $+ %.o: %.c %.h $(CC) $(CFLAGS) -c -o $@ $< wimmel_gl: $(CC) $(LDFLAGS) `pkg-config --cflags --libs egl glesv2` -o $@ $+ clean: rm -f $(PROGS) $(OBJS)