File tree Expand file tree Collapse file tree 3 files changed +30
-10
lines changed
Expand file tree Collapse file tree 3 files changed +30
-10
lines changed Original file line number Diff line number Diff line change 11include ../py/mkenv.mk
2+ -include mpconfigport.mk
23
34# define main target
45PROG = micropython.exe
@@ -14,14 +15,15 @@ INC += -I$(PY_SRC)
1415INC += -I$(BUILD )
1516
1617# compiler settings
17- CFLAGS = $(INC ) -Wall -Werror -ansi -std=gnu99 -DUNIX
18- LDFLAGS = -lm
18+ CFLAGS = $(INC ) -Wall -Werror -ansi -std=gnu99 -DUNIX $( CFLAGS_MOD ) $( COPT )
19+ LDFLAGS = $( LDFLAGS_MOD ) -lm
1920
2021# Debugging/Optimization
2122ifdef DEBUG
22- CFLAGS += -O0 -g
23+ CFLAGS += -g
24+ COPT = -O0
2325else
24- CFLAGS + = -Os # -DNDEBUG
26+ COPT = -Os # -DNDEBUG
2527endif
2628
2729# source files
@@ -30,11 +32,16 @@ SRC_C = \
3032 unix/file.c \
3133
3234OBJ = $(PY_O ) $(addprefix $(BUILD ) /, $(SRC_C:.c=.o ) )
33- LIB = -lreadline
34- LIB += -lws2_32
35- LIB += -lmman
35+
36+ ifeq ($(MICROPY_USE_READLINE ) ,1)
37+ CFLAGS_MOD += -DMICROPY_USE_READLINE=1
38+ LDFLAGS_MOD += -lreadline
3639# the following is needed for BSD
37- # LIB += -ltermcap
40+ # LDFLAGS_MOD += -ltermcap
41+ endif
42+
43+ LIB += -lws2_32
44+ # LIB += -lmman
3845
3946include ../py/mkrules.mk
4047
Original file line number Diff line number Diff line change 22
33// Linking with GNU readline causes binary to be licensed under GPL
44#ifndef MICROPY_USE_READLINE
5- #define MICROPY_USE_READLINE (1 )
5+ #define MICROPY_USE_READLINE (0 )
66#endif
77
8- #define MICROPY_EMIT_X64 (1 )
8+ #define MICROPY_EMIT_X64 (0 )
99#define MICROPY_EMIT_THUMB (0)
1010#define MICROPY_EMIT_INLINE_THUMB (0)
1111#define MICROPY_MEM_STATS (1)
Original file line number Diff line number Diff line change 1+ # Enable/disable modules and 3rd-party libs to be included in interpreter
2+
3+ # Build 32-bit binaries on a 64-bit host
4+ MICROPY_FORCE_32BIT = 0
5+
6+ # Linking with GNU readline causes binary to be licensed under GPL
7+ MICROPY_USE_READLINE = 0
8+
9+ # Subset of CPython time module
10+ MICROPY_MOD_TIME = 1
11+
12+ # ffi module requires libffi (libffi-dev Debian package)
13+ MICROPY_MOD_FFI = 0
You can’t perform that action at this time.
0 commit comments