Debian Codegraph @

libphobos/src/Makefile.am

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