diff --git a/Makefile b/Makefile index ec2c6c2..159193b 100644 --- a/Makefile +++ b/Makefile @@ -5,19 +5,20 @@ CFLAGS = -Wall UNAME := $(shell uname) ifeq ($(UNAME), Darwin) CFLAGS += -DOSX $(shell pkg-config --cflags hidapi) - LDFLAGS = $(shell pkg-config --libs hidapi) + LDLIBS = $(shell pkg-config --libs hidapi) else ifeq ($(UNAME), Linux) CFLAGS += $(shell pkg-config --cflags hidapi-libusb) - LDFLAGS = $(shell pkg-config --libs hidapi-libusb) + LDLIBS = $(shell pkg-config --libs hidapi-libusb) else - LDFLAGS = -lhidapi + LDLIBS = -lhidapi endif endif -all: scythe.c footswitch.c common.h common.c debug.h debug.c - $(CC) footswitch.c common.c debug.c -o footswitch $(CFLAGS) $(LDFLAGS) - $(CC) scythe.c common.c debug.c -o scythe $(CFLAGS) $(LDFLAGS) +all: footswitch scythe + +footswitch: footswitch.c common.c debug.c +scythe: scythe.c common.c debug.c install: all $(INSTALL) footswitch $(PREFIX)/bin