Revision 4addb112 Makefile
b/Makefile | ||
---|---|---|
1 | 1 |
# Makefile for QEMU. |
2 | 2 |
|
3 | 3 |
GENERATED_HEADERS = config-host.h trace.h qemu-options.def |
4 |
ifeq ($(TRACE_BACKEND),dtrace) |
|
5 |
GENERATED_HEADERS += trace-dtrace.h |
|
6 |
endif |
|
4 | 7 |
|
5 | 8 |
ifneq ($(wildcard config-host.mak),) |
6 | 9 |
# Put the all: rule here so that config-host.mak can contain dependencies. |
... | ... | |
108 | 111 |
|
109 | 112 |
bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) |
110 | 113 |
|
114 |
ifeq ($(TRACE_BACKEND),dtrace) |
|
115 |
trace.h: trace.h-timestamp trace-dtrace.h |
|
116 |
else |
|
111 | 117 |
trace.h: trace.h-timestamp |
118 |
endif |
|
112 | 119 |
trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak |
113 | 120 |
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h") |
114 | 121 |
@cmp -s $@ trace.h || cp $@ trace.h |
... | ... | |
120 | 127 |
|
121 | 128 |
trace.o: trace.c $(GENERATED_HEADERS) |
122 | 129 |
|
130 |
trace-dtrace.h: trace-dtrace.dtrace |
|
131 |
$(call quiet-command,dtrace -o $@ -h -s $<, " GEN trace-dtrace.h") |
|
132 |
|
|
133 |
# Normal practice is to name DTrace probe file with a '.d' extension |
|
134 |
# but that gets picked up by QEMU's Makefile as an external dependancy |
|
135 |
# rule file. So we use '.dtrace' instead |
|
136 |
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp |
|
137 |
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak |
|
138 |
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace") |
|
139 |
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace |
|
140 |
|
|
141 |
trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS) |
|
142 |
$(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o") |
|
143 |
|
|
123 | 144 |
simpletrace.o: simpletrace.c $(GENERATED_HEADERS) |
124 | 145 |
|
125 | 146 |
version.o: $(SRC_PATH)/version.rc config-host.mak |
... | ... | |
157 | 178 |
rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d |
158 | 179 |
rm -f qemu-img-cmds.h |
159 | 180 |
rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp |
181 |
rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp |
|
182 |
rm -f trace-dtrace.h trace-dtrace.h-timestamp |
|
160 | 183 |
$(MAKE) -C tests clean |
161 | 184 |
for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \ |
162 | 185 |
if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ |
Also available in: Unified diff