2014-01-27 21:53:28 +00:00
|
|
|
include ../py/mkenv.mk
|
|
|
|
|
|
|
|
# define main target
|
|
|
|
PROG = micropython.exe
|
|
|
|
|
|
|
|
# qstr definitions (must come before including py.mk)
|
2014-04-08 14:25:47 +01:00
|
|
|
QSTR_DEFS = ../unix/qstrdefsport.h
|
2014-01-27 21:53:28 +00:00
|
|
|
|
|
|
|
# include py core make definitions
|
|
|
|
include ../py/py.mk
|
|
|
|
|
2014-04-16 22:10:33 +01:00
|
|
|
INC = -I.
|
|
|
|
INC += -I$(PY_SRC)
|
2014-04-17 18:03:27 +01:00
|
|
|
INC += -I$(BUILD)
|
2014-04-16 22:10:33 +01:00
|
|
|
|
2014-01-27 21:53:28 +00:00
|
|
|
# compiler settings
|
2014-04-16 22:10:33 +01:00
|
|
|
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX
|
2014-01-27 21:53:28 +00:00
|
|
|
LDFLAGS = -lm
|
|
|
|
|
|
|
|
# Debugging/Optimization
|
|
|
|
ifdef DEBUG
|
|
|
|
CFLAGS += -O0 -g
|
|
|
|
else
|
|
|
|
CFLAGS += -Os #-DNDEBUG
|
|
|
|
endif
|
|
|
|
|
|
|
|
# source files
|
|
|
|
SRC_C = \
|
2014-04-08 14:25:47 +01:00
|
|
|
unix/main.c \
|
|
|
|
unix/file.c \
|
2014-01-27 21:53:28 +00:00
|
|
|
|
|
|
|
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
|
|
|
|
LIB = -lreadline
|
|
|
|
LIB += -lws2_32
|
|
|
|
LIB += -lmman
|
|
|
|
# the following is needed for BSD
|
|
|
|
#LIB += -ltermcap
|
|
|
|
|
|
|
|
include ../py/mkrules.mk
|
|
|
|
|