| 1 |
CFLAGS = -pipe \ |
| 2 |
-o2 \ |
| 3 |
-Wstrict-overflow=5 -fstack-protector-all \ |
| 4 |
-W -Wall -Wextra \ |
| 5 |
-Wbad-function-cast \ |
| 6 |
-Wcast-align \ |
| 7 |
-Wcast-qual \ |
| 8 |
-Wconversion \ |
| 9 |
-Wfloat-equal \ |
| 10 |
-Wformat-y2k \ |
| 11 |
-Winit-self \ |
| 12 |
-Winline \ |
| 13 |
-Winvalid-pch \ |
| 14 |
-Wmissing-declarations \ |
| 15 |
-Wmissing-field-initializers \ |
| 16 |
-Wmissing-format-attribute \ |
| 17 |
-Wmissing-include-dirs \ |
| 18 |
-Wmissing-noreturn \ |
| 19 |
-Wmissing-prototypes \ |
| 20 |
-Wnested-externs \ |
| 21 |
-Wnormalized=nfc \ |
| 22 |
-Wold-style-definition \ |
| 23 |
-Woverlength-strings \ |
| 24 |
-Wpacked \ |
| 25 |
-Wpadded \ |
| 26 |
-Wpointer-arith \ |
| 27 |
-Wredundant-decls \ |
| 28 |
-Wshadow \ |
| 29 |
-Wsign-compare \ |
| 30 |
-Wstack-protector \ |
| 31 |
-Wstrict-aliasing=2 \ |
| 32 |
-Wstrict-prototypes \ |
| 33 |
-Wundef \ |
| 34 |
-Wunsafe-loop-optimizations \ |
| 35 |
-Wvolatile-register-var \ |
| 36 |
-Wwrite-strings |
| 37 |
|
| 38 |
|
| 39 |
LAUNCHER_LDLIBS=$(shell pkg-config --libs pkg-config xcb xcb-randr 2>/dev/null) |
| 40 |
LAUNCHER_CFLAGS=$(shell pkg-config --cflags pkg-config xcb xcb-randr 2>/dev/null) |
| 41 |
USER_DEFS="-DAUTORANDR_PATH=\"$(shell which autorandr 2>/dev/null)\"" |
| 42 |
#------------------------------------------------------------------------------ |
| 43 |
.PHONY : all clean |
| 44 |
|
| 45 |
#------------------------------------------------------------------------------ |
| 46 |
all : autorandr-launcher |
| 47 |
|
| 48 |
autorandr-launcher: autorandr_launcher.c |
| 49 |
$(CC) $(CFLAGS) $(LAUNCHER_CFLAGS) $(USER_DEFS) -o $@ $+ $(LAUNCHER_LDLIBS) |
| 50 |
|
| 51 |
#------------------------------------------------------------------------------ |
| 52 |
clean : |
| 53 |
$(RM) autorandr-launcher *.o |