Skip to content

Instantly share code, notes, and snippets.

@rgerganov
Created August 24, 2016 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgerganov/840c2780e948ecaab001952e11d5b7c8 to your computer and use it in GitHub Desktop.
Save rgerganov/840c2780e948ecaab001952e11d5b7c8 to your computer and use it in GitHub Desktop.
patched Makedfile
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