2016-08-15 04:44:16 +02:00
|
|
|
AUTOMAKE_OPTIONS = foreign
|
|
|
|
|
2018-09-18 02:09:16 +02:00
|
|
|
AM_CPPFLAGS = \
|
|
|
|
-I$(top_srcdir)/include \
|
2020-07-30 15:23:31 +02:00
|
|
|
$(EXTRA_CPPFLAGS) \
|
2017-09-08 11:43:23 +02:00
|
|
|
###
|
2016-08-15 04:44:16 +02:00
|
|
|
|
2017-09-12 18:54:10 +02:00
|
|
|
AM_CXXFLAGS = \
|
2019-09-25 18:42:22 +02:00
|
|
|
-x c++-header \
|
2020-07-30 15:23:31 +02:00
|
|
|
$(EXTRA_CXXFLAGS) \
|
2017-09-12 18:54:10 +02:00
|
|
|
###
|
|
|
|
|
2016-08-15 04:44:16 +02:00
|
|
|
if GCC
|
2020-09-15 02:11:07 +02:00
|
|
|
AM_CXXFLAGS += -fpch-deps
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CLANG
|
|
|
|
AM_CPPFLAGS += -fpch-preprocess
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CLANG10
|
|
|
|
AM_CXXFLAGS += -fpch-validate-input-files-content
|
|
|
|
endif
|
|
|
|
|
|
|
|
if CLANG11
|
|
|
|
AM_CXXFLAGS += -fpch-instantiate-templates
|
2017-09-12 18:54:10 +02:00
|
|
|
endif
|
|
|
|
|
2019-04-21 01:37:02 +02:00
|
|
|
if GCC
|
|
|
|
if LOWMEM_COMPILE
|
|
|
|
LOWMEM_FLAGS= --param ggc-min-expand=1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2019-07-13 01:28:09 +02:00
|
|
|
# includedir = @includedir@/$(PACKAGE_TARNAME)
|
|
|
|
includedir = @includedir@/ircd
|
2019-05-06 22:17:34 +02:00
|
|
|
nobase_include_HEADERS = $(DEPS)
|
|
|
|
|
2020-06-21 06:00:42 +02:00
|
|
|
if BUILD_PCH # --- Actions when Precompiled headers enabled
|
|
|
|
|
|
|
|
noinst_HEADERS = *.gch
|
|
|
|
BUILT_SOURCES = \
|
|
|
|
ircd.h.gch \
|
|
|
|
ircd.pic.h.gch \
|
|
|
|
spirit.h.gch \
|
|
|
|
asio.h.gch \
|
|
|
|
matrix.h.gch \
|
|
|
|
matrix.pic.h.gch \
|
|
|
|
###
|
2019-09-28 23:17:54 +02:00
|
|
|
|
|
|
|
ircd.h.gch: ircd.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -o ircd.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) ircd.h
|
2016-08-15 04:44:16 +02:00
|
|
|
|
2019-09-28 23:17:54 +02:00
|
|
|
ircd.pic.h.gch: ircd.h
|
2018-06-16 00:13:18 +02:00
|
|
|
cp ircd.h ircd.pic.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -fPIC -o ircd.pic.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) -DPIC ircd.pic.h
|
2016-08-15 04:44:16 +02:00
|
|
|
|
2020-06-27 23:24:50 +02:00
|
|
|
matrix.h.gch: ircd.h matrix.h m/*.h m/*/*.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -o matrix.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) matrix.h
|
2019-09-28 23:17:54 +02:00
|
|
|
|
2020-06-27 23:24:50 +02:00
|
|
|
matrix.pic.h.gch: ircd.h matrix.h m/*.h m/*/*.h
|
2019-09-28 23:17:54 +02:00
|
|
|
cp matrix.h matrix.pic.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -fPIC -o matrix.pic.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) -DPIC matrix.pic.h
|
2019-09-28 23:17:54 +02:00
|
|
|
|
2022-05-11 21:31:59 +02:00
|
|
|
spirit.h.gch: ircd.h spirit.h spirit/*.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -fPIC -o spirit.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) -DPIC spirit.h
|
2019-09-28 23:17:54 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
2022-05-11 21:31:59 +02:00
|
|
|
asio.h.gch: ircd.h asio.h net/asio.h ctx/continuation.h
|
2020-07-12 01:15:18 +02:00
|
|
|
$(CXX) $(AM_CXXFLAGS) $(CXXFLAGS) -fPIC -o asio.h.gch $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) -DPIC asio.h
|
2019-09-26 05:30:26 +02:00
|
|
|
|
|
|
|
asio.h.gch: \
|
|
|
|
AM_CPPFLAGS += @BOOST_CPPFLAGS@ @SSL_CPPFLAGS@ @CRYPTO_CPPFLAGS@
|
|
|
|
|
2020-06-21 06:00:42 +02:00
|
|
|
else # --- Actions without Precompiled Headers enabled
|
|
|
|
|
|
|
|
BUILT_SOURCES = \
|
|
|
|
ircd.pic.h \
|
|
|
|
matrix.pic.h \
|
|
|
|
###
|
|
|
|
|
|
|
|
ircd.pic.h: ircd.h
|
|
|
|
cp ircd.h ircd.pic.h
|
|
|
|
|
|
|
|
matrix.pic.h: matrix.h
|
|
|
|
cp matrix.h matrix.pic.h
|
|
|
|
|
|
|
|
endif # --- /BUILD_PCH
|
|
|
|
|
|
|
|
#
|
|
|
|
# Clean / Install
|
|
|
|
#
|
|
|
|
|
2016-08-15 04:44:16 +02:00
|
|
|
clean-local:
|
2019-10-12 23:45:57 +02:00
|
|
|
rm -f *.h.gch
|
|
|
|
rm -f *.gch.tmp
|
2018-06-16 00:13:18 +02:00
|
|
|
rm -f ircd.pic.h
|
2019-09-28 23:17:54 +02:00
|
|
|
rm -f matrix.pic.h
|
2019-07-13 01:28:09 +02:00
|
|
|
|
2019-09-28 23:17:54 +02:00
|
|
|
install-mkdirs: $(DEPS) $(BUILT_SOURCES)
|
2019-07-13 01:28:09 +02:00
|
|
|
-@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)"; \
|
2022-05-31 23:07:25 +02:00
|
|
|
cp -u -r $$i $(DESTDIR)$(includedir); \
|
2019-07-13 01:28:09 +02:00
|
|
|
fi \
|
|
|
|
done
|