Skip to content
Snippets Groups Projects
Commit 7f7c7aa7 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

windows: Unbreak mingw32 build (cross-compiling under Linux).

parent a196d08d
No related branches found
No related tags found
No related merge requests found
include ../py/mkenv.mk include ../py/mkenv.mk
-include mpconfigport.mk
# define main target # define main target
PROG = micropython.exe PROG = micropython.exe
...@@ -14,14 +15,15 @@ INC += -I$(PY_SRC) ...@@ -14,14 +15,15 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD) INC += -I$(BUILD)
# compiler settings # compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
LDFLAGS = -lm LDFLAGS = $(LDFLAGS_MOD) -lm
# Debugging/Optimization # Debugging/Optimization
ifdef DEBUG ifdef DEBUG
CFLAGS += -O0 -g CFLAGS += -g
COPT = -O0
else else
CFLAGS += -Os #-DNDEBUG COPT = -Os #-DNDEBUG
endif endif
# source files # source files
...@@ -30,11 +32,16 @@ SRC_C = \ ...@@ -30,11 +32,16 @@ SRC_C = \
unix/file.c \ unix/file.c \
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
LIB = -lreadline
LIB += -lws2_32 ifeq ($(MICROPY_USE_READLINE),1)
LIB += -lmman CFLAGS_MOD += -DMICROPY_USE_READLINE=1
LDFLAGS_MOD += -lreadline
# the following is needed for BSD # the following is needed for BSD
#LIB += -ltermcap #LDFLAGS_MOD += -ltermcap
endif
LIB += -lws2_32
#LIB += -lmman
include ../py/mkrules.mk include ../py/mkrules.mk
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
// Linking with GNU readline causes binary to be licensed under GPL // Linking with GNU readline causes binary to be licensed under GPL
#ifndef MICROPY_USE_READLINE #ifndef MICROPY_USE_READLINE
#define MICROPY_USE_READLINE (1) #define MICROPY_USE_READLINE (0)
#endif #endif
#define MICROPY_EMIT_X64 (1) #define MICROPY_EMIT_X64 (0)
#define MICROPY_EMIT_THUMB (0) #define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_EMIT_INLINE_THUMB (0)
#define MICROPY_MEM_STATS (1) #define MICROPY_MEM_STATS (1)
......
# Enable/disable modules and 3rd-party libs to be included in interpreter
# Build 32-bit binaries on a 64-bit host
MICROPY_FORCE_32BIT = 0
# Linking with GNU readline causes binary to be licensed under GPL
MICROPY_USE_READLINE = 0
# Subset of CPython time module
MICROPY_MOD_TIME = 1
# ffi module requires libffi (libffi-dev Debian package)
MICROPY_MOD_FFI = 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment