diff options
| author | hathach <[email protected]> | 2021-03-29 22:51:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-03-29 22:51:11 +0700 |
| commit | ef73a9864f5cdb33d959ffcc944aa317d1f45303 (patch) | |
| tree | c67d37336d1a857649cffbd8acaa94ff017686be | |
| parent | 05d6d7d8d1e21ffa1a6a0d05ccfd298c5ff5a131 (diff) | |
add suffix _s to object of assembly file
| -rw-r--r-- | examples/rules.mk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/rules.mk b/examples/rules.mk index 9265bb684..6f494f4bd 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -52,7 +52,8 @@ SRC_S := $(SRC_S:.S=.s) # Due to GCC LTO bug https://bugs.launchpad.net/gcc-arm-embedded/+bug/1747966 # assembly file should be placed first in linking order -OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=.o)) +# '_s' suffix is added to object of assembly file +OBJ += $(addprefix $(BUILD)/obj/, $(SRC_S:.s=_s.o)) OBJ += $(addprefix $(BUILD)/obj/, $(SRC_C:.c=.o)) # Verbose mode @@ -111,13 +112,13 @@ $(BUILD)/obj/%.o: %.c # ASM sources lower case .s vpath %.s . $(TOP) -$(BUILD)/obj/%.o: %.s +$(BUILD)/obj/%_s.o: %.s @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< # ASM sources upper case .S vpath %.S . $(TOP) -$(BUILD)/obj/%.o: %.S +$(BUILD)/obj/%_s.o: %.S @echo AS $(notdir $@) @$(CC) -x assembler-with-cpp $(ASFLAGS) -c -o $@ $< |
