Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
1143e5e7
Commit
1143e5e7
authored
Jan 8, 2014
by
Damien George
Browse files
Options
Downloads
Plain Diff
Merge pull request #120 from dhylands/make-build-quieter
Make build output quieter.
parents
93a9b5b6
46468011
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
py/py.mk
+38
-7
38 additions, 7 deletions
py/py.mk
stm/Makefile
+20
-11
20 additions, 11 deletions
stm/Makefile
teensy/Makefile
+19
-10
19 additions, 10 deletions
teensy/Makefile
unix-cpy/Makefile
+7
-4
7 additions, 4 deletions
unix-cpy/Makefile
unix/Makefile
+7
-4
7 additions, 4 deletions
unix/Makefile
with
91 additions
and
36 deletions
py/py.mk
+
38
−
7
View file @
1143e5e7
##########
# The following should eventually go into a more central location
# when a reorg is done.
#
# Turn on increased build verbosity by defining BUILD_VERBOSE in your main
# Makefile or in your environment. You can also use V=1 on the make command
# line.
ifeq
("$(origin V)", "command line")
BUILD_VERBOSE
=
$(
V
)
endif
ifndef
BUILD_VERBOSE
BUILD_VERBOSE
=
0
endif
ifeq
($(BUILD_VERBOSE),0)
Q
=
@
else
Q
=
endif
# Since this is a new feature, advertise it
ifeq
($(BUILD_VERBOSE),0)
$(info
Use
make
V
=
1 or
set
BUILD_VERBOSE
in
your environment to increase build verbosity.
)
endif
#
#########
# default settings; can be overriden in main Makefile
ifndef
PY_SRC
...
...
@@ -11,7 +36,7 @@ endif
# to create the build directory
$(BUILD)
:
mkdir
-p
$@
$(
Q
)
mkdir
-p
$@
# where py object files go (they have a name prefix to prevent filename clashes)
...
...
@@ -80,24 +105,30 @@ PY_O_BASENAME = \
PY_O
=
$(
addprefix
$(
PY_BUILD
)
,
$(
PY_O_BASENAME
))
$(PY_BUILD)emitnx64.o
:
$(PY_SRC)/emitnative.c $(PY_SRC)/emit.h mpconfigport.h
$(
CC
)
$(
CFLAGS
)
-DN_X64
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-DN_X64
-c
-o
$@
$<
$(PY_BUILD)emitnthumb.o
:
$(PY_SRC)/emitnative.c $(PY_SRC)/emit.h mpconfigport.h
$(
CC
)
$(
CFLAGS
)
-DN_THUMB
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-DN_THUMB
-c
-o
$@
$<
$(PY_BUILD)%.o
:
$(PY_SRC)/%.S
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(PY_BUILD)%.o
:
$(PY_SRC)/%.c mpconfigport.h
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
# optimising gc for speed; 5ms down to 4ms on pybv2
$(PY_BUILD)gc.o
:
$(PY_SRC)/gc.c
$(
CC
)
$(
CFLAGS
)
-O3
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-O3
-c
-o
$@
$<
# optimising vm for speed, adds only a small amount to code size but makes a huge difference to speed (20% faster)
$(PY_BUILD)vm.o
:
$(PY_SRC)/vm.c
$(
CC
)
$(
CFLAGS
)
-O3
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-O3
-c
-o
$@
$<
# header dependencies
...
...
This diff is collapsed.
Click to expand it.
stm/Makefile
+
20
−
11
View file @
1143e5e7
...
...
@@ -6,6 +6,7 @@ include ../py/py.mk
# program for deletion
RM
=
/bin/rm
ECHO
=
@echo
STMSRC
=
lib
#STMOTGSRC=lib-otg
...
...
@@ -115,35 +116,43 @@ OBJ = $(addprefix $(BUILD)/, $(SRC_C:.c=.o) $(SRC_S:.s=.o) $(SRC_FATFS:.c=.o) $(
all2
:
$(BUILD) $(BUILD)/flash.dfu
$(BUILD)/flash.dfu
:
$(BUILD)/flash0.bin $(BUILD)/flash1.bin
python
$(
DFU
)
-b
0x08000000:
$(
BUILD
)
/flash0.bin
-b
0x08020000:
$(
BUILD
)
/flash1.bin
$@
$(
ECHO
)
"Create
$@
"
$(
Q
)
python
$(
DFU
)
-b
0x08000000:
$(
BUILD
)
/flash0.bin
-b
0x08020000:
$(
BUILD
)
/flash1.bin
$@
$(BUILD)/flash0.bin
:
$(BUILD)/flash.elf
$(
OBJCOPY
)
-O
binary
-j
.isr_vector
$^
$@
$(
Q
)
$(
OBJCOPY
)
-O
binary
-j
.isr_vector
$^
$@
$(BUILD)/flash1.bin
:
$(BUILD)/flash.elf
$(
OBJCOPY
)
-O
binary
-j
.text
-j
.data
$^
$@
$(
Q
)
$(
OBJCOPY
)
-O
binary
-j
.text
-j
.data
$^
$@
$(BUILD)/flash.elf
:
$(OBJ)
$(
LD
)
$(
LDFLAGS
)
-o
$@
$(
OBJ
)
$(
SIZE
)
$@
$(
ECHO
)
"LINK
$@
"
$(
Q
)$(
LD
)
$(
LDFLAGS
)
-o
$@
$(
OBJ
)
$(
Q
)$(
SIZE
)
$@
$(BUILD)/%.o
:
%.s
$(
AS
)
-o
$@
$<
$(
ECHO
)
"AS
$<
"
$(
Q
)$(
AS
)
-o
$@
$<
$(BUILD)/%.o
:
%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/%.o
:
$(FATFSSRC)/%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/%.o
:
$(STMSRC)/%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
#$(BUILD)/%.o: $(STMOTGSRC)/%.c
# $(CC) $(CFLAGS) -c -o $@ $<
# $(ECHO) "CC $<"
# $(Q)$(CC) $(CFLAGS) -c -o $@ $<
$(BUILD)/%.o
:
$(CC3KSRC)/%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
clean
:
$(
RM
)
-rf
$(
BUILD
)
...
...
This diff is collapsed.
Click to expand it.
teensy/Makefile
+
19
−
10
View file @
1143e5e7
...
...
@@ -6,6 +6,7 @@ include ../py/py.mk
# program for deletion
RM
=
/bin/rm
ECHO
=
@echo
ifeq
($(ARDUINO),)
$(
error
Please define ARDUINO
(
where TeensyDuino is installed
))
...
...
@@ -62,35 +63,43 @@ all2: $(BUILD) hex
hex
:
$(BUILD)/flash.hex
post_compile
:
$(BUILD)/flash.hex
$(
TOOLS_PATH
)
/teensy_post_compile
-file
=
"
$(
basename
$<
)
"
-path
=
"
$(
BUILD
)
"
-tools
=
"
$(
TOOLS_PATH
)
"
$(
ECHO
)
"Preparing
$@
for upload"
$(
Q
)$(
TOOLS_PATH
)
/teensy_post_compile
-file
=
"
$(
basename
$(
<F
))
"
-path
=
"
$(
<D
)
"
-tools
=
"
$(
TOOLS_PATH
)
"
reboot
:
-$(
TOOLS_PATH
)
/teensy_reboot
$(
ECHO
)
"REBOOT"
-$(
Q
)$(
TOOLS_PATH
)
/teensy_reboot
upload
:
post_compile reboot
$(BUILD)/flash.elf
:
$(OBJ)
$(
CC
)
$(
LDFLAGS
)
-o
"
$@
"
-Wl
,-Map,
$(
@:.elf
=
.map
)
$(
OBJ
)
$(
LIBS
)
$(
SIZE
)
$@
$(
ECHO
)
"LINK
$<
"
$(
Q
)$(
CC
)
$(
LDFLAGS
)
-o
"
$@
"
-Wl
,-Map,
$(
@:.elf
=
.map
)
$(
OBJ
)
$(
LIBS
)
$(
Q
)$(
SIZE
)
$@
$(BUILD)/%.hex
:
$(BUILD)/%.elf
$(
OBJCOPY
)
-O
ihex
-R
.eeprom
"
$<
"
"
$@
"
$(
ECHO
)
"HEX
$<
"
$(
Q
)$(
OBJCOPY
)
-O
ihex
-R
.eeprom
"
$<
"
"
$@
"
$(BUILD)/%.o
:
%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/%.o
:
../stm/%.s
$(
AS
)
-o
$@
$<
$(
ECHO
)
"AS
$<
"
$(
Q
)$(
AS
)
-o
$@
$<
$(BUILD)/%.o
:
../stm/%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/%.o
:
$(CORE_PATH)/%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/main.o
:
mpconfigport.h
clean
:
/bin/rm
-rf
$(
BUILD
)
$(
RM
)
-rf
$(
BUILD
)
.PHONY
:
all all2 clean
This diff is collapsed.
Click to expand it.
unix-cpy/Makefile
+
7
−
4
View file @
1143e5e7
...
...
@@ -7,6 +7,7 @@ include ../py/py.mk
# program for deletion
RM
=
/bin/rm
ECHO
=
@echo
# compiler settings
CC
=
gcc
...
...
@@ -21,12 +22,14 @@ OBJ = $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) $(PY_O)
LIB
=
$(PROG)
:
$(BUILD) $(OBJ)
$(
CC
)
-o
$@
$(
OBJ
)
$(
LIB
)
$(
LDFLAGS
)
strip
$(
PROG
)
size
$(
PROG
)
$(
ECHO
)
"LINK
$<
"
$(
Q
)$(
CC
)
-o
$@
$(
OBJ
)
$(
LIB
)
$(
LDFLAGS
)
$(
Q
)
strip
$(
PROG
)
$(
Q
)
size
$(
PROG
)
$(BUILD)/%.o
:
%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/main.o
:
mpconfigport.h
...
...
This diff is collapsed.
Click to expand it.
unix/Makefile
+
7
−
4
View file @
1143e5e7
...
...
@@ -7,6 +7,7 @@ include ../py/py.mk
# program for deletion
RM
=
/bin/rm
ECHO
=
@echo
# compiler settings
CC
=
gcc
...
...
@@ -24,12 +25,14 @@ LIB = -lreadline
#LIB += -ltermcap
$(PROG)
:
$(BUILD) $(OBJ)
$(
CC
)
-o
$@
$(
OBJ
)
$(
LIB
)
$(
LDFLAGS
)
strip
$(
PROG
)
size
$(
PROG
)
$(
ECHO
)
"LINK
$<
"
$(
Q
)$(
CC
)
-o
$@
$(
OBJ
)
$(
LIB
)
$(
LDFLAGS
)
$(
Q
)
strip
$(
PROG
)
$(
Q
)
size
$(
PROG
)
$(BUILD)/%.o
:
%.c
$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(
ECHO
)
"CC
$<
"
$(
Q
)$(
CC
)
$(
CFLAGS
)
-c
-o
$@
$<
$(BUILD)/main.o
:
mpconfigport.h
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment