Skip to content

Commit b372bfc

Browse files
committed
Rename default config file to mpconfig.h, and port's to mpconfigport.h.
mpconfig.h will automatically pull mpconfigport.h.
1 parent ef18102 commit b372bfc

File tree

7 files changed

+18
-11
lines changed

7 files changed

+18
-11
lines changed

py/defaultconfig.h

Lines changed: 0 additions & 7 deletions
This file was deleted.

py/malloc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "misc.h"
55
#include "mpconfig.h"
6-
#include "defaultconfig.h"
76

87
#if MICROPY_MEM_STATS
98
static int total_bytes_allocated = 0;

py/mpconfig.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// This file contains default configuration settings for MicroPython.
2+
// You can override any of these options using mpconfigport.h file located
3+
// in a directory of your port.
4+
5+
#include <mpconfigport.h>
6+
7+
// Any options not explicitly set in mpconfigport.h will get default
8+
// values below.
9+
10+
// Whether to collect memory allocation stats
11+
#ifndef MICROPY_MEM_STATS
12+
#define MICROPY_MEM_STATS (1)
13+
#endif

stm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ $(BUILD)/%.o: $(PYSRC)/%.s
187187
$(BUILD)/%.o: $(PYSRC)/%.S
188188
$(CC) $(CFLAGS) -c -o $@ $<
189189

190-
$(BUILD)/%.o: $(PYSRC)/%.c mpconfig.h
190+
$(BUILD)/%.o: $(PYSRC)/%.c mpconfigport.h
191191
$(CC) $(CFLAGS) -c -o $@ $<
192192

193193
$(BUILD)/emitnthumb.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h

stm/mpconfig.h renamed to stm/mpconfigport.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <stdint.h>
2+
13
// options to control how Micro Python is built
24

35
#define MICROPY_ENABLE_FLOAT (1)

unix/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $(BUILD)/%.o: %.c
7979
$(BUILD)/%.o: $(PYSRC)/%.S
8080
$(CC) $(CFLAGS) -c -o $@ $<
8181

82-
$(BUILD)/%.o: $(PYSRC)/%.c mpconfig.h
82+
$(BUILD)/%.o: $(PYSRC)/%.c mpconfigport.h
8383
$(CC) $(CFLAGS) -c -o $@ $<
8484

8585
$(BUILD)/emitnx64.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h
@@ -92,7 +92,7 @@ $(BUILD)/emitnthumb.o: $(PYSRC)/emitnative.c $(PYSRC)/emit.h
9292
$(BUILD)/vm.o: $(PYSRC)/vm.c
9393
$(CC) $(CFLAGS) -O3 -c -o $@ $<
9494

95-
$(BUILD)/main.o: mpconfig.h
95+
$(BUILD)/main.o: mpconfigport.h
9696
$(BUILD)/parse.o: $(PYSRC)/grammar.h
9797
$(BUILD)/compile.o: $(PYSRC)/grammar.h
9898
$(BUILD)/emitcpy.o: $(PYSRC)/emit.h
File renamed without changes.

0 commit comments

Comments
 (0)