Blame project/variants/3.7.2/pyexts.h

5a6632
/*******************************************************************/
5a6632
/*  sbpython3: external configurable build project for Python-3.x. */
5a6632
/*  Copyright (C) 2018  Z. Gilboa                                  */
5a6632
/*  Released under the Standard MIT License; see COPYING.SBPYTHON3.*/
5a6632
/*******************************************************************/
5a6632
5a6632
/*******************************************************************/
5a6632
/* pyexts.c: a simple development-time utility for generating      */
5a6632
/* make rules for python's extension modules. The utility is       */
5a6632
/* included with the sbpython3 project for reference only.         */
5a6632
/*                                                                 */
5a6632
/* cc -std=c99 -D_XOPEN_SOURCE=700 pyexts.c                        */
5a6632
/*******************************************************************/
5a6632
5a6632
#define PYEXT_LIST(...)                   (const char *[]){__VA_ARGS__,0}
5a6632
#define PYEXT_SIMPLE(name,...)            {name,PYEXT_LIST(__VA_ARGS__),0,0,0,0}
5a6632
5a6632
#define PYEXT_COMMON(name,hvar,lvar,...)  {name,PYEXT_LIST(__VA_ARGS__), \
5a6632
                                           PYEXT_LIST(hvar),0,           \
5a6632
                                           PYEXT_LIST(lvar),0}
5a6632
5a6632
#define PYEXT_ALTSTD(name,cstd,...)       {name,PYEXT_LIST(__VA_ARGS__), \
5a6632
                                           0,PYEXT_LIST(cstd),0,0}
5a6632
5a6632
struct pyext_meta {
5a6632
	const char *	name;
5a6632
	const char **	srcs;
5a6632
	const char **	hdrs;
5a6632
	const char **	cstd;
5a6632
	const char **	vars;
5a6632
	const char **	deps;
5a6632
};
5a6632
5a6632
static const struct pyext_meta pyexts[] = {
5a6632
	PYEXT_SIMPLE("_multibytecodec",     "cjkcodecs/multibytecodec"),
5a6632
	PYEXT_SIMPLE("_codecs_cn",          "cjkcodecs/_codecs_cn"),
5a6632
	PYEXT_SIMPLE("_codecs_hk",          "cjkcodecs/_codecs_hk"),
5a6632
	PYEXT_SIMPLE("_codecs_jp",          "cjkcodecs/_codecs_jp"),
5a6632
	PYEXT_SIMPLE("_codecs_kr",          "cjkcodecs/_codecs_kr"),
5a6632
	PYEXT_SIMPLE("_codecs_tw",          "cjkcodecs/_codecs_tw"),
5a6632
	PYEXT_SIMPLE("_codecs_iso2022",     "cjkcodecs/_codecs_iso2022"),
5a6632
5a6632
	PYEXT_SIMPLE("_asyncio",            "_asynciomodule"),
5a6632
	PYEXT_SIMPLE("_bisect",             "_bisectmodule"),
5a6632
	PYEXT_SIMPLE("_contextvars",        "_contextvarsmodule"),
5a6632
	PYEXT_SIMPLE("_crypt",              "_cryptmodule"),
5a6632
	PYEXT_SIMPLE("_csv",                "_csv"),
5a6632
	PYEXT_SIMPLE("_ctypes_test",        "_ctypes/_ctypes_test"),
5a6632
	PYEXT_SIMPLE("_datetime",           "_datetimemodule"),
5a6632
	PYEXT_SIMPLE("_elementtree",        "_elementtree"),
5a6632
	PYEXT_SIMPLE("_heapq",              "_heapqmodule"),
5a6632
	PYEXT_SIMPLE("_json",               "_json"),
5a6632
	PYEXT_SIMPLE("_md5",                "md5module"),
5a6632
	PYEXT_SIMPLE("_opcode",             "_opcode"),
5a6632
	PYEXT_SIMPLE("_pickle",             "_pickle"),
5a6632
	PYEXT_SIMPLE("_posixsubprocess",    "_posixsubprocess"),
5a6632
	PYEXT_SIMPLE("_queue",              "_queuemodule"),
5a6632
	PYEXT_SIMPLE("_random",             "_randommodule"),
5a6632
	PYEXT_SIMPLE("_sha1",               "sha1module"),
5a6632
	PYEXT_SIMPLE("_sha256",             "sha256module"),
5a6632
	PYEXT_SIMPLE("_sha3",               "_sha3/sha3module"),
5a6632
	PYEXT_SIMPLE("_sha512",             "sha512module"),
5a6632
	PYEXT_SIMPLE("_socket",             "socketmodule"),
5a6632
	PYEXT_SIMPLE("_struct",             "_struct"),
5a6632
	PYEXT_SIMPLE("_testbuffer",         "_testbuffer"),
5a6632
	PYEXT_SIMPLE("_testcapi",           "_testcapimodule"),
5a6632
	PYEXT_SIMPLE("_testimportmultiple", "_testimportmultiple"),
5a6632
	PYEXT_SIMPLE("_testmultiphase",     "_testmultiphase"),
5a6632
5a6632
5a6632
5a6632
	PYEXT_SIMPLE("array",               "arraymodule"),
5a6632
	PYEXT_SIMPLE("audioop",             "audioop"),
5a6632
	PYEXT_SIMPLE("fcntl",               "fcntlmodule"),
5a6632
	PYEXT_SIMPLE("grp",                 "grpmodule"),
5a6632
	PYEXT_SIMPLE("mmap",                "mmapmodule"),
5a6632
	PYEXT_SIMPLE("ossaudiodev",         "ossaudiodev"),
5a6632
	PYEXT_SIMPLE("parser",              "parsermodule"),
5a6632
	PYEXT_SIMPLE("resource",            "resource"),
5a6632
	PYEXT_SIMPLE("select",              "selectmodule"),
5a6632
	PYEXT_SIMPLE("spwd",                "spwdmodule"),
5a6632
	PYEXT_SIMPLE("syslog",              "syslogmodule"),
5a6632
	PYEXT_SIMPLE("termios",             "termios"),
5a6632
	PYEXT_SIMPLE("unicodedata",         "unicodedata"),
5a6632
	PYEXT_SIMPLE("xxlimited",           "xxlimited"),
5a6632
5a6632
	PYEXT_SIMPLE("_blake2",
5a6632
	             "_blake2/blake2module",
5a6632
	             "_blake2/blake2b_impl",
5a6632
	             "_blake2/blake2s_impl"),
5a6632
5a6632
	PYEXT_SIMPLE("_lsprof",
5a6632
	             "_lsprof",
5a6632
	             "rotatingtree"),
5a6632
5a6632
	PYEXT_SIMPLE("_multiprocessing",
5a6632
	             "_multiprocessing/multiprocessing",
5a6632
	             "_multiprocessing/semaphore"),
5a6632
5a6632
	PYEXT_SIMPLE("_xxtestfuzz",
5a6632
	             "_xxtestfuzz/_xxtestfuzz",
5a6632
	             "_xxtestfuzz/fuzzer"),
5a6632
5a6632
	PYEXT_SIMPLE("cmath",
5a6632
	             "cmathmodule",
5a6632
	             "_math"),
5a6632
5a6632
	PYEXT_SIMPLE("math",
5a6632
	             "mathmodule",
5a6632
	             "_math"),
5a6632
5a6632
	PYEXT_COMMON("_bz2",0,"-lbz2",
5a6632
	             "_bz2module"),
5a6632
5a6632
	PYEXT_COMMON("_ctypes",0,"-lffi",
5a6632
	             "_ctypes/_ctypes",
5a6632
	             "_ctypes/callbacks",
5a6632
	             "_ctypes/callproc",
5a6632
	             "_ctypes/stgdict",
5a6632
	             "_ctypes/cfield"),
5a6632
5a6632
	PYEXT_COMMON("_curses",
5a6632
	             "$(CFLAGS_NCURSES)",
5a6632
	             "$(LDFLAGS_NCURSES)",
5a6632
	             "_cursesmodule"),
5a6632
5a6632
	PYEXT_COMMON("_curses_panel",
5a6632
	             "$(CFLAGS_NCURSES)",
5a6632
	             "$(LDFLAGS_NCURSES)",
5a6632
	             "_curses_panel"),
5a6632
5a6632
	PYEXT_COMMON("_decimal",
5a6632
	             "-I$(SOURCE_DIR)/Modules/_decimal/libmpdec -DUNIVERSAL",
5a6632
                     0,
5a6632
	             "_decimal/_decimal",
5a6632
	             "_decimal/libmpdec/basearith",
5a6632
	             "_decimal/libmpdec/constants",
5a6632
	             "_decimal/libmpdec/context",
5a6632
	             "_decimal/libmpdec/convolute",
5a6632
	             "_decimal/libmpdec/crt",
5a6632
	             "_decimal/libmpdec/difradix2",
5a6632
	             "_decimal/libmpdec/fnt",
5a6632
	             "_decimal/libmpdec/fourstep",
5a6632
	             "_decimal/libmpdec/io",
5a6632
	             "_decimal/libmpdec/memory",
5a6632
	             "_decimal/libmpdec/mpdecimal",
5a6632
	             "_decimal/libmpdec/numbertheory",
5a6632
	             "_decimal/libmpdec/sixstep",
5a6632
	             "_decimal/libmpdec/transpose"),
5a6632
5a6632
	PYEXT_COMMON("_dbm",
5a6632
	             "$(CFLAGS_DBM)",
5a6632
	             "$(LDFLAGS_DBM)",
5a6632
	             "_dbmmodule"),
5a6632
5a6632
	PYEXT_COMMON("_gdbm",0,"-lgdbm",
5a6632
	             "_gdbmmodule"),
5a6632
5a6632
	PYEXT_COMMON("_hashlib",0,"-lssl -lcrypto",
5a6632
	             "_hashopenssl"),
5a6632
5a6632
	PYEXT_COMMON("_lzma",0,"-llzma",
5a6632
	             "_lzmamodule"),
5a6632
5a6632
	PYEXT_COMMON("_sqlite3",
5a6632
	             "$(CFLAGS_SQLITE)",
5a6632
	             "$(LDFLAGS_SQLITE)",
5a6632
	             "_sqlite/cache",
5a6632
	             "_sqlite/connection",
5a6632
	             "_sqlite/cursor",
5a6632
	             "_sqlite/microprotocols",
5a6632
	             "_sqlite/module",
5a6632
	             "_sqlite/prepare_protocol",
5a6632
	             "_sqlite/row",
5a6632
	             "_sqlite/statement",
5a6632
	             "_sqlite/util"),
5a6632
5a6632
	PYEXT_COMMON("_ssl",0,"-lssl -lcrypto",
5a6632
	             "_ssl"),
5a6632
5a6632
	PYEXT_COMMON("_tkinter",
5a6632
	             "$(CFLAGS_TCLTK)",
5a6632
	             "$(LDFLAGS_TCLTK)",
5a6632
	             "_tkinter",
5a6632
	             "tkappinit"),
5a6632
5a6632
	PYEXT_COMMON("_uuid",0,"-luuid",
5a6632
	             "_uuidmodule"),
5a6632
5a6632
	PYEXT_COMMON("binascii",0,"-lz",
5a6632
	             "binascii"),
5a6632
5a6632
	PYEXT_COMMON("pyexpat",0,"-lexpat",
5a6632
	             "pyexpat"),
5a6632
5a6632
	PYEXT_COMMON("readline",0,"-lreadline",
5a6632
	             "readline"),
5a6632
5a6632
	PYEXT_COMMON("zlib",0,"-lz",
5a6632
	             "zlibmodule"),
5a6632
5a6632
	{0,0,0,0,0,0},
5a6632
};