# -*- mode: makefile -*- # # Makefile containing precompiled header rules # Get the list of all included ROOT headers and how often they are # included by running : # cat */src/*.d|egrep '.o: '|sed 's,^[^:]*: ,,'|tr ' ' '\n'|sort \ # |awk '{if(o!=$1){if(n)printf "%8d %s\n",n,o;o=$1;n=0;};n++}' \ # |sort -n -r | head ifeq ($(INCLUDEPCHRULES),) PCHHEADERS = TObject.h PCHEXTRASRC = core/base/src/precompile.cxx PCHEXTRAOBJ = $(PCHEXTRASRC:.cxx=.o) PCHEXTRADEP = $(PCHEXTRASRC:.cxx=.d) PCHEXTRAHDRI = config/precompile.h.in PCHEXTRAHDR = include/precompile.h PCHDEP = $(PCHFILE) ALLHDRS += $(PCHEXTRAHDR) INCLUDEFILES += $(PCHEXTRADEP) else $(PCHEXTRAHDR): PCHINCSTATEM = // see config/Makefile.precomp$(addprefix @\1",$(addsuffix "\2,$(PCHHEADERS))) $(PCHEXTRAHDR): $(PCHEXTRAHDRI) cat $< | \ sed 's,\(#[ ]*include \)@PRECOMPILE@\(.*\)$$,$(PCHINCSTATEM),' | \ tr '@' '\n' > $@ $(PCHEXTRAOBJ) $(PCHFILE): $(PCHEXTRAHDR) $(W32PRAGMA) $(RMKDEP) @echo Building precompiled header... $(MAKEDEP) -R -f$(PCHEXTRADEP).tmp -Y -w 1000 -- $(CXXFLAGS) -DUSEPCH -D__cplusplus -- $< sed -e 's,include/precompile.o,$(PCHFILE),' \ -e 's,include/precompile.d,$(PCHEXTRADEP),' $(PCHEXTRADEP).tmp > $(PCHEXTRADEP) rm -f $(PCHEXTRADEP).tmp rm -f $(PCHFILE) $(PCHEXTRAOBJBUILD) endif