From 3071026fbf78831f0707a311905d9ec3358ff068 Mon Sep 17 00:00:00 2001 From: Johannes Bensmann Date: Sat, 8 Jun 2019 18:49:32 +0200 Subject: added a Makefile --- Makefile | 26 ++++++++++++++++++++++++++ xmouseless.c | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dadda94 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# xmouseless +VERSION = 0.0.1 +CC = /usr/bin/gcc +CFLAGS = -Wall -g +LDFLAGS = -lX11 -lXtst -lpthread + +PREFIX=/usr/local + +SRC = xmouseless.c +BIN = xmouseless + +all: $(BIN) + +$(BIN): $(SRC) + $(CC) $(CFLAGS) -o $(BIN) $(SRC) $(LDFLAGS) + +clean: + rm -f $(BIN) + +install: all + mkdir -p $(PREFIX)/bin + cp -f $(BIN) ${PREFIX}/bin + chmod 755 ${PREFIX}/bin/$(BIN) + +uninstall: + rm -f ${PREFIX}/bin/$(BIN) diff --git a/xmouseless.c b/xmouseless.c index ae42741..197be5b 100644 --- a/xmouseless.c +++ b/xmouseless.c @@ -1,5 +1,4 @@ /* - gcc xmouseless.c -o xmouseless -lX11 -lpthread -lXtst */ #include #include @@ -28,6 +27,7 @@ struct { } mouseinfo; + int getrootptr(int *x, int *y); void moverelative(int x, int y); void click(int button, int is_press); -- cgit v1.2.3