]> git.donarmstrong.com Git - deb_pkgs/autorandr.git/blobdiff - contrib/autorandr_launcher/makefile
Add make file and Create macro to enable local path of autorandr
[deb_pkgs/autorandr.git] / contrib / autorandr_launcher / makefile
diff --git a/contrib/autorandr_launcher/makefile b/contrib/autorandr_launcher/makefile
new file mode 100644 (file)
index 0000000..898f55f
--- /dev/null
@@ -0,0 +1,53 @@
+CFLAGS  = -pipe \
+       -o2 \
+       -Wstrict-overflow=5 -fstack-protector-all \
+       -W -Wall -Wextra \
+       -Wbad-function-cast \
+       -Wcast-align \
+       -Wcast-qual \
+       -Wconversion \
+       -Wfloat-equal \
+       -Wformat-y2k \
+       -Winit-self \
+       -Winline \
+       -Winvalid-pch \
+       -Wmissing-declarations \
+       -Wmissing-field-initializers \
+       -Wmissing-format-attribute \
+       -Wmissing-include-dirs \
+       -Wmissing-noreturn \
+       -Wmissing-prototypes \
+       -Wnested-externs \
+       -Wnormalized=nfc \
+       -Wold-style-definition \
+       -Woverlength-strings \
+       -Wpacked \
+       -Wpadded \
+       -Wpointer-arith \
+       -Wredundant-decls \
+       -Wshadow \
+       -Wsign-compare \
+       -Wstack-protector \
+       -Wstrict-aliasing=2 \
+       -Wstrict-prototypes \
+       -Wundef \
+       -Wunsafe-loop-optimizations \
+       -Wvolatile-register-var \
+       -Wwrite-strings
+
+
+LAUNCHER_LDLIBS=$(shell pkg-config --libs pkg-config xcb xcb-randr 2>/dev/null)
+LAUNCHER_CFLAGS=$(shell pkg-config --cflags pkg-config xcb xcb-randr 2>/dev/null)
+USER_DEFS="-DAUTORANDR_PATH=\"$(shell which autorandr 2>/dev/null)\""
+#------------------------------------------------------------------------------
+.PHONY : all clean
+
+#------------------------------------------------------------------------------
+all : autorandr-launcher
+
+autorandr-launcher: autorandr_launcher.c
+       $(CC) $(CFLAGS) $(LAUNCHER_CFLAGS) $(USER_DEFS) -o $@ $+ $(LAUNCHER_LDLIBS)
+
+#------------------------------------------------------------------------------
+clean :
+       $(RM) autorandr-launcher *.o