build: move dtrace rules to rules.mak
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
2165588274
commit
2c13ec50e7
@ -23,6 +23,9 @@ QEMU_CFLAGS += -I$(<D) -I$(@D)
|
|||||||
ifeq ($(LIBTOOL),)
|
ifeq ($(LIBTOOL),)
|
||||||
%.lo: %.c
|
%.lo: %.c
|
||||||
@echo "missing libtool. please install and rerun configure"; exit 1
|
@echo "missing libtool. please install and rerun configure"; exit 1
|
||||||
|
%.lo: %.dtrace
|
||||||
|
@echo "missing libtool. please install and rerun configure."; exit 1
|
||||||
|
|
||||||
LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
|
LINK = $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
|
||||||
$(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
|
$(sort $(filter %.o, $1)) $(filter-out %.o, $1) \
|
||||||
$(LIBS)," LINK $(TARGET_DIR)$@")
|
$(LIBS)," LINK $(TARGET_DIR)$@")
|
||||||
@ -30,6 +33,9 @@ else
|
|||||||
LIBTOOL += $(if $(V),,--quiet)
|
LIBTOOL += $(if $(V),,--quiet)
|
||||||
%.lo: %.c
|
%.lo: %.c
|
||||||
$(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC $(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," lt CC $@")
|
$(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC $(CC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," lt CC $@")
|
||||||
|
%.lo: %.dtrace
|
||||||
|
$(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC dtrace -o $@ -G -s $<, " lt GEN $(TARGET_DIR)$@")
|
||||||
|
|
||||||
LINK = $(call quiet-command,\
|
LINK = $(call quiet-command,\
|
||||||
$(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
|
$(if $(filter %.lo %.la,$^),$(LIBTOOL) --mode=link --tag=CC \
|
||||||
)$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
|
)$(CC) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ \
|
||||||
@ -46,6 +52,9 @@ endif
|
|||||||
%.o: %.m
|
%.o: %.m
|
||||||
$(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@")
|
$(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@")
|
||||||
|
|
||||||
|
%.o: %.dtrace
|
||||||
|
$(call quiet-command,dtrace -o $@ -G -s $<, " GEN $(TARGET_DIR)$@")
|
||||||
|
|
||||||
%$(EXESUF): %.o
|
%$(EXESUF): %.o
|
||||||
$(call LINK,$^)
|
$(call LINK,$^)
|
||||||
|
|
||||||
|
@ -46,21 +46,9 @@ $(obj)/generated-tracers-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUI
|
|||||||
$(obj)/generated-tracers-dtrace.h: trace/generated-tracers-dtrace.dtrace
|
$(obj)/generated-tracers-dtrace.h: trace/generated-tracers-dtrace.dtrace
|
||||||
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@")
|
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN $@")
|
||||||
|
|
||||||
$(obj)/generated-tracers-dtrace.o: trace/generated-tracers-dtrace.dtrace
|
|
||||||
$(call quiet-command,dtrace -o $@ -G -s $<, " GEN $@")
|
|
||||||
|
|
||||||
trace-obj-$(CONFIG_TRACE_DTRACE) += generated-tracers-dtrace.o
|
trace-obj-$(CONFIG_TRACE_DTRACE) += generated-tracers-dtrace.o
|
||||||
|
|
||||||
|
|
||||||
ifeq ($(LIBTOOL),)
|
|
||||||
$(obj)/generated-tracers-dtrace.lo: $(obj)/generated-tracers-dtrace.dtrace
|
|
||||||
@echo "missing libtool. please install and rerun configure."; exit 1
|
|
||||||
else
|
|
||||||
$(obj)/generated-tracers-dtrace.lo: $(obj)/generated-tracers-dtrace.dtrace
|
|
||||||
$(call quiet-command,$(LIBTOOL) --mode=compile --tag=CC dtrace -o $@ -G -s $<, " lt GEN $@")
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################
|
######################################################################
|
||||||
# Backend code
|
# Backend code
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user