diff options
-rw-r--r-- | Makefile | 36 | ||||
-rw-r--r-- | autorotate.c | 6 |
2 files changed, 40 insertions, 2 deletions
@@ -1,2 +1,34 @@ -LDLIBS=-lXrandr -lX11 -lXi -autorotate: autorotate.c +.POSIX: + +# This Makefile was generated by maje +# See https://src.kaivo.net/dev/maje/ for more information +# Do not edit this Makefile by hand + +CC=c99 +LD=$(CC) +CFLAGS=-Wall -Wextra -Wpedantic -Werror -g +LDFLAGS= +LDLIBS= -lXrandr +SRCDIR=. +OBJDIR=. +BINDIR=$(OBJDIR) +LIBDIR=$(OBJDIR) +DESTDIR=/usr/local + +all: $(BINDIR)/autorotate + +clean: + rm -f $(BINDIR)/autorotate $(OBJDIR)/*.o + +install: $(BINDIR)/autorotate + mkdir -p $(DESTDIR)/bin + cp $(BINDIR)/autorotate $(DESTDIR)/bin + +$(BINDIR)/autorotate: $(OBJDIR)/autorotate.o +$(OBJDIR)/autorotate.o: $(SRCDIR)/autorotate.c + @mkdir -p $(@D) + $(CC) $(CFLAGS) -o $@ -c $(SRCDIR)/autorotate.c + +$(BINDIR)/autorotate: + @mkdir -p $(@D) + $(LD) $(LDFLAGS) -o $@ $(OBJDIR)/*.o $(LDLIBS) diff --git a/autorotate.c b/autorotate.c index 99b3fe2..b89f745 100644 --- a/autorotate.c +++ b/autorotate.c @@ -9,6 +9,12 @@ #include <X11/extensions/Xrandr.h> #include <X11/extensions/XInput.h> +/* +MAJE_LDLIB=-lXrandr +MAJE_LDLIB=-lX11 +MAJE_LDLIB=-lXi +*/ + #define ACPID_SOCK_PATH "/var/run/acpid.socket" /* once to go into tablet mode, twice to come out */ |