public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] libgloss: add some objcopy/objdump build rules
@ 2024-01-20 1:26 Michael Frysinger
0 siblings, 0 replies; only message in thread
From: Michael Frysinger @ 2024-01-20 1:26 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=0714c6305adfb91b6560da03dc871a564450495c
commit 0714c6305adfb91b6560da03dc871a564450495c
Author: Mike Frysinger <vapier@gentoo.org>
Date: Fri Dec 29 01:51:27 2023 -0500
libgloss: add some objcopy/objdump build rules
A bunch of ports have manual rules to generate disassembly, srec, and
binary files from test programs. Add top-level pattern rules so every
test program gets this for free, and we don't have to duplicate it in
every subdir.
Diff:
---
libgloss/Makefile.am | 10 ++++++++++
libgloss/Makefile.in | 9 +++++++++
2 files changed, 19 insertions(+)
diff --git a/libgloss/Makefile.am b/libgloss/Makefile.am
index a8a445b1d..a035f8d8a 100644
--- a/libgloss/Makefile.am
+++ b/libgloss/Makefile.am
@@ -31,6 +31,16 @@ AM_CPPFLAGS = -idirafter $(srcroot)/include
noinst_LIBRARIES = libobjs.a
libobjs_a_SOURCES =
+## Some convenience rules for debugging programs.
+%.dis: %
+ $(AM_V_GEN)$(OBJDUMP) -d $< > $@
+%.bin: %
+ $(AM_V_GEN)$(OBJCOPY) -O binary $< $@
+%.hex: %
+ $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@
+%.srec: %
+ $(AM_V_GEN)$(OBJCOPY) -O srec $< $@
+
## These are roughly topologically sorted in order to make porting more
## streamlined.
FLAGS_TO_PASS = \
diff --git a/libgloss/Makefile.in b/libgloss/Makefile.in
index 6b8375745..eff98872c 100644
--- a/libgloss/Makefile.in
+++ b/libgloss/Makefile.in
@@ -5693,6 +5693,15 @@ uninstall-am: uninstall-aarch64_cpu_initcpuinitDATA \
.PRECIOUS: Makefile
+%.dis: %
+ $(AM_V_GEN)$(OBJDUMP) -d $< > $@
+%.bin: %
+ $(AM_V_GEN)$(OBJCOPY) -O binary $< $@
+%.hex: %
+ $(AM_V_GEN)$(OBJCOPY) -O ihex $< $@
+%.srec: %
+ $(AM_V_GEN)$(OBJCOPY) -O srec $< $@
+
# GNU Make needs to see an explicit $(MAKE) variable in the command it
# runs to enable its job server during parallel builds. Hence the
# comments below.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-20 1:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-20 1:26 [newlib-cygwin/main] libgloss: add some objcopy/objdump build rules Michael Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).