windows: Unbreak mingw32 build (cross-compiling under Linux).
This commit is contained in:
parent
a196d08dfc
commit
7f7c7aa76a
@ -1,4 +1,5 @@
|
||||
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)
|
||||
|
13
windows/mpconfigport.mk
Normal file
13
windows/mpconfigport.mk
Normal file
@ -0,0 +1,13 @@
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user