Commits

Jérôme Vuarand committed f209083

Libusb is supposed to be included as <libusb.h> without dir prefix. Hacked a Makefile for Linux.

Comments (0)

Files changed (6)

+ifeq ($(OS),)
+OS=$(shell uname)
+endif
+
 ifeq ($(OS),Windows_NT)
 DLLEXT=dll
 else
 CFLAGS=-fvisibility=hidden -fPIC
 LDLIBS=-lusb-1.0
 
+ifeq ($(OS),Linux)
+CPPFLAGS+=-I/usr/include/libusb-1.0
+endif
+
 build:usb.$(DLLEXT)
 
 clean:
 
 #include <lua.h>
 #include <lauxlib.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 #include "compat.h"
 
 enum libusb_class_code luausb_to_class_code(lua_State* L, int index)
 /* this is a generated file, see gen.lua */
 #include <lua.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 
 enum libusb_class_code luausb_to_class_code(lua_State* L, int index);
 int luausb_is_class_code(lua_State* L, int index);
 enums_h:write([[
 /* this is a generated file, see gen.lua */
 #include <lua.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 
 ]])
 
 
 #include <lua.h>
 #include <lauxlib.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 #include "compat.h"
 
 ]])
 structs_h:write([[
 /* this is a generated file, see gen.lua */
 #include <lua.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 
 ]])
 
 /* this is a generated file, see gen.lua */
 #include <lua.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 
 struct libusb_device_descriptor* luausb_to_device_descriptor(lua_State* L, int index);
 struct libusb_device_descriptor* luausb_check_device_descriptor(lua_State* L, int index);
 #include <lua.h>
 #include <lauxlib.h>
-#include <libusb-1.0/libusb.h>
+#include <libusb.h>
 #include <string.h>
 #include "compat.h"
 #include "enums.h"