diff options
| author | Paul Sokolovsky | 2014-04-20 22:20:48 +0300 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-04-20 22:24:44 +0300 |
| commit | 7f7c7aa76a34adbdb36a82c5a5c8b93805faee0b (patch) | |
| tree | e70fe5b6dfd9f8e35646c2e2ad3c4187a852655c /windows/Makefile | |
| parent | a196d08dfc600615e7b3ce3f774ec4de3f0c0b19 (diff) | |
windows: Unbreak mingw32 build (cross-compiling under Linux).
Diffstat (limited to 'windows/Makefile')
| -rw-r--r-- | windows/Makefile | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/windows/Makefile b/windows/Makefile index 651de7c7f..2f5418886 100644 --- a/windows/Makefile +++ b/windows/Makefile @@ -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 |
