2009-02-09 20:51:52 +01:00
|
|
|
UNAME=$(shell uname)
|
|
|
|
|
2009-02-08 11:25:32 +01:00
|
|
|
CFLAGS += -Wall
|
|
|
|
# Extended debugging flags, macros shall be available in gcc
|
|
|
|
CFLAGS += -gdwarf-2
|
|
|
|
CFLAGS += -g3
|
|
|
|
CFLAGS += -I/usr/include/xcb
|
2009-02-09 20:51:52 +01:00
|
|
|
CFLAGS += -I/usr/local/include/
|
|
|
|
CFLAGS += -I/usr/local/include/xcb
|
2009-02-08 11:25:32 +01:00
|
|
|
|
|
|
|
LDFLAGS += -lxcb-wm
|
2009-02-09 20:51:52 +01:00
|
|
|
LDFLAGS += -L/usr/local/lib
|
|
|
|
ifeq ($(UNAME),NetBSD)
|
|
|
|
LDFLAGS += -Wl,-rpath,/usr/local/lib
|
|
|
|
endif
|
2009-02-08 11:25:32 +01:00
|
|
|
|
|
|
|
FILES=$(patsubst %.c,%.o,$(wildcard *.c))
|
|
|
|
|
|
|
|
%.o: %.c %.h
|
|
|
|
$(CC) $(CFLAGS) -c -o $@ $<
|
|
|
|
|
|
|
|
all: ${FILES}
|
|
|
|
$(CC) -o mainx ${FILES} $(LDFLAGS)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|