Skip to content

Commit

Permalink
py/dynruntime.mk: Allow building assembly source in natmods.
Browse files Browse the repository at this point in the history
Allow inclusion of assembly source files in dynamic native modules.
  • Loading branch information
mbooth101 authored and dpgeorge committed Aug 11, 2022
1 parent d53c3b6 commit 2e8816d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion py/dynruntime.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ CFLAGS += -U _FORTIFY_SOURCE # prevent use of __*_chk libc functions

MPY_CROSS_FLAGS += -march=$(ARCH)

SRC_O += $(addprefix $(BUILD)/, $(patsubst %.c,%.o,$(filter %.c,$(SRC))))
SRC_O += $(addprefix $(BUILD)/, $(patsubst %.c,%.o,$(filter %.c,$(SRC))) $(patsubst %.S,%.o,$(filter %.S,$(SRC))))
SRC_MPY += $(addprefix $(BUILD)/, $(patsubst %.py,%.mpy,$(filter %.py,$(SRC))))

################################################################################
Expand Down Expand Up @@ -134,6 +134,11 @@ $(BUILD)/%.o: %.c $(CONFIG_H) Makefile
$(ECHO) "CC $<"
$(Q)$(CROSS)gcc $(CFLAGS) -o $@ -c $<

# Build .o from .S source files
$(BUILD)/%.o: %.S $(CONFIG_H) Makefile
$(ECHO) "AS $<"
$(Q)$(CROSS)gcc $(CFLAGS) -o $@ -c $<

# Build .mpy from .py source files
$(BUILD)/%.mpy: %.py
$(ECHO) "MPY $<"
Expand Down

0 comments on commit 2e8816d

Please sign in to comment.