build: Allow support for .S assembly file in SRC
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
parent
804ec24df9
commit
544bcd9845
|
@ -73,7 +73,7 @@ ifndef OWN_HL
|
||||||
SRC += jtag_scan.c jtagtap.c swdptap.c
|
SRC += jtag_scan.c jtagtap.c swdptap.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
OBJ = $(SRC:.c=.o)
|
OBJ = $(patsubst %.S,%.o,$(patsubst %.c,%.o,$(SRC)))
|
||||||
|
|
||||||
$(TARGET): include/version.h $(OBJ)
|
$(TARGET): include/version.h $(OBJ)
|
||||||
@echo " LD $@"
|
@echo " LD $@"
|
||||||
|
@ -83,6 +83,10 @@ $(TARGET): include/version.h $(OBJ)
|
||||||
@echo " CC $<"
|
@echo " CC $<"
|
||||||
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
%.o: %.S
|
||||||
|
@echo " AS $<"
|
||||||
|
$(Q)$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
%.bin: %
|
%.bin: %
|
||||||
@echo " OBJCOPY $@"
|
@echo " OBJCOPY $@"
|
||||||
$(Q)$(OBJCOPY) -O binary $^ $@
|
$(Q)$(OBJCOPY) -O binary $^ $@
|
||||||
|
|
Loading…
Reference in New Issue