Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
f769b432
Commit
f769b432
authored
Aug 29, 2024
by
Damien George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qemu-arm/Makefile: Clean up SRC and OBJ variables.
Signed-off-by:
Damien George
<
damien@micropython.org
>
parent
dc9ecd58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
25 deletions
+9
-25
ports/qemu-arm/Makefile
ports/qemu-arm/Makefile
+9
-25
No files found.
ports/qemu-arm/Makefile
View file @
f769b432
...
...
@@ -51,7 +51,8 @@ endif
LDFLAGS
=
-T
$(LDSCRIPT)
--gc-sections
-Map
=
$
(
@:.elf
=
.map
)
LIBS
=
$(
shell
$(CC)
$(CFLAGS)
-print-libgcc-file-name
)
SRC_COMMON_C
=
\
SRC_C
=
\
main.c
\
startup.c
\
uart.c
\
mphalport.c
\
...
...
@@ -63,33 +64,16 @@ SRC_COMMON_C = \
shared/runtime/stdout_helpers.c
\
shared/runtime/sys_stdio_mphal.c
\
SRC_RUN_C
=
\
main.c
\
LIB_SRC_C
+=
$(SRC_LIB_LIBM_C)
LIB_SRC_C
+=
$(SRC_LIB_LIBM_SQRT_SW_C)
OBJ_COMMON
=
OBJ_COMMON
+=
$(PY_O)
OBJ_COMMON
+=
$(
addprefix
$(BUILD)
/,
$(SRC_COMMON_C:.c=.o)
)
OBJ_COMMON
+=
$(
addprefix
$(BUILD)
/,
$(SRC_BOARD_O)
)
OBJ_COMMON
+=
$(
addprefix
$(BUILD)
/,
$(LIB_SRC_C:.c=.o)
)
OBJ_RUN
=
OBJ_RUN
+=
$(
addprefix
$(BUILD)
/,
$(SRC_RUN_C:.c=.o)
)
ALL_OBJ_RUN
=
$(OBJ_COMMON)
$(OBJ_RUN)
OBJ_TEST
=
OBJ_TEST
+=
$(
addprefix
$(BUILD)
/,
$(SRC_TEST_C:.c=.o)
)
ALL_OBJ_TEST
=
$(OBJ_COMMON)
$(OBJ_TEST)
# All object files, needed to get dependencies correct
OBJ
=
$(OBJ_COMMON)
$(OBJ_RUN)
$(OBJ_TEST)
OBJ
+=
$(PY_O)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SRC_C:.c=.o)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(SRC_BOARD_O)
)
OBJ
+=
$(
addprefix
$(BUILD)
/,
$(LIB_SRC_C:.c=.o)
)
# List of sources for qstr extraction
SRC_QSTR
+=
$(SRC_C
OMMON_C)
$(SRC_RUN_C
)
$(LIB_SRC_C)
SRC_QSTR
+=
$(SRC_C)
$(LIB_SRC_C)
all
:
$(BUILD)/firmware.elf
...
...
@@ -108,8 +92,8 @@ test: $(BUILD)/firmware.elf
cd
$(TOP)
/tests
&&
./run-tests.py
--target
qemu-arm
--device
execpty:
"
$(QEMU_SYSTEM)
$(QEMU_ARGS)
-serial pty -kernel ../
$(DIRNAME)
/
$<
"
$(RUN_TESTS_ARGS)
$(RUN_TESTS_EXTRA)
## `$(LD)` doesn't seem to like `--specs` for some reason, but we can just use `$(CC)` here.
$(BUILD)/firmware.elf
:
$(LDSCRIPT) $(
ALL_OBJ_RUN
)
$(Q)$(LD)
$(LDFLAGS)
-o
$@
$(
ALL_OBJ_RUN
)
$(LIBS)
$(BUILD)/firmware.elf
:
$(LDSCRIPT) $(
OBJ
)
$(Q)$(LD)
$(LDFLAGS)
-o
$@
$(
OBJ
)
$(LIBS)
$(Q)$(SIZE)
$@
include
$(TOP)/py/mkrules.mk
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment