Fix pkg-config issues
authorAndrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Tue, 24 Feb 2015 16:08:38 +0000 (19:08 +0300)
committerAndrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Tue, 24 Feb 2015 16:08:38 +0000 (19:08 +0300)
Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Makefile
usb.c

index f008d56..814514f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-CFLAGS  = $(shell pkg-config --cflags libusb-1.0)
-LDFLAGS = $(shell pkg-config --libs libusb-1.0)
+CFLAGS  = $(shell pkg-config --cflags libusb)
+LDFLAGS = $(shell pkg-config --libs libusb)
 
 PREFIX?=/usr/local
 
@@ -7,10 +7,10 @@ all: pl2303gpio cp2103gpio
 
 OBJS=usb.c main.c
 pl2303gpio: $(OBJS) pl2303.o
-       $(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS) -lusb
+       $(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS)
 
 cp2103gpio: $(OBJS) cp2103.o
-       $(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS) -lusb
+       $(CC) $(CFLAGS) -Wall -Werror -I"../include" -o $(@) $(^) $(LDFLAGS)
 
 clean:
        -rm pl2303gpio cp2103gpio
diff --git a/usb.c b/usb.c
index 92ebde9..d9e6640 100644 (file)
--- a/usb.c
+++ b/usb.c
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include <errno.h>
 #include <usb.h>
-#include <libusb.h>
 
 static int did_usb_init = 0;