Commit 7f7c7aa7 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

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

parent a196d08d
include ../py/mkenv.mk
-include mpconfigport.mk
# define main target
PROG = micropython.exe
......@@ -14,14 +15,15 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX
LDFLAGS = -lm
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
LDFLAGS = $(LDFLAGS_MOD) -lm
# Debugging/Optimization
ifdef DEBUG
CFLAGS += -O0 -g
CFLAGS += -g
COPT = -O0
else
CFLAGS += -Os #-DNDEBUG
COPT = -Os #-DNDEBUG
endif
# source files
......@@ -30,11 +32,16 @@ SRC_C = \
unix/file.c \
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
LIB = -lreadline
LIB += -lws2_32
LIB += -lmman
ifeq ($(MICROPY_USE_READLINE),1)
CFLAGS_MOD += -DMICROPY_USE_READLINE=1
LDFLAGS_MOD += -lreadline
# the following is needed for BSD
#LIB += -ltermcap
#LDFLAGS_MOD += -ltermcap
endif
LIB += -lws2_32
#LIB += -lmman
include ../py/mkrules.mk
......@@ -2,10 +2,10 @@
// Linking with GNU readline causes binary to be licensed under GPL
#ifndef MICROPY_USE_READLINE
#define MICROPY_USE_READLINE (1)
#define MICROPY_USE_READLINE (0)
#endif
#define MICROPY_EMIT_X64 (1)
#define MICROPY_EMIT_X64 (0)
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
#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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment