Misc #136: Add CPPFLAGS support

Thanks to smlx for reporting.
This commit is contained in:
Richard Grenville 2013-08-21 22:18:39 +08:00
parent 6037eb2691
commit 806f09dc3b
1 changed files with 3 additions and 3 deletions

View File

@ -103,13 +103,13 @@ MANPAGES_HTML = $(addsuffix .html,$(MANPAGES))
.DEFAULT_GOAL := compton
src/.clang_complete: Makefile
@(for i in $(filter-out -O% -DNDEBUG, $(CFG) $(CFLAGS) $(INCS)); do echo "$$i"; done) > $@
@(for i in $(filter-out -O% -DNDEBUG, $(CFG) $(CPPFLAGS) $(CFLAGS) $(INCS)); do echo "$$i"; done) > $@
%.o: src/%.c src/%.h src/common.h
$(CC) $(CFG) $(CFLAGS) $(INCS) -c src/$*.c
$(CC) $(CFG) $(CPPFLAGS) $(CFLAGS) $(INCS) -c src/$*.c
compton: $(OBJS)
$(CC) $(CFG) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
$(CC) $(CFG) $(CPPFLAGS) $(LDFLAGS) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
man/%.1: man/%.1.asciidoc
a2x --format manpage $<