From e73fd5b2cb14a00a65037f27383b206bdeb992b8 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 11 Jan 2015 12:33:14 -0600 Subject: A fiew Micro Python build fixes. There are still issues --- apps/interpreters/micropython/.gitignore | 1 + apps/interpreters/micropython/Makefile | 11 ++++++----- apps/interpreters/micropython/mpconfigport.h | 2 +- apps/interpreters/micropython/pyexec.h | 6 ++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/apps/interpreters/micropython/.gitignore b/apps/interpreters/micropython/.gitignore index 7dd697055..4f37f910b 100644 --- a/apps/interpreters/micropython/.gitignore +++ b/apps/interpreters/micropython/.gitignore @@ -1,5 +1,6 @@ /micropython-* /v*.tar.gz +/build /Make.dep /.depend /.built diff --git a/apps/interpreters/micropython/Makefile b/apps/interpreters/micropython/Makefile index 9042043f8..75ed5f45d 100644 --- a/apps/interpreters/micropython/Makefile +++ b/apps/interpreters/micropython/Makefile @@ -50,8 +50,9 @@ WGET ?= wget MICROPYTHON_UNPACKNAME = micropython-$(MICROPYTHON_VERSION) UNPACK ?= tar -zxf -MICROPYTHON_PATH = $(WD)/$(MICROPYTHON_UNPACKNAME)/py --include $(MICROPYTHON_PATH)/mkenv.mk +MICROPYTHON_UNPACKDIR = $(WD)/$(MICROPYTHON_UNPACKNAME) +MICROPTHYON_SRCDIR = $(MICROPYTHON_UNPACKDIR)/py +-include $(MICROPTHYON_SRCDIR)/mkenv.mk # qstr definitions (must come before including py.mk) @@ -59,13 +60,13 @@ QSTR_DEFS = qstrdefsport.h # include py core make definitions --include $(MICROPYTHON_PATH)/py.mk +-include $(MICROPTHYON_SRCDIR)/py.mk # c99 is needed for micropython CFLAGS+=-std=c99 -Wno-shadow -Wno-strict-prototypes -INC = -I. -I$(WD) -I$(PY_SRC) -I$(BUILD) +INC = -I. -I$(WD) -I$(MICROPYTHON_UNPACKDIR) -I$(PY_SRC) -I$(BUILD) CFLAGS +=$(INC) @@ -160,5 +161,5 @@ distclean: clean $(call DELFILE, .downloaded) $(call DELFILE, .$(MICROPYTHON_TARBALL)) --include $(MICROPYTHON_PATH)/mkrules.mk +-include $(MICROPTHYON_SRCDIR)/mkrules.mk -include Make.dep diff --git a/apps/interpreters/micropython/mpconfigport.h b/apps/interpreters/micropython/mpconfigport.h index 12724bdd9..c2cd1cf63 100644 --- a/apps/interpreters/micropython/mpconfigport.h +++ b/apps/interpreters/micropython/mpconfigport.h @@ -41,7 +41,6 @@ ****************************************************************************/ #include -#include /* We need to provide a declaration/definition of alloca() */ @@ -100,6 +99,7 @@ * Public Types ****************************************************************************/ +typedef int wint_t; /* For newlib's math.h. See wchar_t */ typedef int32_t mp_int_t; /* must be pointer size */ typedef uint32_t mp_uint_t; /* must be pointer size */ typedef void *machine_ptr_t; /* must be of pointer size */ diff --git a/apps/interpreters/micropython/pyexec.h b/apps/interpreters/micropython/pyexec.h index 3ef5b3673..07993a868 100644 --- a/apps/interpreters/micropython/pyexec.h +++ b/apps/interpreters/micropython/pyexec.h @@ -30,6 +30,12 @@ #ifndef __APPS_INTERPRETERS_MICROPYTHON_PYEXEC_H #define __APPS_INTERPRETERS_MICROPYTHON_PYEXEC_H 1 +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include "py/obj.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ -- cgit v1.2.3