0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 14:08:56 +02:00
construct/include/ircd/Makefile.am
Jason Volk 61b517ca3c Precompile and remove most include directives. Notes:
* To benefit from the precompiled-header (PCH) it MUST provide "the first C token."

Advantages:
Never worry about the include stack again. Remember, this means one less thing
for random module developers, community people learning C++, and new developers
to deal with. It should reduce the learning curve and barrier for participation.

Disadvantages:
Makes overall compilation a bit slower, especially without any additional
work to improve it again. There are several opportunities, places where the
PCH is probably being ignored, etc that can be addressed.
2016-08-20 19:30:33 -07:00

27 lines
543 B
Makefile

AUTOMAKE_OPTIONS = foreign
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
@BOOST_CPPFLAGS@
if GCC
AM_CXXFLAGS = -fpch-deps
endif
if BUILD_PCH
BUILT_SOURCES = stdinc.h.gch stdinc.pic.h.gch
endif
stdinc.h.gch:
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -o stdinc.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) stdinc.h
stdinc.pic.h.gch:
cp stdinc.h stdinc.pic.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o stdinc.pic.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) stdinc.pic.h
clean-local:
rm -f stdinc.h.gch
rm -f stdinc.pic.h
rm -f stdinc.pic.h.gch