0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

Activate PCH for position independent code.

Cuts compilation time by 30%+
This commit is contained in:
Jason Volk 2016-07-24 23:50:26 -07:00
parent 1eb7d4f319
commit 4796bec441
5 changed files with 20 additions and 1 deletions

View file

@ -5,6 +5,10 @@ AM_CPPFLAGS = \
$(LTDLINCL) \
@BOOST_CPPFLAGS@
if BUILD_PCH
AM_CPPFLAGS += -include $(top_srcdir)/include/rb/rb.pic.h
endif
AM_LDFLAGS = \
-L$(top_srcdir)/ircd \
-L$(top_srcdir)/rb \

View file

@ -1 +1,2 @@
config.h*
rb.pic.h

View file

@ -7,14 +7,20 @@ AM_CXXFLAGS = -fpch-deps
endif
if BUILD_PCH
BUILT_SOURCES = rb.h.gch
BUILT_SOURCES = rb.h.gch rb.pic.h.gch
endif
rb.h.gch:
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -o rb.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) rb.h
rb.pic.h.gch:
cp rb.h rb.pic.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o rb.pic.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) rb.pic.h
clean-local:
rm -f rb.h.gch
rm -f rb.pic.h
rm -f rb.pic.h.gch
mrproper-local:
rm -f config.h

View file

@ -11,6 +11,10 @@ AM_CPPFLAGS = \
@LTDLINCL@ \
@BOOST_CPPFLAGS@
if BUILD_PCH
AM_CPPFLAGS += -include $(top_srcdir)/include/rb/rb.pic.h
endif
if MINGW
PLATFORM_LDFLAGS = -Wl,--enable-runtime-pseudo-reloc -export-symbols-regex '*'
endif

View file

@ -6,6 +6,10 @@ AM_CPPFLAGS = \
$(LTDLINCL) \
@BOOST_CPPFLAGS@
if BUILD_PCH
AM_CPPFLAGS += -include $(top_srcdir)/include/rb/rb.pic.h
endif
AM_LDFLAGS = \
-L$(top_srcdir)/ircd \
-L$(top_srcdir)/rb \