initialize gl on the overlay window
[dana/dcompmgr.git] / Makefile
index a5b283f..65ac859 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,25 @@ sources = $(wildcard *.c)
 objs = $(sources:.c=.o)
 headers = $(wildcard *.h)
 
-CFLAGS=$(shell pkg-config --cflags xcb-composite xcb-damage glib-2.0) -ggdb -W -Wall
-LIBS=$(shell pkg-config --libs xcb-composite xcb-damage glib-2.0)
+# 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) -ggdb -W -Wall $(PFLAGS)
+LDFLAGS=$(PFLAGS)
+LIBS=$(shell pkg-config --libs xcb-glx xcb-composite xcb-damage glib-2.0) -lGL $(PLIBS)
 
 dcompmgr: $(objs)
        $(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
 
 %.o: %.c $(headers)
        $(CC) -c -o $@ $< $(CFLAGS)
+
+clean:
+       rm -f dcompmgr *.o
+
+VIRTUAL = clean