]>
Commit | Line | Data |
---|---|---|
b4c522fa | 1 | ## Makefile for the Phobos standard library. |
83ffe9cd | 2 | ## Copyright (C) 2012-2023 Free Software Foundation, Inc. |
b4c522fa IB |
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 | |
19 | include $(top_srcdir)/d_rules.am | |
20 | ||
21 | # Make sure GDC can find libdruntime and libphobos include files | |
0fb57034 IB |
22 | D_EXTRA_DFLAGS=-fpreview=dip1000 -fpreview=dtorfields -fpreview=fieldwise \ |
23 | -nostdinc -I $(srcdir) -I $(top_srcdir)/libdruntime \ | |
24 | -I ../libdruntime -I . | |
b4c522fa | 25 | |
b4c522fa | 26 | # D flags for compilation |
38c3017f | 27 | AM_DFLAGS= \ |
fdfcb535 | 28 | $(phobos_lt_pic_flag) $(phobos_compiler_shared_flag) \ |
d118ec22 | 29 | $(WARN_DFLAGS) $(CHECKING_DFLAGS) $(SECTION_FLAGS) $(CET_DFLAGS) |
0ed75760 IB |
30 | |
31 | # Flags for other kinds of sources | |
32 | AM_CFLAGS=$(CET_FLAGS) | |
b4c522fa IB |
33 | |
34 | # Install all D files | |
35 | ALL_PHOBOS_INSTALL_DSOURCES = $(PHOBOS_DSOURCES) | |
36 | ||
37 | # Setup source files depending on configure | |
38 | ALL_PHOBOS_COMPILE_DSOURCES = $(PHOBOS_DSOURCES) | |
39 | ||
40 | ALL_PHOBOS_SOURCES = $(ALL_PHOBOS_COMPILE_DSOURCES) | |
b4c522fa IB |
41 | |
42 | # Main library build definitions | |
b4c522fa IB |
43 | toolexeclib_DATA = libgphobos.spec |
44 | toolexeclib_LTLIBRARIES = libgphobos.la | |
bb50312e | 45 | libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES) |
b4c522fa | 46 | libgphobos_la_LIBTOOLFLAGS = |
0b6e3127 RO |
47 | libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \ |
48 | -version-info $(libtool_VERSION) | |
53cfed5c IB |
49 | if ENABLE_LIBDRUNTIME_ONLY |
50 | libgphobos_la_LIBADD = ../libdruntime/libgdruntime_convenience.la | |
51 | else | |
7478addd IB |
52 | libgphobos_la_LIBADD = \ |
53 | ../libdruntime/libgdruntime_convenience.la $(LIBZ) | |
53cfed5c | 54 | endif |
7478addd IB |
55 | libgphobos_la_DEPENDENCIES = \ |
56 | ../libdruntime/libgdruntime_convenience.la libgphobos.spec | |
57 | ||
58 | # Also override library link commands: This is not strictly | |
59 | # required, but we want to record additional dependencies such | |
60 | # as pthread in the library | |
61 | libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \ | |
62 | $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \ | |
63 | $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@ | |
b4c522fa | 64 | |
b4c522fa IB |
65 | # Handles generated files as well |
66 | install-data-local: | |
67 | for file in $(ALL_PHOBOS_INSTALL_DSOURCES); do \ | |
4f19d0e7 | 68 | $(MKDIR_P) `dirname $(DESTDIR)$(gdc_include_dir)/$$file` ; \ |
b4c522fa | 69 | if test -f $$file; then \ |
4f19d0e7 | 70 | $(INSTALL_HEADER) $$file $(DESTDIR)$(gdc_include_dir)/$$file ; \ |
b4c522fa | 71 | else \ |
4f19d0e7 | 72 | $(INSTALL_HEADER) $(srcdir)/$$file \ |
b4c522fa IB |
73 | $(DESTDIR)$(gdc_include_dir)/$$file ; \ |
74 | fi ; \ | |
75 | done | |
76 | ||
b4c522fa IB |
77 | # Source file definitions. Boring stuff, auto-generated with |
78 | # https://gist.github.com/jpf91/8744acebc9dcf1e9d1a35cdff20afbb2 | |
79 | # Can't use wildcards here: | |
80 | # https://www.gnu.org/software/automake/manual/html_node/Wildcards.html | |
261bd78d IB |
81 | if ENABLE_LIBDRUNTIME_ONLY |
82 | ||
83 | PHOBOS_DSOURCES = | |
84 | ||
85 | else | |
86 | ||
5fee5ec3 IB |
87 | PHOBOS_DSOURCES = etc/c/curl.d etc/c/zlib.d std/algorithm/comparison.d \ |
88 | std/algorithm/internal.d std/algorithm/iteration.d \ | |
89 | std/algorithm/mutation.d std/algorithm/package.d \ | |
90 | std/algorithm/searching.d std/algorithm/setops.d \ | |
91 | std/algorithm/sorting.d std/array.d std/ascii.d std/base64.d \ | |
d7569187 IB |
92 | std/bigint.d std/bitmanip.d std/checkedint.d std/compiler.d \ |
93 | std/complex.d std/concurrency.d std/container/array.d \ | |
94 | std/container/binaryheap.d std/container/dlist.d \ | |
95 | std/container/package.d std/container/rbtree.d std/container/slist.d \ | |
96 | std/container/util.d std/conv.d std/csv.d std/datetime/date.d \ | |
97 | std/datetime/interval.d std/datetime/package.d \ | |
b4c522fa IB |
98 | std/datetime/stopwatch.d std/datetime/systime.d \ |
99 | std/datetime/timezone.d std/demangle.d std/digest/crc.d \ | |
c8dfa79c IB |
100 | std/digest/hmac.d std/digest/md.d std/digest/murmurhash.d \ |
101 | std/digest/package.d std/digest/ripemd.d std/digest/sha.d \ | |
102 | std/encoding.d std/exception.d \ | |
b4c522fa | 103 | std/experimental/allocator/building_blocks/affix_allocator.d \ |
5fee5ec3 | 104 | std/experimental/allocator/building_blocks/aligned_block_list.d \ |
b4c522fa | 105 | std/experimental/allocator/building_blocks/allocator_list.d \ |
5fee5ec3 | 106 | std/experimental/allocator/building_blocks/ascending_page_allocator.d \ |
b4c522fa IB |
107 | std/experimental/allocator/building_blocks/bitmapped_block.d \ |
108 | std/experimental/allocator/building_blocks/bucketizer.d \ | |
109 | std/experimental/allocator/building_blocks/fallback_allocator.d \ | |
110 | std/experimental/allocator/building_blocks/free_list.d \ | |
111 | std/experimental/allocator/building_blocks/free_tree.d \ | |
112 | std/experimental/allocator/building_blocks/kernighan_ritchie.d \ | |
113 | std/experimental/allocator/building_blocks/null_allocator.d \ | |
114 | std/experimental/allocator/building_blocks/package.d \ | |
115 | std/experimental/allocator/building_blocks/quantizer.d \ | |
116 | std/experimental/allocator/building_blocks/region.d \ | |
117 | std/experimental/allocator/building_blocks/scoped_allocator.d \ | |
118 | std/experimental/allocator/building_blocks/segregator.d \ | |
119 | std/experimental/allocator/building_blocks/stats_collector.d \ | |
120 | std/experimental/allocator/common.d \ | |
121 | std/experimental/allocator/gc_allocator.d \ | |
122 | std/experimental/allocator/mallocator.d \ | |
123 | std/experimental/allocator/mmap_allocator.d \ | |
124 | std/experimental/allocator/package.d \ | |
125 | std/experimental/allocator/showcase.d \ | |
126 | std/experimental/allocator/typed.d std/experimental/checkedint.d \ | |
127 | std/experimental/logger/core.d std/experimental/logger/filelogger.d \ | |
128 | std/experimental/logger/multilogger.d \ | |
129 | std/experimental/logger/nulllogger.d std/experimental/logger/package.d \ | |
b7a586be IB |
130 | std/file.d std/format/internal/floats.d std/format/internal/read.d \ |
131 | std/format/internal/write.d std/format/package.d std/format/read.d \ | |
132 | std/format/spec.d std/format/write.d std/functional.d std/getopt.d \ | |
133 | std/int128.d std/internal/attributes.d std/internal/cstring.d \ | |
5fee5ec3 IB |
134 | std/internal/math/biguintcore.d std/internal/math/biguintnoasm.d \ |
135 | std/internal/math/errorfunction.d std/internal/math/gammafunction.d \ | |
136 | std/internal/memory.d std/internal/scopebuffer.d \ | |
b4c522fa IB |
137 | std/internal/test/dummyrange.d std/internal/test/range.d \ |
138 | std/internal/test/uda.d std/internal/unicode_comp.d \ | |
139 | std/internal/unicode_decomp.d std/internal/unicode_grapheme.d \ | |
140 | std/internal/unicode_norm.d std/internal/unicode_tables.d \ | |
b7a586be IB |
141 | std/internal/windows/advapi32.d std/json.d std/logger/core.d \ |
142 | std/logger/filelogger.d std/logger/multilogger.d \ | |
143 | std/logger/nulllogger.d std/logger/package.d std/math/algebraic.d \ | |
5fee5ec3 IB |
144 | std/math/constants.d std/math/exponential.d std/math/hardware.d \ |
145 | std/math/operations.d std/math/package.d std/math/remainder.d \ | |
146 | std/math/rounding.d std/math/traits.d std/math/trigonometry.d \ | |
b4c522fa | 147 | std/mathspecial.d std/meta.d std/mmfile.d std/net/curl.d \ |
5fee5ec3 IB |
148 | std/net/isemail.d std/numeric.d std/outbuffer.d std/package.d \ |
149 | std/parallelism.d std/path.d std/process.d std/random.d \ | |
150 | std/range/interfaces.d std/range/package.d std/range/primitives.d \ | |
b4c522fa IB |
151 | std/regex/internal/backtracking.d std/regex/internal/generator.d \ |
152 | std/regex/internal/ir.d std/regex/internal/kickstart.d \ | |
153 | std/regex/internal/parser.d std/regex/internal/tests.d \ | |
5a0aa603 IB |
154 | std/regex/internal/tests2.d std/regex/internal/thompson.d \ |
155 | std/regex/package.d std/signals.d std/socket.d std/stdint.d \ | |
5fee5ec3 IB |
156 | std/stdio.d std/string.d std/sumtype.d std/system.d std/traits.d \ |
157 | std/typecons.d std/typetuple.d std/uni/package.d std/uri.d std/utf.d \ | |
158 | std/uuid.d std/variant.d std/windows/charset.d std/windows/registry.d \ | |
c8dfa79c | 159 | std/windows/syserror.d std/zip.d std/zlib.d |
261bd78d IB |
160 | |
161 | endif |