From b372bfca21ccab593359ef25a0a0c6bf697c8586 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 3 Jan 2014 17:15:53 +0200 Subject: Rename default config file to mpconfig.h, and port's to mpconfigport.h. mpconfig.h will automatically pull mpconfigport.h. --- unix/Makefile | 4 ++-- unix/mpconfig.h | 31 ------------------------------- unix/mpconfigport.h | 31 +++++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 unix/mpconfig.h create mode 100644 unix/mpconfigport.h (limited to 'unix') diff --git a/unix/Makefile b/unix/Makefile index 271cf2265..fd5b6b43e 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -79,7 +79,7 @@ $(BUILD)/%.o: %.c $(BUILD)/%.o: $(PYSRC)/%.S $(CC) $(CFLAGS) -c -o $@ $< -$(BUILD)/%.o: $(PYSRC)/%.c mpconfig.h +$(BUILD)/%.o: $(PYSRC)/%.c mpconfigport.h $(CC) $(CFLAGS) -c -o $@ $< $(BUILD)/emitnx64.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h @@ -92,7 +92,7 @@ $(BUILD)/emitnthumb.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h $(BUILD)/vm.o: $(PYSRC)/vm.c $(CC) $(CFLAGS) -O3 -c -o $@ $< -$(BUILD)/main.o: mpconfig.h +$(BUILD)/main.o: mpconfigport.h $(BUILD)/parse.o: $(PYSRC)/grammar.h $(BUILD)/compile.o: $(PYSRC)/grammar.h $(BUILD)/emitcpy.o: $(PYSRC)/emit.h diff --git a/unix/mpconfig.h b/unix/mpconfig.h deleted file mode 100644 index 3d0dc8a56..000000000 --- a/unix/mpconfig.h +++ /dev/null @@ -1,31 +0,0 @@ -// options to control how Micro Python is built - -#define MICROPY_ENABLE_FLOAT (1) -#define MICROPY_EMIT_CPYTHON (0) -#define MICROPY_EMIT_X64 (1) -#define MICROPY_EMIT_THUMB (0) -#define MICROPY_EMIT_INLINE_THUMB (0) - -// type definitions for the specific machine - -#ifdef __LP64__ -typedef long machine_int_t; // must be pointer size -typedef unsigned long machine_uint_t; // must be pointer size -#define UINT_FMT "%lu" -#define INT_FMT "%ld" -#else -// These are definitions for machines where sizeof(int) == sizeof(void*), -// regardless for actual size. -typedef int machine_int_t; // must be pointer size -typedef unsigned int machine_uint_t; // must be pointer size -#define UINT_FMT "%u" -#define INT_FMT "%d" -#endif - -#define BYTES_PER_WORD sizeof(machine_int_t) - -typedef void *machine_ptr_t; // must be of pointer size -typedef const void *machine_const_ptr_t; // must be of pointer size -typedef double machine_float_t; - -machine_float_t machine_sqrt(machine_float_t x); diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h new file mode 100644 index 000000000..3d0dc8a56 --- /dev/null +++ b/unix/mpconfigport.h @@ -0,0 +1,31 @@ +// options to control how Micro Python is built + +#define MICROPY_ENABLE_FLOAT (1) +#define MICROPY_EMIT_CPYTHON (0) +#define MICROPY_EMIT_X64 (1) +#define MICROPY_EMIT_THUMB (0) +#define MICROPY_EMIT_INLINE_THUMB (0) + +// type definitions for the specific machine + +#ifdef __LP64__ +typedef long machine_int_t; // must be pointer size +typedef unsigned long machine_uint_t; // must be pointer size +#define UINT_FMT "%lu" +#define INT_FMT "%ld" +#else +// These are definitions for machines where sizeof(int) == sizeof(void*), +// regardless for actual size. +typedef int machine_int_t; // must be pointer size +typedef unsigned int machine_uint_t; // must be pointer size +#define UINT_FMT "%u" +#define INT_FMT "%d" +#endif + +#define BYTES_PER_WORD sizeof(machine_int_t) + +typedef void *machine_ptr_t; // must be of pointer size +typedef const void *machine_const_ptr_t; // must be of pointer size +typedef double machine_float_t; + +machine_float_t machine_sqrt(machine_float_t x); -- cgit v1.2.3