root / Makefile.target @ feature-archipelago
History | View | Annotate | Download (5.4 kB)
1 | 562593aa | Anthony Liguori | # -*- Mode: makefile -*- |
---|---|---|---|
2 | 562593aa | Anthony Liguori | |
3 | deed3ccf | Juan Quintela | include ../config-host.mak |
4 | 25be210f | Juan Quintela | include config-target.mak |
5 | f3aa844b | Paolo Bonzini | include config-devices.mak |
6 | 17759187 | aliguori | include $(SRC_PATH)/rules.mak |
7 | 626df76a | bellard | |
8 | fec90ff0 | Paolo Bonzini | $(call set-vpath, $(SRC_PATH)) |
9 | af2be207 | Jan Kiszka | ifdef CONFIG_LINUX |
10 | af2be207 | Jan Kiszka | QEMU_CFLAGS += -I../linux-headers |
11 | af2be207 | Jan Kiszka | endif |
12 | fec90ff0 | Paolo Bonzini | QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target-$(TARGET_BASE_ARCH) -DNEED_CPU_H |
13 | 40293e58 | bellard | |
14 | 2f28d2ff | Anthony Liguori | QEMU_CFLAGS+=-I$(SRC_PATH)/include |
15 | 2f28d2ff | Anthony Liguori | |
16 | 40293e58 | bellard | ifdef CONFIG_USER_ONLY |
17 | 40293e58 | bellard | # user emulator name |
18 | c1799a84 | Paolo Bonzini | QEMU_PROG=qemu-$(TARGET_NAME) |
19 | 40293e58 | bellard | else |
20 | 1e43adfc | bellard | # system emulator name |
21 | c12915e6 | Paolo Bonzini | ifneq (,$(findstring -mwindows,$(libs_softmmu))) |
22 | 0fa5491e | Stefan Weil | # Terminate program name with a 'w' because the linker builds a windows executable. |
23 | c1799a84 | Paolo Bonzini | QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF) |
24 | 0fa5491e | Stefan Weil | endif # windows executable |
25 | c1799a84 | Paolo Bonzini | QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF) |
26 | a541f297 | bellard | endif |
27 | 626df76a | bellard | |
28 | 40293e58 | bellard | PROGS=$(QEMU_PROG) |
29 | 0fa5491e | Stefan Weil | ifdef QEMU_PROGW |
30 | 0fa5491e | Stefan Weil | PROGS+=$(QEMU_PROGW) |
31 | 0fa5491e | Stefan Weil | endif |
32 | b8841706 | Peter Maydell | STPFILES= |
33 | 626df76a | bellard | |
34 | 91880d96 | Juan Quintela | config-target.h: config-target.h-timestamp |
35 | 91880d96 | Juan Quintela | config-target.h-timestamp: config-target.mak |
36 | 91880d96 | Juan Quintela | |
37 | 6d8a764e | Lluís | ifdef CONFIG_TRACE_SYSTEMTAP |
38 | c14518e9 | Alon Levy | stap: $(QEMU_PROG).stp-installed $(QEMU_PROG).stp |
39 | c276b17d | Daniel P. Berrange | |
40 | c276b17d | Daniel P. Berrange | ifdef CONFIG_USER_ONLY |
41 | c276b17d | Daniel P. Berrange | TARGET_TYPE=user |
42 | c276b17d | Daniel P. Berrange | else |
43 | c276b17d | Daniel P. Berrange | TARGET_TYPE=system |
44 | c276b17d | Daniel P. Berrange | endif |
45 | c276b17d | Daniel P. Berrange | |
46 | c14518e9 | Alon Levy | $(QEMU_PROG).stp-installed: $(SRC_PATH)/trace-events |
47 | c0424934 | Lluís Vilanova | $(call quiet-command,$(TRACETOOL) \ |
48 | 650ab98d | Lluís Vilanova | --format=stap \ |
49 | 650ab98d | Lluís Vilanova | --backend=$(TRACE_BACKEND) \ |
50 | 650ab98d | Lluís Vilanova | --binary=$(bindir)/$(QEMU_PROG) \ |
51 | b9a7b74f | Paolo Bonzini | --target-name=$(TARGET_NAME) \ |
52 | 650ab98d | Lluís Vilanova | --target-type=$(TARGET_TYPE) \ |
53 | c14518e9 | Alon Levy | < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp-installed") |
54 | c14518e9 | Alon Levy | |
55 | c14518e9 | Alon Levy | $(QEMU_PROG).stp: $(SRC_PATH)/trace-events |
56 | c14518e9 | Alon Levy | $(call quiet-command,$(TRACETOOL) \ |
57 | c14518e9 | Alon Levy | --format=stap \ |
58 | c14518e9 | Alon Levy | --backend=$(TRACE_BACKEND) \ |
59 | c14518e9 | Alon Levy | --binary=$(realpath .)/$(QEMU_PROG) \ |
60 | b9a7b74f | Paolo Bonzini | --target-name=$(TARGET_NAME) \ |
61 | c14518e9 | Alon Levy | --target-type=$(TARGET_TYPE) \ |
62 | aaf821fd | Paolo Bonzini | < $< > $@," GEN $(TARGET_DIR)$(QEMU_PROG).stp") |
63 | c14518e9 | Alon Levy | |
64 | c276b17d | Daniel P. Berrange | else |
65 | c276b17d | Daniel P. Berrange | stap: |
66 | c276b17d | Daniel P. Berrange | endif |
67 | c276b17d | Daniel P. Berrange | |
68 | c276b17d | Daniel P. Berrange | all: $(PROGS) stap |
69 | 91880d96 | Juan Quintela | |
70 | c2fb2637 | Paul Brook | # Dummy command so that make thinks it has done something |
71 | c2fb2637 | Paul Brook | @true |
72 | 626df76a | bellard | |
73 | 40293e58 | bellard | ######################################################### |
74 | 626df76a | bellard | # cpu emulator library |
75 | fbe37ef3 | Paolo Bonzini | obj-y = exec.o translate-all.o cpu-exec.o |
76 | 9cdc8df3 | Paolo Bonzini | obj-y += tcg/tcg.o tcg/optimize.o |
77 | 9cdc8df3 | Paolo Bonzini | obj-$(CONFIG_TCG_INTERPRETER) += tci.o |
78 | 50348333 | Stefan Weil | obj-$(CONFIG_TCG_INTERPRETER) += disas/tci.o |
79 | 9cdc8df3 | Paolo Bonzini | obj-y += fpu/softfloat.o |
80 | 5e8861a0 | Paolo Bonzini | obj-y += target-$(TARGET_BASE_ARCH)/ |
81 | 76cad711 | Paolo Bonzini | obj-y += disas.o |
82 | b77abd95 | Ákos Kovács | obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o |
83 | cf01ba9e | Ákos Kovács | obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o |
84 | 5e8861a0 | Paolo Bonzini | |
85 | 40293e58 | bellard | ######################################################### |
86 | 40293e58 | bellard | # Linux user emulator target |
87 | 40293e58 | bellard | |
88 | 40293e58 | bellard | ifdef CONFIG_LINUX_USER |
89 | 40293e58 | bellard | |
90 | c3109ba1 | Mike Frysinger | QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) -I$(SRC_PATH)/linux-user |
91 | 1c872672 | Juan Quintela | |
92 | 7fc5152c | Paolo Bonzini | obj-y += linux-user/ |
93 | 8a090705 | Paolo Bonzini | obj-y += gdbstub.o thunk.o user-exec.o |
94 | 40293e58 | bellard | |
95 | 40293e58 | bellard | endif #CONFIG_LINUX_USER |
96 | 40293e58 | bellard | |
97 | 40293e58 | bellard | ######################################################### |
98 | 84778508 | blueswir1 | # BSD user emulator target |
99 | 84778508 | blueswir1 | |
100 | 84778508 | blueswir1 | ifdef CONFIG_BSD_USER |
101 | 84778508 | blueswir1 | |
102 | b9a7b74f | Paolo Bonzini | QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ABI_DIR) |
103 | 84778508 | blueswir1 | |
104 | 7fc5152c | Paolo Bonzini | obj-y += bsd-user/ |
105 | 8a090705 | Paolo Bonzini | obj-y += gdbstub.o user-exec.o |
106 | 84778508 | blueswir1 | |
107 | 84778508 | blueswir1 | endif #CONFIG_BSD_USER |
108 | 84778508 | blueswir1 | |
109 | 84778508 | blueswir1 | ######################################################### |
110 | 40293e58 | bellard | # System emulator target |
111 | 76dfdd24 | Juan Quintela | ifdef CONFIG_SOFTMMU |
112 | fbe37ef3 | Paolo Bonzini | obj-y += arch_init.o cpus.o monitor.o gdbstub.o balloon.o ioport.o |
113 | 872536bf | Andreas Färber | obj-y += qtest.o |
114 | c353f261 | Paolo Bonzini | obj-y += hw/ |
115 | 320ba5fe | Paolo Bonzini | obj-$(CONFIG_FDT) += device_tree.o |
116 | fbe37ef3 | Paolo Bonzini | obj-$(CONFIG_KVM) += kvm-all.o |
117 | 0cac1b66 | Blue Swirl | obj-y += memory.o savevm.o cputlb.o |
118 | c22d8e04 | Andreas Färber | obj-y += memory_mapping.o |
119 | 2a78636b | Andreas Färber | obj-y += dump.o |
120 | f544a488 | Paolo Bonzini | LIBS+=$(libs_softmmu) |
121 | 4fb240a4 | bellard | |
122 | 3285cf4f | Anthony PERARD | # xen support |
123 | c353f261 | Paolo Bonzini | obj-$(CONFIG_XEN) += xen-all.o xen-mapcache.o |
124 | cf01ba9e | Ákos Kovács | obj-$(call lnot,$(CONFIG_XEN)) += xen-stub.o |
125 | 3285cf4f | Anthony PERARD | |
126 | a541f297 | bellard | # Hardware support |
127 | b9a7b74f | Paolo Bonzini | ifeq ($(TARGET_NAME), sparc64) |
128 | 5e8861a0 | Paolo Bonzini | obj-y += hw/sparc64/ |
129 | 3475187d | bellard | else |
130 | 5e8861a0 | Paolo Bonzini | obj-y += hw/$(TARGET_BASE_ARCH)/ |
131 | 9637443f | Juan Quintela | endif |
132 | 9637443f | Juan Quintela | |
133 | 4115852b | Paolo Bonzini | GENERATED_HEADERS += hmp-commands.h qmp-commands-old.h |
134 | 0e8c9214 | Andreas Färber | |
135 | 76dfdd24 | Juan Quintela | endif # CONFIG_SOFTMMU |
136 | 00a67ba1 | bellard | |
137 | cbdd1999 | Paolo Bonzini | # Workaround for http://gcc.gnu.org/PR55489, see configure. |
138 | cbdd1999 | Paolo Bonzini | %/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS) |
139 | cbdd1999 | Paolo Bonzini | |
140 | ba1183da | Fam Zheng | dummy := $(call unnest-vars,,obj-y) |
141 | 99100dc3 | Paolo Bonzini | |
142 | ba1183da | Fam Zheng | # we are making another call to unnest-vars with different vars, protect obj-y, |
143 | ba1183da | Fam Zheng | # it can be overriden in subdir Makefile.objs |
144 | ba1183da | Fam Zheng | obj-y-save := $(obj-y) |
145 | ba1183da | Fam Zheng | |
146 | ba1183da | Fam Zheng | block-obj-y := |
147 | ba1183da | Fam Zheng | common-obj-y := |
148 | 99100dc3 | Paolo Bonzini | include $(SRC_PATH)/Makefile.objs |
149 | cc475698 | Fam Zheng | dummy := $(call unnest-vars,.., \ |
150 | cc475698 | Fam Zheng | block-obj-y \ |
151 | cc475698 | Fam Zheng | block-obj-m \ |
152 | cc475698 | Fam Zheng | common-obj-y \ |
153 | cc475698 | Fam Zheng | common-obj-m) |
154 | ba1183da | Fam Zheng | |
155 | ba1183da | Fam Zheng | # Now restore obj-y |
156 | ba1183da | Fam Zheng | obj-y := $(obj-y-save) |
157 | 99100dc3 | Paolo Bonzini | |
158 | ba1183da | Fam Zheng | all-obj-y = $(obj-y) $(common-obj-y) |
159 | ba1183da | Fam Zheng | all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y) |
160 | 7fc5152c | Paolo Bonzini | |
161 | f544a488 | Paolo Bonzini | ifndef CONFIG_HAIKU |
162 | f544a488 | Paolo Bonzini | LIBS+=-lm |
163 | f544a488 | Paolo Bonzini | endif |
164 | f544a488 | Paolo Bonzini | |
165 | 0fa5491e | Stefan Weil | ifdef QEMU_PROGW |
166 | 0fa5491e | Stefan Weil | # The linker builds a windows executable. Make also a console executable. |
167 | 8a090705 | Paolo Bonzini | $(QEMU_PROGW): $(all-obj-y) ../libqemuutil.a ../libqemustub.a |
168 | 0fa5491e | Stefan Weil | $(call LINK,$^) |
169 | 0fa5491e | Stefan Weil | $(QEMU_PROG): $(QEMU_PROGW) |
170 | 0fa5491e | Stefan Weil | $(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)") |
171 | 0fa5491e | Stefan Weil | else |
172 | 8a090705 | Paolo Bonzini | $(QEMU_PROG): $(all-obj-y) ../libqemuutil.a ../libqemustub.a |
173 | e03b41d4 | Lluís | $(call LINK,$^) |
174 | 0fa5491e | Stefan Weil | endif |
175 | 16394485 | Juan Quintela | |
176 | 4c3b5a48 | Blue Swirl | gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/scripts/feature_to_c.sh |
177 | 4c3b5a48 | Blue Swirl | $(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/scripts/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@") |
178 | 56aebc89 | pbrook | |
179 | acd0a093 | Luiz Capitulino | hmp-commands.h: $(SRC_PATH)/hmp-commands.hx |
180 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
181 | 2313086a | Blue Swirl | |
182 | e3193601 | Anthony Liguori | qmp-commands-old.h: $(SRC_PATH)/qmp-commands.hx |
183 | 4c3b5a48 | Blue Swirl | $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $(TARGET_DIR)$@") |
184 | 2313086a | Blue Swirl | |
185 | 626df76a | bellard | clean: |
186 | b54fa7dd | Peter Maydell | rm -f *.a *~ $(PROGS) |
187 | b54fa7dd | Peter Maydell | rm -f $(shell find . -name '*.[od]') |
188 | e3193601 | Anthony Liguori | rm -f hmp-commands.h qmp-commands-old.h gdbstub-xml.c |
189 | 6d8a764e | Lluís | ifdef CONFIG_TRACE_SYSTEMTAP |
190 | c276b17d | Daniel P. Berrange | rm -f *.stp |
191 | c276b17d | Daniel P. Berrange | endif |
192 | 1e43adfc | bellard | |
193 | 5fafdf24 | ths | install: all |
194 | 9b14bb04 | bellard | ifneq ($(PROGS),) |
195 | 52ba784d | Hollis Blanchard | $(INSTALL) -m 755 $(PROGS) "$(DESTDIR)$(bindir)" |
196 | 52ba784d | Hollis Blanchard | ifneq ($(STRIP),) |
197 | 52ba784d | Hollis Blanchard | $(STRIP) $(patsubst %,"$(DESTDIR)$(bindir)/%",$(PROGS)) |
198 | 52ba784d | Hollis Blanchard | endif |
199 | 9b14bb04 | bellard | endif |
200 | 6d8a764e | Lluís | ifdef CONFIG_TRACE_SYSTEMTAP |
201 | 6aae2a2e | Eduardo Habkost | $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset" |
202 | c14518e9 | Alon Levy | $(INSTALL_DATA) $(QEMU_PROG).stp-installed "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset/$(QEMU_PROG).stp" |
203 | c276b17d | Daniel P. Berrange | endif |
204 | 626df76a | bellard | |
205 | 4115852b | Paolo Bonzini | GENERATED_HEADERS += config-target.h |
206 | 4115852b | Paolo Bonzini | Makefile: $(GENERATED_HEADERS) |