0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 00:44:17 +01:00
construct/include/ircd/Makefile.am

96 lines
2.1 KiB
Text
Raw Normal View History

AUTOMAKE_OPTIONS = foreign
AM_CPPFLAGS = \
-I$(top_srcdir)/include \
@EXTRA_CPPFLAGS@ \
2017-09-08 11:43:23 +02:00
###
AM_CXXFLAGS = \
-x c++-header \
@EXTRA_CXXFLAGS@ \
###
if GCC
2017-11-30 20:44:23 +01:00
AM_CXXFLAGS += \
-fpch-deps \
###
endif
if DEBUG
if GCC
2017-11-30 20:44:23 +01:00
AM_CXXFLAGS += \
-fmax-errors=2 \
###
endif
endif
if BUILD_PCH
2017-11-30 20:44:23 +01:00
BUILT_SOURCES = \
ircd.h.gch \
ircd.pic.h.gch \
2019-04-21 00:41:11 +02:00
spirit.h.gch \
2019-09-26 05:30:26 +02:00
asio.h.gch \
matrix.h.gch \
matrix.pic.h.gch \
2017-11-30 20:44:23 +01:00
###
endif
if GCC
if LOWMEM_COMPILE
LOWMEM_FLAGS= --param ggc-min-expand=1
endif
endif
# includedir = @includedir@/$(PACKAGE_TARNAME)
includedir = @includedir@/ircd
nobase_include_HEADERS = $(DEPS)
noinst_HEADERS = *.gch
ircd.h.gch: ircd.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -o ircd.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) ircd.h
ircd.pic.h.gch: ircd.h
cp ircd.h ircd.pic.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o ircd.pic.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) -DPIC ircd.pic.h
2019-09-30 00:05:57 +02:00
matrix.h.gch: matrix.h m/*.h m/*/*.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -o matrix.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) matrix.h
2019-09-30 00:05:57 +02:00
matrix.pic.h.gch: matrix.h m/*.h m/*/*.h
cp matrix.h matrix.pic.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o matrix.pic.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) -DPIC matrix.pic.h
spirit.h.gch: ircd.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o spirit.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) -DPIC spirit.h
spirit.h.gch: \
2020-03-10 18:16:42 +01:00
AM_CXXFLAGS += @BOOST_CPPFLAGS@ $(LOWMEM_FLAGS)
2019-04-21 00:41:11 +02:00
asio.h.gch: ircd.h
$(CXX) $(CXXFLAGS) $(AM_CXXFLAGS) -fPIC -o asio.h.gch $(DEFS) $(CPPFLAGS) $(AM_CPPFLAGS) -DPIC asio.h
2019-09-26 05:30:26 +02:00
asio.h.gch: \
AM_CPPFLAGS += @BOOST_CPPFLAGS@ @SSL_CPPFLAGS@ @CRYPTO_CPPFLAGS@
clean-local:
rm -f *.h.gch
rm -f *.gch.tmp
rm -f ircd.pic.h
rm -f matrix.pic.h
install-mkdirs: $(DEPS) $(BUILT_SOURCES)
-@if test ! -d $(DESTDIR)$(includedir); then \
echo "mkdir -p $(DESTDIR)$(includedir)"; \
mkdir -p $(DESTDIR)$(includedir); \
fi
install: install-mkdirs
@echo "ircd: installing headers"
@for i in $(srcdir)/*; do \
if [[ "$$i" != "./Makefile"* ]] && [[ "$$i" != *.h.gch ]]; then \
echo "installing $$i to $(DESTDIR)$(includedir)"; \
cp -r $$i $(DESTDIR)$(includedir); \
fi \
done