Created
August 24, 2016 16:07
-
-
Save rgerganov/840c2780e948ecaab001952e11d5b7c8 to your computer and use it in GitHub Desktop.
patched Makedfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALL = /usr/bin/install -c | |
INSTALLDATA = /usr/bin/install -c -m 644 | |
PROGNAME = footswitch | |
CFLAGS = -Wall | |
UNAME := $(shell uname) | |
ifeq ($(UNAME), Darwin) | |
CFLAGS += -DOSX `pkg-config --cflags hidapi` | |
LDFLAGS = `pkg-config --libs hidapi` | |
else | |
ifeq ($(UNAME), Linux) | |
LDFLAGS = `pkg-config hidapi-libusb --libs` | |
else | |
LDFLAGS = -lhidapi | |
endif | |
endif | |
all: $(PROGNAME) | |
$(PROGNAME): $(PROGNAME).c common.h common.c debug.h debug.c | |
$(CC) $(PROGNAME).c common.c debug.c -o $(PROGNAME) $(CFLAGS) $(LDFLAGS) | |
install: all | |
$(INSTALL) $(PROGNAME) /usr/bin | |
ifeq ($(UNAME), Linux) | |
$(INSTALLDATA) 19-footswitch.rules /etc/udev/rules.d | |
endif | |
clean: | |
rm -f $(PROGNAME) *.o |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment