Skip to content

Commit

Permalink
Add Makefile and autostart .desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
thjaeger committed Nov 23, 2008
1 parent ef51b49 commit bfcdd11
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 4 deletions.
44 changes: 40 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,43 @@
all: wacomrotate
# Copyright (c) 2008, Thomas Jaeger <ThJaeger@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY
# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

wacomrotate: wacomrotate.c
gcc -Os -Wall -lX11 -lXrandr wacomrotate.c -o wacomrotate
DESTDIR =
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
AUTODIR = $(PREFIX)/etc/xdg/autostart
OFLAGS = -Os
CFLAGS = -Wall
LIBS = -lX11 -lXrandr

BINARY = wacomrotate
SOURCE = wacomrotate.c
DESKTOP = wacomrotate.desktop

all: $(BINARY)

.PHONY: all clean

clean:
rm -f wacomrotate
$(RM) $(BINARY)

$(BINARY): $(SOURCE)
$(CC) $(OFLAGS) $(CFLAGS) $(LIBS) $< -o $@

install: all
install -Ds $(BINARY) $(DESTDIR)$(BINDIR)/$(BINARY)
install -D -m 644 $(DESKTOP) $(DESTDIR)$(AUTODIR)/$(DESKTOP)

uninstall:
$(RM) $(DESTDIR)$(BINDIR)/$(BINARY)
$(RM) $(DESTDIR)$(AUTODIR)/$(DESKTOP)
10 changes: 10 additions & 0 deletions wacomrotate.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=wacomrotate
Comment=Automatically rotate wacom input when the screen is rotated
Exec=wacomrotate -f
Terminal=false
Type=Application
Categories=
GenericName=

0 comments on commit bfcdd11

Please sign in to comment.