Blame project/variants/3.7.1/pyexts.h

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