public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH/committed 1/5] sim: ppc: move main.o compilation to top-level
@ 2024-01-03  6:21 Mike Frysinger
  2024-01-03  6:21 ` [PATCH/committed 2/5] sim: ppc: move libsim.a creation " Mike Frysinger
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mike Frysinger @ 2024-01-03  6:21 UTC (permalink / raw)
  To: gdb-patches

---
 sim/Makefile.in     | 27 +++++++++++++++++++--------
 sim/ppc/Makefile.in |  9 +--------
 sim/ppc/local.mk    | 19 +++++++++++++------
 3 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in
index 68be55597497..7841e75d4ce8 100644
--- a/sim/ppc/Makefile.in
+++ b/sim/ppc/Makefile.in
@@ -100,7 +100,7 @@ BFD_LIB		= ../../bfd/libbfd.la
 
 TARGETLIB	= libsim.a
 
-all:	main.o $(TARGETLIB) $(GDB_OBJ)
+all:	$(TARGETLIB) $(GDB_OBJ)
 
 .c.o:
 	$(ECHO_CC) $(CC) -c $(STD_CFLAGS) $<
@@ -388,11 +388,6 @@ LIB_SRC = \
 	$(HW_SRC) \
 	$(LIB_INLINE_SRC)
 
-MAIN_SRC = \
-	main.c \
-	gdb-sim.c \
-	sim_calls.c
-
 COMMON_OBJS_NAMES = \
 	callback.o \
 	target-newlib-errno.o \
@@ -495,8 +490,6 @@ gdb-sim.o: gdb-sim.c $(PSIM_H)  $(OPTIONS_H) $(REGISTERS_H) $(GDB_REMOTE_SIM_H)
 
 spreg.o: spreg.c $(BASICS_H) $(SPREG_H)
 
-main.o: main.c $(PSIM_H) $(OPTIONS_H) $(DEVICE_H) $(EVENTS_H) $(BFD_H) $(GDB_CALLBACK_H) $(GDB_REMOTE_SIM_H)
-
 device.o: device.c $(DEVICE_TABLE_H) $(CAP_H) $(EVENTS_H) $(PSIM_H)
 
 tree.o: tree.c $(BASICS_H) $(DEVICE_H) $(TREE_H)
diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk
index 155d83a9470a..3c36b60df5a4 100644
--- a/sim/ppc/local.mk
+++ b/sim/ppc/local.mk
@@ -15,9 +15,20 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-%C%_run_SOURCES =
+AM_CPPFLAGS_%C% = \
+	-DHAVE_COMMON_FPU \
+	$(sim_ppc_smp) \
+	$(sim_ppc_xor_endian) \
+	$(sim_ppc_bitsize) \
+	$(sim_ppc_timebase) \
+	$(sim_ppc_float) \
+	$(sim_ppc_monitor) \
+	$(sim_ppc_model) $(sim_ppc_default_model) $(sim_ppc_model_issue) \
+	$(sim_ppc_switch)
+
+%C%_run_SOURCES = \
+	%D%/main.c
 %C%_run_LDADD = \
-	%D%/main.o \
 	%D%/libsim.a \
 	$(SIM_COMMON_LIBS)
 
@@ -27,10 +38,6 @@ SIM_ALL_RECURSIVE_DEPS += common/libcommon.a
 %D%/libsim.a: common/libcommon.a
 	$(AM_V_at)$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
 
-## Helper targets for running make from the top-level due to run's sis.o.
-%D%/main.o: %D%/%.o: %D%/%.c | %D%/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
-	$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
-
 noinst_PROGRAMS += %D%/run
 
 SIM_ALL_RECURSIVE_DEPS += %D%/defines.h
-- 
2.43.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-01-03  6:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-03  6:21 [PATCH/committed 1/5] sim: ppc: move main.o compilation to top-level Mike Frysinger
2024-01-03  6:21 ` [PATCH/committed 2/5] sim: ppc: move libsim.a creation " Mike Frysinger
2024-01-03  6:21 ` [PATCH/committed 3/5] sim: drop support for automatic subdir recursion Mike Frysinger
2024-01-03  6:21 ` [PATCH/committed 4/5] sim: ppc: hoist compilation up to top-level Mike Frysinger
2024-01-03  6:21 ` [PATCH/committed 5/5] sim: drop support for recursive makes entirely Mike 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).