1# -*- makefile -*-
2#
3# This file is autogenerated from Modules/Setup.stdlib.in.
4#
5
6# The file is not used by default yet. For testing do:
7#
8#     ln -sfr Modules/Setup.stdlib Modules/Setup.local
9#
10
11# * @MODULE_{NAME}_TRUE@ is removed when configure detects all build
12#   dependencies for a module. Otherwise the template variable is replaced
13#   by a comment "#" and the module is skipped.
14# * Module lines without any compiler and linker flags automatically use
15#   $(MODULE_{NAME}_CFLAGS) and $(MODULE_{NAME}_LDFLAGS). These flags are
16#   generated by PY_STDLIB_MOD macro.
17# * All source files automatically depend on $(PYTHON_HEADERS) and
18#   $(MODULE_{NAME}_DEPS).
19#
20# See Modules/Setup and Modules/makesetup
21#
22
23
24# Build modules statically or as shared extensions
25# *shared* / *static*
26*@MODULE_BUILDTYPE@*
27
28
29############################################################################
30# Modules that should always be present (POSIX and Windows):
31@MODULE_ARRAY_TRUE@array arraymodule.c
32@MODULE__ASYNCIO_TRUE@_asyncio _asynciomodule.c
33@MODULE__BISECT_TRUE@_bisect _bisectmodule.c
34@MODULE__CONTEXTVARS_TRUE@_contextvars _contextvarsmodule.c
35@MODULE__CSV_TRUE@_csv _csv.c
36@MODULE__HEAPQ_TRUE@_heapq _heapqmodule.c
37@MODULE__JSON_TRUE@_json _json.c
38@MODULE__LSPROF_TRUE@_lsprof _lsprof.c rotatingtree.c
39@MODULE__OPCODE_TRUE@_opcode _opcode.c
40@MODULE__PICKLE_TRUE@_pickle _pickle.c
41@MODULE__QUEUE_TRUE@_queue _queuemodule.c
42@MODULE__RANDOM_TRUE@_random _randommodule.c
43@MODULE__STRUCT_TRUE@_struct _struct.c
44@MODULE__TYPING_TRUE@_typing _typingmodule.c
45@MODULE__XXSUBINTERPRETERS_TRUE@_xxsubinterpreters _xxsubinterpretersmodule.c
46@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c
47
48# needs libm
49@MODULE_AUDIOOP_TRUE@audioop audioop.c
50@MODULE_MATH_TRUE@math mathmodule.c
51@MODULE_CMATH_TRUE@cmath cmathmodule.c
52@MODULE__STATISTICS_TRUE@_statistics _statisticsmodule.c
53
54# needs libm and on some platforms librt
55@MODULE__DATETIME_TRUE@_datetime _datetimemodule.c
56
57# _decimal uses libmpdec
58# either static libmpdec.a from Modules/_decimal/libmpdec or libmpdec.so
59# with ./configure --with-system-libmpdec
60@MODULE__DECIMAL_TRUE@_decimal _decimal/_decimal.c
61
62# compression libs and binascii (optional CRC32 from zlib)
63# bindings need -lbz2, -lz, or -llzma, respectively
64@MODULE_BINASCII_TRUE@binascii binascii.c
65@MODULE__BZ2_TRUE@_bz2 _bz2module.c
66@MODULE__LZMA_TRUE@_lzma _lzmamodule.c
67@MODULE_ZLIB_TRUE@zlib zlibmodule.c
68
69# dbm/gdbm
70# dbm needs either libndbm, libgdbm_compat, or libdb 5.x
71#@MODULE__DBM_TRUE@_dbm _dbmmodule.c
72# gdbm module needs -lgdbm
73@MODULE__GDBM_TRUE@_gdbm _gdbmmodule.c
74
75# needs -lreadline or -leditline, sometimes termcap, termlib, or tinfo
76#@MODULE_READLINE_TRUE@readline readline.c
77
78# hashing builtins, can be disabled with --without-builtin-hashlib-hashes
79@MODULE__MD5_TRUE@_md5 md5module.c
80@MODULE__SHA1_TRUE@_sha1 sha1module.c
81@MODULE__SHA256_TRUE@_sha256 sha256module.c
82@MODULE__SHA512_TRUE@_sha512 sha512module.c
83@MODULE__SHA3_TRUE@_sha3 _sha3/sha3module.c
84@MODULE__BLAKE2_TRUE@_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
85
86############################################################################
87# XML and text
88
89# pyexpat module uses libexpat
90# either static libexpat.a from Modules/expat or libexpat.so with
91# ./configure --with-system-expat
92@MODULE_PYEXPAT_TRUE@pyexpat pyexpat.c
93
94# _elementtree libexpat via CAPI hook in pyexpat.
95@MODULE__ELEMENTTREE_TRUE@_elementtree _elementtree.c
96
97@MODULE__CODECS_CN_TRUE@_codecs_cn cjkcodecs/_codecs_cn.c
98@MODULE__CODECS_HK_TRUE@_codecs_hk cjkcodecs/_codecs_hk.c
99@MODULE__CODECS_ISO2022_TRUE@_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
100@MODULE__CODECS_JP_TRUE@_codecs_jp cjkcodecs/_codecs_jp.c
101@MODULE__CODECS_KR_TRUE@_codecs_kr cjkcodecs/_codecs_kr.c
102@MODULE__CODECS_TW_TRUE@_codecs_tw cjkcodecs/_codecs_tw.c
103@MODULE__MULTIBYTECODEC_TRUE@_multibytecodec cjkcodecs/multibytecodec.c
104@MODULE_UNICODEDATA_TRUE@unicodedata unicodedata.c
105
106############################################################################
107# Modules with some UNIX dependencies
108#
109
110# needs -lcrypt on some systems
111@MODULE__CRYPT_TRUE@_crypt _cryptmodule.c
112@MODULE_FCNTL_TRUE@fcntl fcntlmodule.c
113@MODULE_GRP_TRUE@grp grpmodule.c
114@MODULE_MMAP_TRUE@mmap mmapmodule.c
115# FreeBSD: nis/yp APIs are in libc
116# Linux: glibc has deprecated SUN RPC, APIs are in libnsl and libtirpc (bpo-32521)
117@MODULE_NIS_TRUE@nis nismodule.c
118# needs sys/soundcard.h or linux/soundcard.h (Linux, FreeBSD)
119@MODULE_OSSAUDIODEV_TRUE@ossaudiodev ossaudiodev.c
120@MODULE__POSIXSUBPROCESS_TRUE@_posixsubprocess _posixsubprocess.c
121@MODULE_RESOURCE_TRUE@resource resource.c
122@MODULE_SELECT_TRUE@select selectmodule.c
123@MODULE__SOCKET_TRUE@_socket socketmodule.c
124# AIX has shadow passwords, but does not provide getspent API
125@MODULE_SPWD_TRUE@spwd spwdmodule.c
126@MODULE_SYSLOG_TRUE@syslog syslogmodule.c
127@MODULE_TERMIOS_TRUE@termios termios.c
128
129# multiprocessing
130@MODULE__POSIXSHMEM_TRUE@_posixshmem _multiprocessing/posixshmem.c
131@MODULE__MULTIPROCESSING_TRUE@_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
132
133
134############################################################################
135# Modules with third party dependencies
136#
137
138# needs -lffi and -ldl
139#@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c
140
141# needs -lncurses, -lncursesw or -lcurses, sometimes -ltermcap
142#@MODULE__CURSES_TRUE@_curses _cursesmodule.c
143# needs -lncurses and -lpanel
144#@MODULE__CURSES_PANEL_TRUE@_curses_panel _curses_panel.c
145
146@MODULE__SQLITE3_TRUE@_sqlite3 _sqlite/connection.c _sqlite/cursor.c _sqlite/microprotocols.c _sqlite/module.c _sqlite/prepare_protocol.c _sqlite/row.c _sqlite/statement.c _sqlite/util.c
147
148# needs -lssl and -lcrypt
149@MODULE__SSL_TRUE@_ssl _ssl.c
150# needs -lcrypt
151@MODULE__HASHLIB_TRUE@_hashlib _hashopenssl.c
152
153# needs -ltk, -ltcl, and sometimes -lX11
154#@MODULE__TKINTER_TRUE@_tkinter _tkinter.c tkappinit.c
155
156# Linux: -luuid, BSD/AIX: libc's uuid_create()
157@MODULE__UUID_TRUE@_uuid _uuidmodule.c
158
159############################################################################
160# macOS specific modules
161
162# _scproxy needs SystemConfiguration and CoreFoundation framework
163@MODULE__SCPROXY_TRUE@_scproxy _scproxy.c
164
165
166############################################################################
167# Test modules
168
169@MODULE__XXTESTFUZZ_TRUE@_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
170@MODULE__TESTBUFFER_TRUE@_testbuffer _testbuffer.c
171@MODULE__TESTINTERNALCAPI_TRUE@_testinternalcapi _testinternalcapi.c
172
173
174# Some testing modules MUST be built as shared libraries.
175*shared*
176@MODULE__TESTCAPI_TRUE@_testcapi _testcapimodule.c
177@MODULE__TESTIMPORTMULTIPLE_TRUE@_testimportmultiple _testimportmultiple.c
178@MODULE__TESTMULTIPHASE_TRUE@_testmultiphase _testmultiphase.c
179@MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c
180
181# Limited API template modules; must be built as shared modules.
182@MODULE_XXLIMITED_TRUE@xxlimited xxlimited.c
183@MODULE_XXLIMITED_35_TRUE@xxlimited_35 xxlimited_35.c
184