diff options
author | Bernhard Nortmann <bernhard.nortmann@web.de> | 2016-10-26 20:32:04 +0300 |
---|---|---|
committer | Bernhard Nortmann <bernhard.nortmann@web.de> | 2016-10-26 22:37:29 +0300 |
commit | b496582b3d3dcd6130e1f40024fbc9d6895cc513 (patch) | |
tree | e70888ba8ccebc8799eb1e8cb3da80e55a542361 /Makefile | |
parent | 4564e7822b5174d904a0b61cb3b85f6bd66c908b (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-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) |