1## Makefile for the Phobos standard library. 2## Copyright (C) 2012-2021 Free Software Foundation, Inc. 3## 4## GCC is free software; you can redistribute it and/or modify 5## it under the terms of the GNU General Public License as published by 6## the Free Software Foundation; either version 3, or (at your option) 7## any later version. 8## 9## GCC is distributed in the hope that it will be useful, 10## but WITHOUT ANY WARRANTY; without even the implied warranty of 11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12## GNU General Public License for more details. 13## 14## You should have received a copy of the GNU General Public License 15## along with GCC; see the file COPYING3. If not see 16## <http://www.gnu.org/licenses/>. 17 18# Include D build rules 19include $(top_srcdir)/d_rules.am 20 21# Make sure GDC can find libdruntime and libphobos include files 22D_EXTRA_DFLAGS=-nostdinc -I $(srcdir) \ 23 -I $(top_srcdir)/libdruntime -I ../libdruntime -I . 24 25# D flags for compilation 26AM_DFLAGS= \ 27 $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \ 28 $(WARN_DFLAGS) $(CHECKING_DFLAGS) $(SECTION_FLAGS) $(CET_DFLAGS) 29 30# Flags for other kinds of sources 31AM_CFLAGS=$(CET_FLAGS) 32 33# Install all D files 34ALL_PHOBOS_INSTALL_DSOURCES = $(PHOBOS_DSOURCES) 35 36# Setup source files depending on configure 37ALL_PHOBOS_COMPILE_DSOURCES = $(PHOBOS_DSOURCES) 38 39ALL_PHOBOS_SOURCES = $(ALL_PHOBOS_COMPILE_DSOURCES) 40 41# Main library build definitions 42toolexeclib_DATA = libgphobos.spec 43toolexeclib_LTLIBRARIES = libgphobos.la 44libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) 45libgphobos_la_LIBTOOLFLAGS = 46libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ 47 -version-info $(libtool_VERSION) 48libgphobos_la_LIBADD = \ 49 ../libdruntime/libgdruntime_convenience.la $(LIBZ) 50libgphobos_la_DEPENDENCIES = \ 51 ../libdruntime/libgdruntime_convenience.la libgphobos.spec 52 53# Also override library link commands: This is not strictly 54# required, but we want to record additional dependencies such 55# as pthread in the library 56libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \ 57 $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \ 58 $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@ 59 60# Handles generated files as well 61install-data-local: 62 for file in $(ALL_PHOBOS_INSTALL_DSOURCES); do \ 63 $(MKDIR_P) `dirname $(DESTDIR)$(gdc_include_dir)/$$file` ; \ 64 if test -f $$file; then \ 65 $(INSTALL_HEADER) $$file $(DESTDIR)$(gdc_include_dir)/$$file ; \ 66 else \ 67 $(INSTALL_HEADER) $(srcdir)/$$file \ 68 $(DESTDIR)$(gdc_include_dir)/$$file ; \ 69 fi ; \ 70 done 71 72# Source file definitions. Boring stuff, auto-generated with 73# https://gist.github.com/jpf91/8744acebc9dcf1e9d1a35cdff20afbb2 74# Can't use wildcards here: 75# https://www.gnu.org/software/automake/manual/html_node/Wildcards.html 76if ENABLE_LIBDRUNTIME_ONLY 77 78PHOBOS_DSOURCES = 79 80else 81 82PHOBOS_DSOURCES = etc/c/curl.d etc/c/sqlite3.d etc/c/zlib.d \ 83 std/algorithm/comparison.d std/algorithm/internal.d \ 84 std/algorithm/iteration.d std/algorithm/mutation.d \ 85 std/algorithm/package.d std/algorithm/searching.d \ 86 std/algorithm/setops.d std/algorithm/sorting.d std/array.d std/ascii.d \ 87 std/base64.d std/bigint.d std/bitmanip.d std/compiler.d std/complex.d \ 88 std/concurrency.d std/container/array.d std/container/binaryheap.d \ 89 std/container/dlist.d std/container/package.d std/container/rbtree.d \ 90 std/container/slist.d std/container/util.d std/conv.d std/csv.d \ 91 std/datetime/date.d std/datetime/interval.d std/datetime/package.d \ 92 std/datetime/stopwatch.d std/datetime/systime.d \ 93 std/datetime/timezone.d std/demangle.d std/digest/crc.d \ 94 std/digest/digest.d std/digest/hmac.d std/digest/md.d \ 95 std/digest/murmurhash.d std/digest/package.d std/digest/ripemd.d \ 96 std/digest/sha.d std/encoding.d std/exception.d \ 97 std/experimental/allocator/building_blocks/affix_allocator.d \ 98 std/experimental/allocator/building_blocks/allocator_list.d \ 99 std/experimental/allocator/building_blocks/bitmapped_block.d \ 100 std/experimental/allocator/building_blocks/bucketizer.d \ 101 std/experimental/allocator/building_blocks/fallback_allocator.d \ 102 std/experimental/allocator/building_blocks/free_list.d \ 103 std/experimental/allocator/building_blocks/free_tree.d \ 104 std/experimental/allocator/building_blocks/kernighan_ritchie.d \ 105 std/experimental/allocator/building_blocks/null_allocator.d \ 106 std/experimental/allocator/building_blocks/package.d \ 107 std/experimental/allocator/building_blocks/quantizer.d \ 108 std/experimental/allocator/building_blocks/region.d \ 109 std/experimental/allocator/building_blocks/scoped_allocator.d \ 110 std/experimental/allocator/building_blocks/segregator.d \ 111 std/experimental/allocator/building_blocks/stats_collector.d \ 112 std/experimental/allocator/common.d \ 113 std/experimental/allocator/gc_allocator.d \ 114 std/experimental/allocator/mallocator.d \ 115 std/experimental/allocator/mmap_allocator.d \ 116 std/experimental/allocator/package.d \ 117 std/experimental/allocator/showcase.d \ 118 std/experimental/allocator/typed.d std/experimental/checkedint.d \ 119 std/experimental/logger/core.d std/experimental/logger/filelogger.d \ 120 std/experimental/logger/multilogger.d \ 121 std/experimental/logger/nulllogger.d std/experimental/logger/package.d \ 122 std/experimental/typecons.d std/file.d std/format.d std/functional.d \ 123 std/getopt.d std/internal/cstring.d std/internal/math/biguintcore.d \ 124 std/internal/math/biguintnoasm.d std/internal/math/errorfunction.d \ 125 std/internal/math/gammafunction.d std/internal/scopebuffer.d \ 126 std/internal/test/dummyrange.d std/internal/test/range.d \ 127 std/internal/test/uda.d std/internal/unicode_comp.d \ 128 std/internal/unicode_decomp.d std/internal/unicode_grapheme.d \ 129 std/internal/unicode_norm.d std/internal/unicode_tables.d \ 130 std/internal/windows/advapi32.d std/json.d std/math.d \ 131 std/mathspecial.d std/meta.d std/mmfile.d std/net/curl.d \ 132 std/net/isemail.d std/numeric.d std/outbuffer.d std/parallelism.d \ 133 std/path.d std/process.d std/random.d std/range/interfaces.d \ 134 std/range/package.d std/range/primitives.d \ 135 std/regex/internal/backtracking.d std/regex/internal/generator.d \ 136 std/regex/internal/ir.d std/regex/internal/kickstart.d \ 137 std/regex/internal/parser.d std/regex/internal/tests.d \ 138 std/regex/internal/tests2.d std/regex/internal/thompson.d \ 139 std/regex/package.d std/signals.d std/socket.d std/stdint.d \ 140 std/stdio.d std/string.d std/system.d std/traits.d std/typecons.d \ 141 std/typetuple.d std/uni.d std/uri.d std/utf.d std/uuid.d std/variant.d \ 142 std/windows/charset.d std/windows/registry.d std/windows/syserror.d \ 143 std/xml.d std/zip.d std/zlib.d 144 145endif 146