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