Skip to contentSkip to conversation

also allow building .s files from .c ones

PATCH In review Jan Beulich 2 participants 2 messages Jul 9, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 also allow building .s files from .c ones

... along the lines of allowing .i files to be built from .c ones as well as .s from .S (aiding the analysis of occasional build problems).

xen/Makefile +1 -1
@@ -195,7 +195,7 @@ _MAP:
 .PHONY: FORCE
 FORCE:
 
-%.o %.i: %.c FORCE
+%.o %.i %.s: %.c FORCE
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
 
 %.o %.s: %.S FORCE
xen/Rules.mk +3 -0
@@ -177,6 +177,9 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) 
 %.i: %.c Makefile
 	$(CPP) $(CFLAGS) $< -o $@
 
+%.s: %.c Makefile
+	$(CC) $(CFLAGS) -S $< -o $@
+
 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
 %.s: %.S Makefile
 	$(CPP) $(AFLAGS) $< -o $@

also allow building .s files from .c ones

... along the lines of allowing .i files to be built from .c ones as well as .s from .S (aiding the analysis of occasional build problems).

xen/Makefile +1 -1
@@ -195,7 +195,7 @@ _MAP:
 .PHONY: FORCE
 FORCE:
 
-%.o %.i: %.c FORCE
+%.o %.i %.s: %.c FORCE
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
 
 %.o %.s: %.S FORCE
xen/Rules.mk +3 -0
@@ -177,6 +177,9 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y) 
 %.i: %.c Makefile
 	$(CPP) $(CFLAGS) $< -o $@
 
+%.s: %.c Makefile
+	$(CC) $(CFLAGS) -S $< -o $@
+
 # -std=gnu{89,99} gets confused by # as an end-of-line comment marker
 %.s: %.S Makefile
 	$(CPP) $(AFLAGS) $< -o $@

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jan Beulich

... along the lines of allowing .i files to be built from .c ones as well as .s from .S (aiding the analysis of occasional build problems).

Quoted 26 lines
xen/Makefile +1 -1
@@ -195,7 +195,7 @@ _MAP:
 .PHONY: FORCE
 FORCE:
 
-%.o %.i: %.c FORCE
+%.o %.i %.s: %.c FORCE
 $(MAKE) -f $(BASEDIR)/Rules.mk -C $(*D) $(@F)
 
 %.o %.s: %.S FORCE
xen/Rules.mk +0 -0
@@ -177,6 +177,9 @@ $(filter %.init.o,$(obj-y) $(obj-bin-y)
 %.i: %.c Makefile

$(CPP) $(CFLAGS) $< -o $@

+%.s: %.c Makefile
+ $(CC) $(CFLAGS) -S $< -o $@
+
# -std=gnu{89,99} gets confused by # as an end-of-line comment marker %.s: %.S Makefile
$(CPP) $(AFLAGS) $< -o $@