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.
pull/1505/head
Paul Sokolovsky 2015-10-12 14:42:05 +03:00
rodzic fdfcee7b1e
commit 408b74d74c
2 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -51,6 +51,7 @@ LD = $(CROSS_COMPILE)ld
OBJCOPY = $(CROSS_COMPILE)objcopy
SIZE = $(CROSS_COMPILE)size
STRIP = $(CROSS_COMPILE)strip
AR = $(CROSS_COMPILE)ar
ifeq ($(MICROPY_FORCE_32BIT),1)
CC += -m32
CXX += -m32

Wyświetl plik

@ -87,6 +87,9 @@ ifndef DEBUG
endif
$(Q)$(SIZE) $(PROG)
lib: $(OBJ)
$(AR) rcs libmicropython.a $(OBJ)
clean: clean-prog
clean-prog:
$(RM) -f $(PROG)