sources = $(wildcard *.c) objs = $(sources:.c=.o) headers = $(wildcard *.h) DFLAGS=-ggdb # for profiling #PFLAGS=-pg -fno-inline #PLIBS= # for electric fence EFLAGS=-DEFENCE ELIBS=-lefence CFLAGS=$(shell pkg-config --cflags xcb-glx xcb-composite xcb-damage glib-2.0) -W -Wall $(PFLAGS) $(DFLAGS) LDFLAGS=$(PFLAGS) LIBS=$(shell pkg-config --libs xcb-glx xcb-composite xcb-damage glib-2.0) -lGL $(PLIBS) -lX11 -lX11-xcb dcompmgr: $(objs) $(CC) -o $@ $^ $(LIBS) $(LDFLAGS) %.o: %.c $(headers) $(CC) -c -o $@ $< $(CFLAGS) clean: rm -f dcompmgr *.o VIRTUAL = clean