Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/linux-sunxi/sunxi-tools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Nortmann <bernhard.nortmann@web.de>2016-10-26 20:32:04 +0300
committerBernhard Nortmann <bernhard.nortmann@web.de>2016-10-26 22:37:29 +0300
commitb496582b3d3dcd6130e1f40024fbc9d6895cc513 (patch)
treee70888ba8ccebc8799eb1e8cb3da80e55a542361 /Makefile
parent4564e7822b5174d904a0b61cb3b85f6bd66c908b (diff)
Have a workaround for missing mmap() in fexc.c and pio.c
By defining NO_MMAP it's now possible to avoid the usage of mmap() and munmap(). This benefits platforms that don't support these functions, e.g. Windows. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 975bf67..4771bf9 100644
--- a/Makefile
+++ b/Makefile
@@ -100,6 +100,10 @@ sunxi-fexc: fexc.h script.h script.c \
LIBUSB = libusb-1.0
LIBUSB_CFLAGS = `pkg-config --cflags $(LIBUSB)`
LIBUSB_LIBS = `pkg-config --libs $(LIBUSB)`
+ifeq ($(OS),Windows_NT)
+ # Windows lacks mman.h / mmap()
+ DEFINES += -DNO_MMAP
+endif
sunxi-fel: fel.c fel-to-spl-thunk.h progress.c progress.h
$(CC) $(CFLAGS) $(LIBUSB_CFLAGS) $(LDFLAGS) -o $@ $(filter %.c,$^) $(LIBS) $(LIBUSB_LIBS)