makefile: Show CC flags at the start of compilation
authorMarko Kreen <markokr@gmail.com>
Tue, 28 Sep 2010 19:07:21 +0000 (12:07 -0700)
committerMarko Kreen <markokr@gmail.com>
Tue, 28 Sep 2010 19:07:21 +0000 (12:07 -0700)
Makefile

index 92aa984b1df3170fd56ca44a94f306cf36f61212..d48dbd08ca0c83658a06823b8f4ad8b5d98105ec 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -43,7 +43,7 @@ endif
 
 # rules follow
 
-all: libusual.a obj/testcompile
+all: info libusual.a obj/testcompile
 
 libusual.a: $(objs)
        $(E) "  AR" $@
@@ -110,14 +110,22 @@ sparse: config.mak
 asms = $(objs:.o=.s)
 asm: $(asms)
 
-dbg:
+dbg: flags
        @echo srcs=$(srcs)
        @echo objs=$(objs)
        @echo hdrs=$(hdrs)
+
+flags:
        @echo DEFS=$(DEFS)
        @echo CFLAGS=$(CFLAGS)
        @echo CPPFLAGS=$(CPPFLAGS)
 
+info:
+       @echo CC: $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS)
+       @echo LD: $(LD) $(USUAL_LDFLAGS) $(USUAL_LIBS) $(LIBS)
+
+.PHONY: flags dbg info
+
 # requires 8.4+
 kws:
        @test -f "$(KWLIST)" || { echo "kwlist.h not found"; exit 1; }