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#_interpchannels _interpchannelsmodule.c 141#_interpqueues _interpqueuesmodule.c 142#_interpreters _interpretersmodule.c 143#_json _json.c 144#_lsprof _lsprof.c rotatingtree.c 145#_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c 146#_opcode _opcode.c 147#_pickle _pickle.c 148#_queue _queuemodule.c 149#_random _randommodule.c 150#_socket socketmodule.c 151#_statistics _statisticsmodule.c 152#_struct _struct.c 153#_typing _typingmodule.c 154#_zoneinfo _zoneinfo.c 155#array arraymodule.c 156#binascii binascii.c 157#cmath cmathmodule.c 158#math mathmodule.c 159#mmap mmapmodule.c 160#select selectmodule.c 161#_sysconfig _sysconfig.c 162 163# XML 164#_elementtree _elementtree.c 165#pyexpat pyexpat.c 166 167# hashing builtins 168#_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c 169#_md5 md5module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_MD5.c -D_BSD_SOURCE -D_DEFAULT_SOURCE 170#_sha1 sha1module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA1.c -D_BSD_SOURCE -D_DEFAULT_SOURCE 171#_sha2 sha2module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_SHA2.a 172#_sha3 sha3module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA3.c -D_BSD_SOURCE -D_DEFAULT_SOURCE 173 174# text encodings and unicode 175#_codecs_cn cjkcodecs/_codecs_cn.c 176#_codecs_hk cjkcodecs/_codecs_hk.c 177#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c 178#_codecs_jp cjkcodecs/_codecs_jp.c 179#_codecs_kr cjkcodecs/_codecs_kr.c 180#_codecs_tw cjkcodecs/_codecs_tw.c 181#_multibytecodec cjkcodecs/multibytecodec.c 182#unicodedata unicodedata.c 183 184# Modules with some UNIX dependencies 185 186#_posixsubprocess _posixsubprocess.c 187#_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt 188#fcntl fcntlmodule.c 189#grp grpmodule.c 190#resource resource.c 191#syslog syslogmodule.c 192#termios termios.c 193 194# Modules that require external libraries. 195 196#_bz2 _bz2module.c -lbz2 197#_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 198# The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB. 199#_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT 200#_gdbm _gdbmmodule.c -lgdbm 201#_lzma _lzmamodule.c -llzma 202#_uuid _uuidmodule.c -luuid 203#zlib zlibmodule.c -lz 204 205# The readline module also supports libeditline (-leditline). 206# Some systems may require -ltermcap or -ltermlib. 207#readline readline.c -lreadline -ltermcap 208 209# OpenSSL bindings 210#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) 211#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto 212 213# To statically link OpenSSL: 214# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ 215# -l:libssl.a -Wl,--exclude-libs,libssl.a \ 216# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a 217# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ 218# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a 219 220# The _tkinter module. 221# 222# The command for _tkinter is long and site specific. Please 223# uncomment and/or edit those parts as indicated. If you don't have a 224# specific extension (e.g. Tix or BLT), leave the corresponding line 225# commented out. (Leave the trailing backslashes in! If you 226# experience strange errors, you may want to join all uncommented 227# lines and remove the backslashes -- the backslash interpretation is 228# done by the shell's "read" command and it may not be implemented on 229# every system. 230 231# *** Always uncomment this (leave the leading underscore in!): 232#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ 233# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: 234# -L/usr/local/lib \ 235# *** Uncomment and edit to reflect where your Tcl/Tk headers are: 236# -I/usr/local/include \ 237# *** Uncomment and edit to reflect where your X11 header files are: 238# -I/usr/X11R6/include \ 239# *** Or uncomment this for Solaris: 240# -I/usr/openwin/include \ 241# *** Uncomment and edit for Tix extension only: 242# -DWITH_TIX -ltix8.1.8.2 \ 243# *** Uncomment and edit for BLT extension only: 244# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ 245# *** Uncomment and edit for PIL (TkImaging) extension only: 246# (See http://www.pythonware.com/products/pil/ for more info) 247# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ 248# *** Uncomment and edit for TOGL extension only: 249# -DWITH_TOGL togl.c \ 250# *** Uncomment and edit to reflect where your X11 libraries are: 251# -L/usr/X11R6/lib \ 252# *** Or uncomment this for Solaris: 253# -L/usr/openwin/lib \ 254# *** Uncomment these for TOGL extension only: 255# -lGL -lGLU -lXext -lXmu \ 256# *** Uncomment for AIX: 257# -lld \ 258# *** Always uncomment this; X11 libraries to link with: 259# -lX11 260 261# Some system have -lcurses 262#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c 263#_curses_panel -lpanel -lncurses _curses_panel.c 264 265# macOS specific module, needs SystemConfiguration and CoreFoundation framework 266# _scproxy _scproxy.c 267 268# Examples 269 270#xx xxmodule.c 271#xxlimited xxlimited.c 272#xxlimited_35 xxlimited_35.c 273#xxsubtype xxsubtype.c 274 275# Testing 276 277#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c 278#_testbuffer _testbuffer.c 279#_testinternalcapi _testinternalcapi.c 280 281# Some testing modules MUST be built as shared libraries. 282 283#*shared* 284#_ctypes_test _ctypes/_ctypes_test.c 285#_testcapi _testcapimodule.c 286#_testimportmultiple _testimportmultiple.c 287#_testmultiphase _testmultiphase.c 288#_testexternalinspection _testexternalinspection.c 289#_testsinglephase _testsinglephase.c 290 291# --- 292# Uncommenting the following line tells makesetup that all following modules 293# are not built (see above for more detail). 294# 295#*disabled* 296# 297# _sqlite3 _tkinter _curses pyexpat 298# _codecs_jp _codecs_kr _codecs_tw unicodedata 299