build: Allow support for .S assembly file in SRC

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2019-08-05 15:41:46 +02:00
parent 804ec24df9
commit 544bcd9845
1 changed files with 5 additions and 1 deletions

View File

@ -73,7 +73,7 @@ ifndef OWN_HL
SRC += jtag_scan.c jtagtap.c swdptap.c
endif
OBJ = $(SRC:.c=.o)
OBJ = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(SRC)))
$(TARGET): include/version.h $(OBJ)
@echo " LD $@"
@ -83,6 +83,10 @@ $(TARGET): include/version.h $(OBJ)
@echo " CC $<"
$(Q)$(CC) $(CFLAGS) -c $< -o $@
%.o: %.S
@echo " AS $<"
$(Q)$(CC) $(CFLAGS) -c $< -o $@
%.bin: %
@echo " OBJCOPY $@"
$(Q)$(OBJCOPY) -O binary $^ $@