17db96d56Sopenharmony_ci# -*- makefile -*- 27db96d56Sopenharmony_ci# The file Setup is used by the makesetup script to construct the files 37db96d56Sopenharmony_ci# Makefile and config.c, from Makefile.pre and config.c.in, 47db96d56Sopenharmony_ci# respectively. Note that Makefile.pre is created from Makefile.pre.in 57db96d56Sopenharmony_ci# by the toplevel configure script. 67db96d56Sopenharmony_ci 77db96d56Sopenharmony_ci# (VPATH notes: Setup and Makefile.pre are in the build directory, as 87db96d56Sopenharmony_ci# are Makefile and config.c; the *.in files are in the source directory.) 97db96d56Sopenharmony_ci 107db96d56Sopenharmony_ci# Each line in this file describes one or more optional modules. 117db96d56Sopenharmony_ci# Modules configured here will not be compiled by the setup.py script, 127db96d56Sopenharmony_ci# so the file can be used to override setup.py's behavior. 137db96d56Sopenharmony_ci# Tag lines containing just the word "*static*", "*shared*" or "*disabled*" 147db96d56Sopenharmony_ci# (without the quotes but with the stars) are used to tag the following module 157db96d56Sopenharmony_ci# descriptions. Tag lines may alternate throughout this file. Modules are 167db96d56Sopenharmony_ci# built statically when they are preceded by a "*static*" tag line or when 177db96d56Sopenharmony_ci# there is no tag line between the start of the file and the module 187db96d56Sopenharmony_ci# description. Modules are built as a shared library when they are preceded by 197db96d56Sopenharmony_ci# a "*shared*" tag line. Modules are not built at all, not by the Makefile, 207db96d56Sopenharmony_ci# nor by the setup.py script, when they are preceded by a "*disabled*" tag 217db96d56Sopenharmony_ci# line. 227db96d56Sopenharmony_ci 237db96d56Sopenharmony_ci# Lines have the following structure: 247db96d56Sopenharmony_ci# 257db96d56Sopenharmony_ci# <module> ... [<sourcefile> ...] [<cpparg> ...] [<library> ...] 267db96d56Sopenharmony_ci# 277db96d56Sopenharmony_ci# <sourcefile> is anything ending in .c (.C, .cc, .c++ are C++ files) 287db96d56Sopenharmony_ci# <cpparg> is anything starting with -I, -D, -U or -C 297db96d56Sopenharmony_ci# <library> is anything ending in .a or beginning with -l or -L 307db96d56Sopenharmony_ci# <module> is anything else but should be a valid Python 317db96d56Sopenharmony_ci# identifier (letters, digits, underscores, beginning with non-digit) 327db96d56Sopenharmony_ci# 337db96d56Sopenharmony_ci# (As the makesetup script changes, it may recognize some other 347db96d56Sopenharmony_ci# arguments as well, e.g. *.so and *.sl as libraries. See the big 357db96d56Sopenharmony_ci# case statement in the makesetup script.) 367db96d56Sopenharmony_ci# 377db96d56Sopenharmony_ci# Lines can also have the form 387db96d56Sopenharmony_ci# 397db96d56Sopenharmony_ci# <name> = <value> 407db96d56Sopenharmony_ci# 417db96d56Sopenharmony_ci# which defines a Make variable definition inserted into Makefile.in. 427db96d56Sopenharmony_ci# You can also use any Make variable that is detected by configure and 437db96d56Sopenharmony_ci# defined in Makefile.pre.in, e.g. OpenSSL flags $(OPENSSL_INCLUDES). 447db96d56Sopenharmony_ci# 457db96d56Sopenharmony_ci# Rules generated by makesetup use additional variables: 467db96d56Sopenharmony_ci# 477db96d56Sopenharmony_ci# - All source file rules have a dependency on $(PYTHON_HEADERS) and on 487db96d56Sopenharmony_ci# optional variable $(MODULES_{mod_upper}_DEPS). 497db96d56Sopenharmony_ci# - If no <cpparg> and no <library> arguments are given, then makesetup 507db96d56Sopenharmony_ci# defaults to $(MODULES_{mod_upper}_CFLAGS) cppargs and 517db96d56Sopenharmony_ci# $(MODULES_{mod_upper}_LDFLAGS) libraries. The variables are typically 527db96d56Sopenharmony_ci# defined by configure. 537db96d56Sopenharmony_ci# 547db96d56Sopenharmony_ci# The build process works like this: 557db96d56Sopenharmony_ci# 567db96d56Sopenharmony_ci# 1. Build all modules that are declared as static in Modules/Setup, 577db96d56Sopenharmony_ci# combine them into libpythonxy.a, combine that into python. 587db96d56Sopenharmony_ci# 2. Build all modules that are listed as shared in Modules/Setup. 597db96d56Sopenharmony_ci# 3. Invoke setup.py. That builds all modules that 607db96d56Sopenharmony_ci# a) are not builtin, and 617db96d56Sopenharmony_ci# b) are not listed in Modules/Setup, and 627db96d56Sopenharmony_ci# c) can be build on the target 637db96d56Sopenharmony_ci# 647db96d56Sopenharmony_ci# Therefore, modules declared to be shared will not be 657db96d56Sopenharmony_ci# included in the config.c file, nor in the list of objects to be 667db96d56Sopenharmony_ci# added to the library archive, and their linker options won't be 677db96d56Sopenharmony_ci# added to the linker options. Rules to create their .o files and 687db96d56Sopenharmony_ci# their shared libraries will still be added to the Makefile, and 697db96d56Sopenharmony_ci# their names will be collected in the Make variable SHAREDMODS. This 707db96d56Sopenharmony_ci# is used to build modules as shared libraries. (They can be 717db96d56Sopenharmony_ci# installed using "make sharedinstall", which is implied by the 727db96d56Sopenharmony_ci# toplevel "make install" target.) (For compatibility, 737db96d56Sopenharmony_ci# *noconfig* has the same effect as *shared*.) 747db96d56Sopenharmony_ci# 757db96d56Sopenharmony_ci# NOTE: As a standard policy, as many modules as can be supported by a 767db96d56Sopenharmony_ci# platform should be listed below. The distribution comes with all 777db96d56Sopenharmony_ci# modules enabled that are supported by most platforms and don't 787db96d56Sopenharmony_ci# require you to download sources from elsewhere. 797db96d56Sopenharmony_ci# 807db96d56Sopenharmony_ci# NOTE: Avoid editing this file directly. Local changes should go into 817db96d56Sopenharmony_ci# Modules/Setup.local file. To enable all modules for testing, run 827db96d56Sopenharmony_ci# 837db96d56Sopenharmony_ci# sed -n -E 's/^#([a-z_\*].*)$/\1/p' Modules/Setup > Modules/Setup.local 847db96d56Sopenharmony_ci 857db96d56Sopenharmony_ci 867db96d56Sopenharmony_ci# Some special rules to define PYTHONPATH. 877db96d56Sopenharmony_ci# Edit the definitions below to indicate which options you are using. 887db96d56Sopenharmony_ci# Don't add any whitespace or comments! 897db96d56Sopenharmony_ci 907db96d56Sopenharmony_ci# Directories where library files get installed. 917db96d56Sopenharmony_ci# DESTLIB is for Python modules; MACHDESTLIB for shared libraries. 927db96d56Sopenharmony_ciDESTLIB=$(LIBDEST) 937db96d56Sopenharmony_ciMACHDESTLIB=$(BINLIBDEST) 947db96d56Sopenharmony_ci 957db96d56Sopenharmony_ci# NOTE: all the paths are now relative to the prefix that is computed 967db96d56Sopenharmony_ci# at run time! 977db96d56Sopenharmony_ci 987db96d56Sopenharmony_ci# Standard path -- don't edit. 997db96d56Sopenharmony_ci# No leading colon since this is the first entry. 1007db96d56Sopenharmony_ci# Empty since this is now just the runtime prefix. 1017db96d56Sopenharmony_ciDESTPATH= 1027db96d56Sopenharmony_ci 1037db96d56Sopenharmony_ci# Site specific path components -- should begin with : if non-empty 1047db96d56Sopenharmony_ciSITEPATH= 1057db96d56Sopenharmony_ci 1067db96d56Sopenharmony_ci# Standard path components for test modules 1077db96d56Sopenharmony_ciTESTPATH= 1087db96d56Sopenharmony_ci 1097db96d56Sopenharmony_ciCOREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH) 1107db96d56Sopenharmony_ciPYTHONPATH=$(COREPYTHONPATH) 1117db96d56Sopenharmony_ci 1127db96d56Sopenharmony_ci 1137db96d56Sopenharmony_ci# --- 1147db96d56Sopenharmony_ci# Built-in modules required to get a functioning interpreter are listed in 1157db96d56Sopenharmony_ci# Modules/Setup.bootstrap. 1167db96d56Sopenharmony_ci 1177db96d56Sopenharmony_ci# --- 1187db96d56Sopenharmony_ci# The rest of the modules listed in this file are all commented out by 1197db96d56Sopenharmony_ci# default. Usually they can be detected and built as dynamically 1207db96d56Sopenharmony_ci# loaded modules by setup.py. If you're on a platform that doesn't 1217db96d56Sopenharmony_ci# support dynamic loading, want to compile modules statically into the 1227db96d56Sopenharmony_ci# Python binary, or need to specify some odd set of compiler switches, 1237db96d56Sopenharmony_ci# you can uncomment the appropriate lines below. 1247db96d56Sopenharmony_ci 1257db96d56Sopenharmony_ci# Uncommenting the following line tells makesetup that all following 1267db96d56Sopenharmony_ci# modules are to be built as shared libraries (see above for more 1277db96d56Sopenharmony_ci# detail; also note that *static* or *disabled* cancels this effect): 1287db96d56Sopenharmony_ci 1297db96d56Sopenharmony_ci#*shared* 1307db96d56Sopenharmony_ci 1317db96d56Sopenharmony_ci# Modules that should always be present (POSIX and Windows): 1327db96d56Sopenharmony_ci 1337db96d56Sopenharmony_ci#_asyncio _asynciomodule.c 1347db96d56Sopenharmony_ci#_bisect _bisectmodule.c 1357db96d56Sopenharmony_ci#_contextvars _contextvarsmodule.c 1367db96d56Sopenharmony_ci#_csv _csv.c 1377db96d56Sopenharmony_ci#_datetime _datetimemodule.c 1387db96d56Sopenharmony_ci#_decimal _decimal/_decimal.c 1397db96d56Sopenharmony_ci#_heapq _heapqmodule.c 1407db96d56Sopenharmony_ci#_json _json.c 1417db96d56Sopenharmony_ci#_lsprof _lsprof.c rotatingtree.c 1427db96d56Sopenharmony_ci#_multiprocessing -I$(srcdir)/Modules/_multiprocessing _multiprocessing/multiprocessing.c _multiprocessing/semaphore.c 1437db96d56Sopenharmony_ci#_opcode _opcode.c 1447db96d56Sopenharmony_ci#_pickle _pickle.c 1457db96d56Sopenharmony_ci#_queue _queuemodule.c 1467db96d56Sopenharmony_ci#_random _randommodule.c 1477db96d56Sopenharmony_ci#_socket socketmodule.c 1487db96d56Sopenharmony_ci#_statistics _statisticsmodule.c 1497db96d56Sopenharmony_ci#_struct _struct.c 1507db96d56Sopenharmony_ci#_typing _typingmodule.c 1517db96d56Sopenharmony_ci#_zoneinfo _zoneinfo.c 1527db96d56Sopenharmony_ci#array arraymodule.c 1537db96d56Sopenharmony_ci#audioop audioop.c 1547db96d56Sopenharmony_ci#binascii binascii.c 1557db96d56Sopenharmony_ci#cmath cmathmodule.c 1567db96d56Sopenharmony_ci#math mathmodule.c 1577db96d56Sopenharmony_ci#mmap mmapmodule.c 1587db96d56Sopenharmony_ci#select selectmodule.c 1597db96d56Sopenharmony_ci 1607db96d56Sopenharmony_ci# XML 1617db96d56Sopenharmony_ci#_elementtree _elementtree.c 1627db96d56Sopenharmony_ci#pyexpat pyexpat.c 1637db96d56Sopenharmony_ci 1647db96d56Sopenharmony_ci# hashing builtins 1657db96d56Sopenharmony_ci#_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c 1667db96d56Sopenharmony_ci#_md5 md5module.c 1677db96d56Sopenharmony_ci#_sha1 sha1module.c 1687db96d56Sopenharmony_ci#_sha256 sha256module.c 1697db96d56Sopenharmony_ci#_sha512 sha512module.c 1707db96d56Sopenharmony_ci#_sha3 _sha3/sha3module.c 1717db96d56Sopenharmony_ci 1727db96d56Sopenharmony_ci# text encodings and unicode 1737db96d56Sopenharmony_ci#_codecs_cn cjkcodecs/_codecs_cn.c 1747db96d56Sopenharmony_ci#_codecs_hk cjkcodecs/_codecs_hk.c 1757db96d56Sopenharmony_ci#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c 1767db96d56Sopenharmony_ci#_codecs_jp cjkcodecs/_codecs_jp.c 1777db96d56Sopenharmony_ci#_codecs_kr cjkcodecs/_codecs_kr.c 1787db96d56Sopenharmony_ci#_codecs_tw cjkcodecs/_codecs_tw.c 1797db96d56Sopenharmony_ci#_multibytecodec cjkcodecs/multibytecodec.c 1807db96d56Sopenharmony_ci#unicodedata unicodedata.c 1817db96d56Sopenharmony_ci 1827db96d56Sopenharmony_ci# Modules with some UNIX dependencies 1837db96d56Sopenharmony_ci 1847db96d56Sopenharmony_ci#_posixsubprocess _posixsubprocess.c 1857db96d56Sopenharmony_ci#_posixshmem -I$(srcdir)/Modules/_multiprocessing _multiprocessing/posixshmem.c -lrt 1867db96d56Sopenharmony_ci#fcntl fcntlmodule.c 1877db96d56Sopenharmony_ci#grp grpmodule.c 1887db96d56Sopenharmony_ci#ossaudiodev ossaudiodev.c 1897db96d56Sopenharmony_ci#resource resource.c 1907db96d56Sopenharmony_ci#spwd spwdmodule.c 1917db96d56Sopenharmony_ci#syslog syslogmodule.c 1927db96d56Sopenharmony_ci#termios termios.c 1937db96d56Sopenharmony_ci 1947db96d56Sopenharmony_ci# Modules with UNIX dependencies that require external libraries 1957db96d56Sopenharmony_ci 1967db96d56Sopenharmony_ci#_crypt _cryptmodule.c -lcrypt 1977db96d56Sopenharmony_ci#nis nismodule.c -I/usr/include/tirpc -lnsl -ltirpc 1987db96d56Sopenharmony_ci 1997db96d56Sopenharmony_ci# Modules that require external libraries. 2007db96d56Sopenharmony_ci 2017db96d56Sopenharmony_ci#_bz2 _bz2module.c -lbz2 2027db96d56Sopenharmony_ci#_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 2037db96d56Sopenharmony_ci# The _dbm module supports NDBM, GDBM with compat module, and Berkeley DB. 2047db96d56Sopenharmony_ci#_dbm _dbmmodule.c -lgdbm_compat -DUSE_GDBM_COMPAT 2057db96d56Sopenharmony_ci#_gdbm _gdbmmodule.c -lgdbm 2067db96d56Sopenharmony_ci#_lzma _lzmamodule.c -llzma 2077db96d56Sopenharmony_ci#_uuid _uuidmodule.c -luuid 2087db96d56Sopenharmony_ci#zlib zlibmodule.c -lz 2097db96d56Sopenharmony_ci 2107db96d56Sopenharmony_ci# The readline module also supports libeditline (-leditline). 2117db96d56Sopenharmony_ci# Some systems may require -ltermcap or -ltermlib. 2127db96d56Sopenharmony_ci#readline readline.c -lreadline -ltermcap 2137db96d56Sopenharmony_ci 2147db96d56Sopenharmony_ci# OpenSSL bindings 2157db96d56Sopenharmony_ci#_ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) 2167db96d56Sopenharmony_ci#_hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) -lcrypto 2177db96d56Sopenharmony_ci 2187db96d56Sopenharmony_ci# To statically link OpenSSL: 2197db96d56Sopenharmony_ci# _ssl _ssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ 2207db96d56Sopenharmony_ci# -l:libssl.a -Wl,--exclude-libs,libssl.a \ 2217db96d56Sopenharmony_ci# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a 2227db96d56Sopenharmony_ci# _hashlib _hashopenssl.c $(OPENSSL_INCLUDES) $(OPENSSL_LDFLAGS) \ 2237db96d56Sopenharmony_ci# -l:libcrypto.a -Wl,--exclude-libs,libcrypto.a 2247db96d56Sopenharmony_ci 2257db96d56Sopenharmony_ci# The _tkinter module. 2267db96d56Sopenharmony_ci# 2277db96d56Sopenharmony_ci# The command for _tkinter is long and site specific. Please 2287db96d56Sopenharmony_ci# uncomment and/or edit those parts as indicated. If you don't have a 2297db96d56Sopenharmony_ci# specific extension (e.g. Tix or BLT), leave the corresponding line 2307db96d56Sopenharmony_ci# commented out. (Leave the trailing backslashes in! If you 2317db96d56Sopenharmony_ci# experience strange errors, you may want to join all uncommented 2327db96d56Sopenharmony_ci# lines and remove the backslashes -- the backslash interpretation is 2337db96d56Sopenharmony_ci# done by the shell's "read" command and it may not be implemented on 2347db96d56Sopenharmony_ci# every system. 2357db96d56Sopenharmony_ci 2367db96d56Sopenharmony_ci# *** Always uncomment this (leave the leading underscore in!): 2377db96d56Sopenharmony_ci#_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT $(TCLTK_INCLUDES) $(TCLTK_LIBS) \ 2387db96d56Sopenharmony_ci# *** Uncomment and edit to reflect where your Tcl/Tk libraries are: 2397db96d56Sopenharmony_ci# -L/usr/local/lib \ 2407db96d56Sopenharmony_ci# *** Uncomment and edit to reflect where your Tcl/Tk headers are: 2417db96d56Sopenharmony_ci# -I/usr/local/include \ 2427db96d56Sopenharmony_ci# *** Uncomment and edit to reflect where your X11 header files are: 2437db96d56Sopenharmony_ci# -I/usr/X11R6/include \ 2447db96d56Sopenharmony_ci# *** Or uncomment this for Solaris: 2457db96d56Sopenharmony_ci# -I/usr/openwin/include \ 2467db96d56Sopenharmony_ci# *** Uncomment and edit for Tix extension only: 2477db96d56Sopenharmony_ci# -DWITH_TIX -ltix8.1.8.2 \ 2487db96d56Sopenharmony_ci# *** Uncomment and edit for BLT extension only: 2497db96d56Sopenharmony_ci# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ 2507db96d56Sopenharmony_ci# *** Uncomment and edit for PIL (TkImaging) extension only: 2517db96d56Sopenharmony_ci# (See http://www.pythonware.com/products/pil/ for more info) 2527db96d56Sopenharmony_ci# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \ 2537db96d56Sopenharmony_ci# *** Uncomment and edit for TOGL extension only: 2547db96d56Sopenharmony_ci# -DWITH_TOGL togl.c \ 2557db96d56Sopenharmony_ci# *** Uncomment and edit to reflect where your X11 libraries are: 2567db96d56Sopenharmony_ci# -L/usr/X11R6/lib \ 2577db96d56Sopenharmony_ci# *** Or uncomment this for Solaris: 2587db96d56Sopenharmony_ci# -L/usr/openwin/lib \ 2597db96d56Sopenharmony_ci# *** Uncomment these for TOGL extension only: 2607db96d56Sopenharmony_ci# -lGL -lGLU -lXext -lXmu \ 2617db96d56Sopenharmony_ci# *** Uncomment for AIX: 2627db96d56Sopenharmony_ci# -lld \ 2637db96d56Sopenharmony_ci# *** Always uncomment this; X11 libraries to link with: 2647db96d56Sopenharmony_ci# -lX11 2657db96d56Sopenharmony_ci 2667db96d56Sopenharmony_ci# Some system have -lcurses 2677db96d56Sopenharmony_ci#_curses -lncurses -lncursesw -ltermcap _cursesmodule.c 2687db96d56Sopenharmony_ci#_curses_panel -lpanel -lncurses _curses_panel.c 2697db96d56Sopenharmony_ci 2707db96d56Sopenharmony_ci# macOS specific module, needs SystemConfiguration and CoreFoundation framework 2717db96d56Sopenharmony_ci# _scproxy _scproxy.c 2727db96d56Sopenharmony_ci 2737db96d56Sopenharmony_ci# Examples 2747db96d56Sopenharmony_ci 2757db96d56Sopenharmony_ci#xx xxmodule.c 2767db96d56Sopenharmony_ci#xxlimited xxlimited.c 2777db96d56Sopenharmony_ci#xxlimited_35 xxlimited_35.c 2787db96d56Sopenharmony_cixxsubtype xxsubtype.c # Required for the test suite to pass! 2797db96d56Sopenharmony_ci 2807db96d56Sopenharmony_ci# Testing 2817db96d56Sopenharmony_ci 2827db96d56Sopenharmony_ci#_xxsubinterpreters _xxsubinterpretersmodule.c 2837db96d56Sopenharmony_ci#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c 2847db96d56Sopenharmony_ci#_testbuffer _testbuffer.c 2857db96d56Sopenharmony_ci#_testinternalcapi _testinternalcapi.c 2867db96d56Sopenharmony_ci 2877db96d56Sopenharmony_ci# Some testing modules MUST be built as shared libraries. 2887db96d56Sopenharmony_ci 2897db96d56Sopenharmony_ci#*shared* 2907db96d56Sopenharmony_ci#_ctypes_test _ctypes/_ctypes_test.c 2917db96d56Sopenharmony_ci#_testcapi _testcapimodule.c 2927db96d56Sopenharmony_ci#_testimportmultiple _testimportmultiple.c 2937db96d56Sopenharmony_ci#_testmultiphase _testmultiphase.c 2947db96d56Sopenharmony_ci 2957db96d56Sopenharmony_ci# --- 2967db96d56Sopenharmony_ci# Uncommenting the following line tells makesetup that all following modules 2977db96d56Sopenharmony_ci# are not built (see above for more detail). 2987db96d56Sopenharmony_ci# 2997db96d56Sopenharmony_ci#*disabled* 3007db96d56Sopenharmony_ci# 3017db96d56Sopenharmony_ci# _sqlite3 _tkinter _curses pyexpat 3027db96d56Sopenharmony_ci# _codecs_jp _codecs_kr _codecs_tw unicodedata 303