Commit 408b74d7 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py: Allow to to build MicroPython as a static library.

The whole current port gets slurped into a static lib named
"libmicropython.a". Maybe that's not ideal, but at least something
to start with.
parent fdfcee7b
...@@ -51,6 +51,7 @@ LD = $(CROSS_COMPILE)ld ...@@ -51,6 +51,7 @@ LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size SIZE = $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip STRIP = $(CROSS_COMPILE)strip
AR = $(CROSS_COMPILE)ar
ifeq ($(MICROPY_FORCE_32BIT),1) ifeq ($(MICROPY_FORCE_32BIT),1)
CC += -m32 CC += -m32
CXX += -m32 CXX += -m32
......
...@@ -87,6 +87,9 @@ ifndef DEBUG ...@@ -87,6 +87,9 @@ ifndef DEBUG
endif endif
$(Q)$(SIZE) $(PROG) $(Q)$(SIZE) $(PROG)
lib: $(OBJ)
$(AR) rcs libmicropython.a $(OBJ)
clean: clean-prog clean: clean-prog
clean-prog: clean-prog:
$(RM) -f $(PROG) $(RM) -f $(PROG)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment