diff --git a/src/Makefile.am b/src/Makefile.am index ccf5bce9..6aecd1db 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,14 +4,19 @@ include_HEADERS = \ libratbag.h libratbag_la_SOURCES = \ + debug.h \ etekcity.c \ + hidpp10.c \ + hidpp10.h \ libratbag.c \ libratbag.h \ libratbag-hidraw.c \ libratbag-hidraw.h \ libratbag-util.c \ libratbag-private.h \ - libratbag-util.h + libratbag-util.h \ + unifying.h \ + unifying.c libratbag_la_LIBADD = $(LIBUDEV_LIBS) diff --git a/uLogitech/include/debug.h b/src/debug.h similarity index 100% rename from uLogitech/include/debug.h rename to src/debug.h diff --git a/uLogitech/lib/hidpp10.c b/src/hidpp10.c similarity index 97% rename from uLogitech/lib/hidpp10.c rename to src/hidpp10.c index 1a1d353c..af8c5128 100644 --- a/uLogitech/lib/hidpp10.c +++ b/src/hidpp10.c @@ -29,6 +29,8 @@ * https://drive.google.com/folderview?id=0BxbRzx7vEV7eWmgwazJ3NUFfQ28&usp=sharing */ +#include "config.h" + #include #include #include @@ -38,11 +40,7 @@ #include #include -#define MIN(a,b) \ - ({ __typeof__ (a) _a = (a); \ - __typeof__ (b) _b = (b); \ - _a < _b ? _a : _b; \ - }) +#include #if DEBUG_LVL > 0 const char *hidpp_errors[0xFF] = { @@ -250,7 +248,7 @@ static int hidpp10_get_device_info(int fd, struct unifying_device *dev) { name_size = device_name.msg.string[1]; memcpy(dev->name, &device_name.msg.string[2], sizeof(device_name.msg.string)); - dev->name[MIN(name_size, sizeof(dev->name) - 1)] = '\0'; + dev->name[min(name_size, sizeof(dev->name) - 1)] = '\0'; /* * This may fail on some devices diff --git a/uLogitech/include/hidpp10.h b/src/hidpp10.h similarity index 100% rename from uLogitech/include/hidpp10.h rename to src/hidpp10.h diff --git a/uLogitech/lib/unifying.c b/src/unifying.c similarity index 100% rename from uLogitech/lib/unifying.c rename to src/unifying.c diff --git a/uLogitech/include/unifying.h b/src/unifying.h similarity index 100% rename from uLogitech/include/unifying.h rename to src/unifying.h