From 73bfa3dd29d63e02e0afdf3d2b525dfda3c60bb7 Mon Sep 17 00:00:00 2001 From: sg- Date: Sat, 20 Jun 2015 13:43:14 -0500 Subject: [PATCH] modify gcc_makefile template to use c preprocessor on assembly files --- workspace_tools/export/gcc_arm_common.tmpl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workspace_tools/export/gcc_arm_common.tmpl b/workspace_tools/export/gcc_arm_common.tmpl index 9e337a87a9..7b3459b265 100644 --- a/workspace_tools/export/gcc_arm_common.tmpl +++ b/workspace_tools/export/gcc_arm_common.tmpl @@ -65,8 +65,12 @@ clean: rm -f $(PROJECT).bin $(PROJECT).elf $(PROJECT).hex $(PROJECT).map $(PROJECT).lst $(OBJECTS) $(DEPS) {% endblock %} +.asm.o: + $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< .s.o: - $(AS) $(CPU) -o $@ $< + $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< +.S.o: + $(CC) $(CPU) -c -x assembler-with-cpp -o $@ $< .c.o: $(CC) $(CC_FLAGS) $(CC_SYMBOLS) -std=gnu99 $(INCLUDE_PATHS) -o $@ $<