Improve compiling experience on MinGW platform (use pkg-config, *nix rm).
This commit is contained in:
parent
b975fd00a0
commit
66dc9057e2
8
Makefile
8
Makefile
|
@ -49,6 +49,11 @@ ifeq ($(OS),Windows_NT)
|
||||||
OS_CFLAGS = -D__Windows__ -DNO_SHELLCMD
|
OS_CFLAGS = -D__Windows__ -DNO_SHELLCMD
|
||||||
RM = del
|
RM = del
|
||||||
endif
|
endif
|
||||||
|
ifneq (, $findstring(MINGW, $(UNAME_S)))
|
||||||
|
PORTS_CFLAGS := $(shell pkg-config --cflags libusb)
|
||||||
|
PORTS_LDFLAGS := $(shell pkg-config --libs libusb)
|
||||||
|
RM = rm -rf
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
MSPDEBUG_CC = $(CC)
|
MSPDEBUG_CC = $(CC)
|
||||||
BINARY = mspdebug
|
BINARY = mspdebug
|
||||||
|
@ -108,6 +113,9 @@ clean:
|
||||||
ifeq ($(UNAME_O),Cygwin)
|
ifeq ($(UNAME_O),Cygwin)
|
||||||
$(RM) */*.o
|
$(RM) */*.o
|
||||||
$(RM) $(BINARY)
|
$(RM) $(BINARY)
|
||||||
|
else ifneq (, $findstring(MINGW, $(UNAME_S)))
|
||||||
|
$(RM) */*.o
|
||||||
|
$(RM) $(BINARY)
|
||||||
else
|
else
|
||||||
$(RM) drivers\*.o
|
$(RM) drivers\*.o
|
||||||
$(RM) formats\*.o
|
$(RM) formats\*.o
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#ifndef USBUTIL_H_
|
#ifndef USBUTIL_H_
|
||||||
#define USBUTIL_H_
|
#define USBUTIL_H_
|
||||||
|
|
||||||
#ifndef __Windows__
|
#if !defined(__Windows__) || defined(__MINGW32__)
|
||||||
#include <usb.h>
|
#include <usb.h>
|
||||||
#else
|
#else
|
||||||
#include <lusb0_usb.h>
|
#include <lusb0_usb.h>
|
||||||
|
|
Loading…
Reference in New Issue