blob: 5b2503f4dae79d78a9f29a1b65e500f3f3d0a8fc [file] [log] [blame]
Damienc025ebb2013-10-12 14:30:21 +01001// options to control how Micro Python is built
2
Paul Sokolovskyd674bd52014-01-04 19:38:19 +02003// Linking with GNU readline causes binary to be licensed under GPL
4#ifndef MICROPY_USE_READLINE
5#define MICROPY_USE_READLINE (1)
6#endif
7
Damiend2755ec2013-10-16 23:58:48 +01008#define MICROPY_EMIT_X64 (1)
Damien3ef4abb2013-10-12 16:53:13 +01009#define MICROPY_EMIT_THUMB (0)
10#define MICROPY_EMIT_INLINE_THUMB (0)
Damien George136f6752014-01-07 14:54:15 +000011#define MICROPY_MEM_STATS (1)
Damien Georgecbd2f742014-01-19 11:48:48 +000012#define MICROPY_DEBUG_PRINTERS (1)
Damien George136f6752014-01-07 14:54:15 +000013#define MICROPY_ENABLE_REPL_HELPERS (1)
Damien Georged3ebe482014-01-07 15:20:33 +000014#define MICROPY_ENABLE_LEXER_UNIX (1)
Damien George62ad1892014-01-29 21:51:51 +000015#define MICROPY_ENABLE_SOURCE_LINE (1)
Damien George136f6752014-01-07 14:54:15 +000016#define MICROPY_ENABLE_FLOAT (1)
Paul Sokolovsky966879c2014-01-17 20:01:36 +020017#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
Damien George354d15a2014-02-06 21:11:19 +000018#define MICROPY_PATH_MAX (PATH_MAX)
Damienc025ebb2013-10-12 14:30:21 +010019
20// type definitions for the specific machine
21
Paul Sokolovskye85c3892013-12-30 03:38:32 +020022#ifdef __LP64__
23typedef long machine_int_t; // must be pointer size
24typedef unsigned long machine_uint_t; // must be pointer size
Paul Sokolovskye85c3892013-12-30 03:38:32 +020025#else
26// These are definitions for machines where sizeof(int) == sizeof(void*),
27// regardless for actual size.
28typedef int machine_int_t; // must be pointer size
29typedef unsigned int machine_uint_t; // must be pointer size
Paul Sokolovskye85c3892013-12-30 03:38:32 +020030#endif
Damiend276f632013-10-22 16:05:47 +010031
Paul Sokolovskye85c3892013-12-30 03:38:32 +020032#define BYTES_PER_WORD sizeof(machine_int_t)
33
Damienc025ebb2013-10-12 14:30:21 +010034typedef void *machine_ptr_t; // must be of pointer size
Damiend99b0522013-12-21 18:17:45 +000035typedef const void *machine_const_ptr_t; // must be of pointer size
Damienc025ebb2013-10-12 14:30:21 +010036typedef double machine_float_t;
Damien087d2182013-11-09 20:14:30 +000037
38machine_float_t machine_sqrt(machine_float_t x);
Paul Sokolovsky910843e2014-02-14 12:02:34 +020039
40struct _mp_obj_fun_native_t;
41extern const struct _mp_obj_fun_native_t mp_builtin_open_obj;
42#define MICROPY_EXTRA_BUILTINS \
43 { MP_QSTR_open, (mp_obj_t)&mp_builtin_open_obj },