path: root/Makefile
diff options
authorLinus Torvalds <>2007-05-30 17:42:41 (GMT)
committerJunio C Hamano <>2007-06-10 22:15:17 (GMT)
commite36cb1c16dfd10622fb9da1dffb478240b7e7713 (patch)
tree820ec35baef8a3bb9f91ca6d334484fbb2e728e0 /Makefile
parent301ac38b12126133445d544f7cc5d65768b9310f (diff)
Makefile: add an explicit rule for building assembly output
In the kernel we have a rule for *.c -> *.s files exactly because it's nice to be able to easily say "ok, what does that generate". Here's a patch to add such a rule to git too, in case anybody is interested. It makes it much simpler to just do make sha1_file.s and look at the compiler-generated output that way, rather than having to fire up gdb on the resulting binary. (Add -fverbose-asm or something if you want to, it can make the result even more readable) [jc: add *.s to .gitignore] Signed-off-by: Linus Torvalds <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Makefile')
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0f75955..30a4052 100644
--- a/Makefile
+++ b/Makefile
@@ -845,6 +845,8 @@ git$X git.spec \
%.o: %.c GIT-CFLAGS
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+%.s: %.c GIT-CFLAGS
+ $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
%.o: %.S
$(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<