On 08.07.2025 13:46, Jahan Murudi wrote:
> --- a/tools/xentop/Makefile
> +++ b/tools/xentop/Makefile
> @@ -15,6 +15,7 @@ include $(XEN_ROOT)/tools/Rules.mk
>  
>  CFLAGS += -DGCC_PRINTF $(CFLAGS_libxenstat)
>  LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) 
> -lm
> +LDLIBS += $(LDLIBS_libxenctrl)
>  CFLAGS += -DHOST_$(XEN_OS)
>  
>  # Include configure output (config.h)
> @@ -25,8 +26,14 @@ TARGETS := xentop
>  .PHONY: all
>  all: $(TARGETS)
>  
> -xentop: xentop.o
> -     $(CC) $(LDFLAGS) -o $@ $< $(LDLIBS) $(APPEND_LDFLAGS)
> +xentop: xentop.o pcpu.o
> +     $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS)
> +
> +pcpu.o: pcpu.c pcpu.h
> +     $(CC) $(CFLAGS) -c $< -o $@
> +
> +%.o: %.c
> +     $(CC) $(CFLAGS) -c $< -o $@

As you mean to re-submit, you may also want to tidy (back) the above. You don't 
say
why you need to spell out both the explicit and the pattern rule here. And I 
don't
think this is actually necessary. All you ought to need is indeed the addition 
of
the extra prereq object file.

Jan

Reply via email to