diff options
Diffstat (limited to 'unix/Makefile')
-rw-r--r-- | unix/Makefile | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/unix/Makefile b/unix/Makefile index 0d8e35f261..790bbafbc6 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -57,7 +57,12 @@ endif endif ifeq ($(MICROPY_USE_READLINE),1) +INC += -I../lib/mp-readline CFLAGS_MOD += -DMICROPY_USE_READLINE=1 +LIB_SRC_C_EXTRA += mp-readline/readline.c +endif +ifeq ($(MICROPY_USE_READLINE),2) +CFLAGS_MOD += -DMICROPY_USE_READLINE=2 LDFLAGS_MOD += -lreadline # the following is needed for BSD #LDFLAGS_MOD += -ltermcap @@ -98,8 +103,13 @@ SRC_C = \ coverage.c \ $(SRC_MOD) +LIB_SRC_C = $(addprefix lib/,\ + $(LIB_SRC_C_EXTRA) \ + ) -OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) +OBJ = $(PY_O) +OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) +OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o)) include ../py/mkrules.mk |