1# -*- makefile -*-
2# The file Setup is used by the makesetup script to construct the files
3# Makefile and config.c, from Makefile.pre and config.c.in,
4# respectively.  Note that Makefile.pre is created from Makefile.pre.in
5# by the toplevel configure script.
6
7# (VPATH notes: Setup and Makefile.pre are in the build directory, as
8# are Makefile and config.c; the *.in files are in the source directory.)
9
10# Each line in this file describes one or more optional modules.
11# Modules configured here will not be compiled by the setup.py script,
12# so the file can be used to override setup.py's behavior.
13# Tag lines containing just the word "*static*", "*shared*" or "*disabled*"
14# (without the quotes but with the stars) are used to tag the following module
15# descriptions. Tag lines may alternate throughout this file.  Modules are
16# built statically when they are preceded by a "*static*" tag line or when
17# there is no tag line between the start of the file and the module
18# description.  Modules are built as a shared library when they are preceded by
19# a "*shared*" tag line.  Modules are not built at all, not by the Makefile,
20# nor by the setup.py script, when they are preceded by a "*disabled*" tag
21# line.
22
23# Lines have the following structure:
24#
25# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...]
26#
27# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files)
28# <cpparg> is anything starting with -I, -D, -U or -C
29# <library> is anything ending in .a or beginning with -l or -L
30# <module> is anything else but should be a valid Python
31# identifier (letters, digits, underscores, beginning with non-digit)
32#
33# (As the makesetup script changes, it may recognize some other
34# arguments as well, e.g. *.so and *.sl as libraries.  See the big
35# case statement in the makesetup script.)
36#
37# Lines can also have the form
38#
39# <name> = <value>
40#
41# which defines a Make variable definition inserted into Makefile.in.
42# You can also use any Make variable that is detected by configure and
43# defined in Makefile.pre.in, e.g. OpenSSL flags $(OPENSSL_INCLUDES).
44#
45# Rules generated by makesetup use additional variables:
46#
47# - All source file rules have a dependency on $(PYTHON_HEADERS) and on
48#   optional variable $(MODULES_{mod_upper}_DEPS).
49# - If no <cpparg> and no <library> arguments are given, then makesetup
50#   defaults to $(MODULES_{mod_upper}_CFLAGS) cppargs and
51#   $(MODULES_{mod_upper}_LDFLAGS) libraries. The variables are typically
52#   defined by configure.
53#
54# The build process works like this:
55#
56# 1. Build all modules that are declared as static in Modules/Setup,
57#    combine them into libpythonxy.a, combine that into python.
58# 2. Build all modules that are listed as shared in Modules/Setup.
59# 3. Invoke setup.py. That builds all modules that
60#    a) are not builtin, and
61#    b) are not listed in Modules/Setup, and
62#    c) can be build on the target
63#
64# Therefore, modules declared to be shared will not be
65# included in the config.c file, nor in the list of objects to be
66# added to the library archive, and their linker options won't be
67# added to the linker options. Rules to create their .o files and
68# their shared libraries will still be added to the Makefile, and
69# their names will be collected in the Make variable SHAREDMODS.  This
70# is used to build modules as shared libraries.  (They can be
71# installed using "make sharedinstall", which is implied by the
72# toplevel "make install" target.)  (For compatibility,
73# *noconfig* has the same effect as *shared*.)
74#
75# NOTE: As a standard policy, as many modules as can be supported by a
76# platform should be listed below.  The distribution comes with all
77# modules enabled that are supported by most platforms and don't
78# require you to download sources from elsewhere.
79#
80# NOTE: Avoid editing this file directly. Local changes should go into
81# Modules/Setup.local file. To enable all modules for testing, run
82#
83#    sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local
84
85
86# Some special rules to define PYTHONPATH.
87# Edit the definitions below to indicate which options you are using.
88# Don't add any whitespace or comments!
89
90# Directories where library files get installed.
91# DESTLIB is for Python modules; MACHDESTLIB for shared libraries.
92DESTLIB=$(LIBDEST)
93MACHDESTLIB=$(BINLIBDEST)
94
95# NOTE: all the paths are now relative to the prefix that is computed
96# at run time!
97
98# Standard path -- don't edit.
99# No leading colon since this is the first entry.
100# Empty since this is now just the runtime prefix.
101DESTPATH=
102
103# Site specific path components -- should begin with : if non-empty
104SITEPATH=
105
106# Standard path components for test modules
107TESTPATH=
108
109COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)
110PYTHONPATH=$(COREPYTHONPATH)
111
112
113# ---
114# Built-in modules required to get a functioning interpreter are listed in
115# Modules/Setup.bootstrap.
116
117# ---
118# The rest of the modules listed in this file are all commented out by
119# default.  Usually they can be detected and built as dynamically
120# loaded modules by setup.py.  If you're on a platform that doesn't
121# support dynamic loading, want to compile modules statically into the
122# Python binary, or need to specify some odd set of compiler switches,
123# you can uncomment the appropriate lines below.
124
125# Uncommenting the following line tells makesetup that all following
126# modules are to be built as shared libraries (see above for more
127# detail; also note that *static* or *disabled* cancels this effect):
128
129#*shared*
130
131# Modules that should always be present (POSIX and Windows):
132
133#_asyncio _asynciomodule.c
134#_bisect _bisectmodule.c
135#_contextvars _contextvarsmodule.c
136#_csv _csv.c
137#_datetime _datetimemodule.c
138#_decimal _decimal/_decimal.c
139#_heapq _heapqmodule.c
140#_json _json.c
141#_lsprof _lsprof.c rotatingtree.c
142#_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c
143#_opcode _opcode.c
144#_pickle _pickle.c
145#_queue _queuemodule.c
146#_random _randommodule.c
147#_socket socketmodule.c
148#_statistics _statisticsmodule.c
149#_struct _struct.c
150#_typing _typingmodule.c
151#_zoneinfo _zoneinfo.c
152#array arraymodule.c
153#audioop audioop.c
154#binascii binascii.c
155#cmath cmathmodule.c
156#math mathmodule.c
157#mmap mmapmodule.c
158#select selectmodule.c
159
160# XML
161#_elementtree _elementtree.c
162#pyexpat pyexpat.c
163
164# hashing builtins
165#_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c
166#_md5 md5module.c
167#_sha1 sha1module.c
168#_sha256 sha256module.c
169#_sha512 sha512module.c
170#_sha3 _sha3/sha3module.c
171
172# text encodings and unicode
173#_codecs_cn cjkcodecs/_codecs_cn.c
174#_codecs_hk cjkcodecs/_codecs_hk.c
175#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c
176#_codecs_jp cjkcodecs/_codecs_jp.c
177#_codecs_kr cjkcodecs/_codecs_kr.c
178#_codecs_tw cjkcodecs/_codecs_tw.c
179#_multibytecodec cjkcodecs/multibytecodec.c
180#unicodedata unicodedata.c
181
182# Modules with some UNIX dependencies
183
184#_posixsubprocess _posixsubprocess.c
185#_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt
186#fcntl fcntlmodule.c
187#grp grpmodule.c
188#ossaudiodev ossaudiodev.c
189#resource resource.c
190#spwd spwdmodule.c
191#syslog syslogmodule.c
192#termios termios.c
193
194# Modules with UNIX dependencies that require external libraries
195
196#_crypt _cryptmodule.c -lcrypt
197#nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc
198
199# Modules that require external libraries.
200
201#_bz2 _bz2module.c -lbz2
202#_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c -ldl -lffi -DHAVE_FFI_PREP_CIF_VAR -DHAVE_FFI_PREP_CLOSURE_LOC -DHAVE_FFI_CLOSURE_ALLOC
203# The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB.
204#_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT
205#_gdbm _gdbmmodule.c -lgdbm
206#_lzma _lzmamodule.c -llzma
207#_uuid _uuidmodule.c -luuid
208#zlib  zlibmodule.c -lz
209
210# The readline module also supports libeditline (-leditline).
211# Some systems may require -ltermcap or -ltermlib.
212#readline readline.c -lreadline -ltermcap
213
214# OpenSSL bindings
215#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS)
216#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto
217
218# To statically link OpenSSL:
219# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \
220#     -l:libssl.a -Wl,--exclude-libs,libssl.a \
221#     -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a
222# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \
223#     -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a
224
225# The _tkinter module.
226#
227# The command for _tkinter is long and site specific.  Please
228# uncomment and/or edit those parts as indicated.  If you don't have a
229# specific extension (e.g. Tix or BLT), leave the corresponding line
230# commented out.  (Leave the trailing backslashes in!  If you
231# experience strange errors, you may want to join all uncommented
232# lines and remove the backslashes -- the backslash interpretation is
233# done by the shell's "read" command and it may not be implemented on
234# every system.
235
236# *** Always uncomment this (leave the leading underscore in!):
237#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \
238# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
239#	-L/usr/local/lib \
240# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
241#	-I/usr/local/include \
242# *** Uncomment and edit to reflect where your X11 header files are:
243#	-I/usr/X11R6/include \
244# *** Or uncomment this for Solaris:
245#	-I/usr/openwin/include \
246# *** Uncomment and edit for Tix extension only:
247#	-DWITH_TIX -ltix8.1.8.2 \
248# *** Uncomment and edit for BLT extension only:
249#	-DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
250# *** Uncomment and edit for PIL (TkImaging) extension only:
251#     (See http://www.pythonware.com/products/pil/ for more info)
252#	-DWITH_PIL -I../Extensions/Imaging/libImaging  tkImaging.c \
253# *** Uncomment and edit for TOGL extension only:
254#	-DWITH_TOGL togl.c \
255# *** Uncomment and edit to reflect where your X11 libraries are:
256#	-L/usr/X11R6/lib \
257# *** Or uncomment this for Solaris:
258#	-L/usr/openwin/lib \
259# *** Uncomment these for TOGL extension only:
260#	-lGL -lGLU -lXext -lXmu \
261# *** Uncomment for AIX:
262#	-lld \
263# *** Always uncomment this; X11 libraries to link with:
264#	-lX11
265
266# Some system have -lcurses
267#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c
268#_curses_panel -lpanel -lncurses _curses_panel.c
269
270# macOS specific module, needs SystemConfiguration and CoreFoundation framework
271# _scproxy _scproxy.c
272
273# Examples
274
275#xx xxmodule.c
276#xxlimited xxlimited.c
277#xxlimited_35 xxlimited_35.c
278xxsubtype xxsubtype.c  # Required for the test suite to pass!
279
280# Testing
281
282#_xxsubinterpreters _xxsubinterpretersmodule.c
283#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
284#_testbuffer _testbuffer.c
285#_testinternalcapi _testinternalcapi.c
286
287# Some testing modules MUST be built as shared libraries.
288
289#*shared*
290#_ctypes_test _ctypes/_ctypes_test.c
291#_testcapi _testcapimodule.c
292#_testimportmultiple _testimportmultiple.c
293#_testmultiphase _testmultiphase.c
294
295# ---
296# Uncommenting the following line tells makesetup that all following modules
297# are not built (see above for more detail).
298#
299#*disabled*
300#
301# _sqlite3 _tkinter _curses pyexpat
302# _codecs_jp _codecs_kr _codecs_tw unicodedata
303