This is an internal developer target that isn't normally compiled,
but it can still be occasionally useful. Move it to the top-level
build so we can kill off common/Make-common.in.
$(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=)
$(AM_V_at)touch $@
+.PRECIOUS: %/test-hw-events.o
+%/test-hw-events.o: common/hw-events.c
+ $(AM_V_CC)$(COMPILE) -DMAIN -c -o $@ $<
+%/test-hw-events: %/test-hw-events.o %/libsim.a
+ $(AM_V_CCLD)$(LINK) -o $@ $^ $(SIM_COMMON_LIBS) $(LIBS)
+
# FIXME This is one very simple-minded way of generating the file hw-config.h.
%/hw-config.h: %/stamp-hw ; @true
%/stamp-hw: Makefile
override POSTCOMPILE =
endif
-test-hw-events: $(srccom)/hw-events.c libsim.a
- $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
- $(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \
- $(srccom)/hw-events.c libsim.a $(EXTRA_LIBS)
-
# Support targets.
install:
#include <stdarg.h>
#include <string.h>
+#include "sim/callback.h"
+
#include "hw-main.h"
#include "hw-base.h"
CLEANFILES += \
%D%/version.c %D%/version.c-stamp
+## NB: This is a bit of a hack. If we can generalize the common/ files, we can
+## turn this from an arch-specific %/test-hw-events into a common/test-hw-events
+## program.
+.PRECIOUS: %/test-hw-events.o
+%/test-hw-events.o: common/hw-events.c
+ $(AM_V_CC)$(COMPILE) -DMAIN -c -o $@ $<
+%/test-hw-events: %/test-hw-events.o %/libsim.a
+ $(AM_V_CCLD)$(LINK) -o $@ $^ $(SIM_COMMON_LIBS) $(LIBS)
+
##
## For subdirs.
##