Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to be committed: #76

Open
wants to merge 19 commits into
base: six-buttons
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Modified Makefile to allow staged install and packaging for linux dis…
…tros (#69)
  • Loading branch information
aureliocarlucci authored Nov 25, 2021
commit d2eb3d8f23a128c51ff1c1c373e81e63e10cd3fd
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
PREFIX = /usr/local
UDEVPREFIX = /etc/udev

INSTALL = /usr/bin/install -c
INSTALLDATA = /usr/bin/install -c -m 644
CFLAGS = -Wall
@@ -21,17 +23,19 @@ footswitch: footswitch.c common.c debug.c
scythe: scythe.c common.c debug.c

install: all
$(INSTALL) footswitch $(PREFIX)/bin
$(INSTALL) scythe $(PREFIX)/bin
$(INSTALL) -d $(DESTDIR)$(PREFIX)/bin
$(INSTALL) footswitch $(DESTDIR)$(PREFIX)/bin
$(INSTALL) scythe $(DESTDIR)$(PREFIX)/bin
ifeq ($(UNAME), Linux)
$(INSTALLDATA) 19-footswitch.rules /etc/udev/rules.d
$(INSTALL) -d $(DESTDIR)$(UDEVPREFIX)/rules.d
$(INSTALLDATA) 19-footswitch.rules $(DESTDIR)$(UDEVPREFIX)/rules.d
endif

uninstall:
rm -f $(PREFIX)/bin/footswitch
rm -f $(PREFIX)/bin/scythe
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/footswitch
rm -f $(DESTDIR)$(PREFIX)/bin/scythe
ifeq ($(UNAME), Linux)
rm -f /etc/udev/rules.d/19-footswitch.rules
rm -f $(DESTDIR)$(UDEVPREFIX)/rules.d/19-footswitch.rules
endif

clean: