Revision a558ee17 Makefile.target

b/Makefile.target
3 3

  
4 4
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
5 5
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
6
CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
6
QEMU_CFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H
7 7

  
8 8
ifdef CONFIG_USER_ONLY
9 9
# user emulator name
......
26 26
endif
27 27

  
28 28
ifeq ($(subst ppc64,ppc,$(ARCH))$(TARGET_BASE_ARCH),ppcppc)
29
translate.o: CFLAGS := $(CFLAGS) $(call cc-option, $(CFLAGS), -fno-unit-at-a-time,)
29
translate.o: QEMU_CFLAGS := $(QEMU_CFLAGS) $(call cc-option, $(QEMU_CFLAGS), -fno-unit-at-a-time,)
30 30
endif
31 31

  
32 32
ifeq ($(ARCH),sparc)
......
37 37

  
38 38
ifeq ($(ARCH),alpha)
39 39
# Ensure there's only a single GP
40
CFLAGS+=-msmall-data
40
QEMU_CFLAGS+=-msmall-data
41 41
endif
42 42

  
43 43
ifeq ($(ARCH),ia64)
44
CFLAGS+=-mno-sdata
44
QEMU_CFLAGS+=-mno-sdata
45 45
endif
46 46

  
47
CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
48
CPPFLAGS+=-U_FORTIFY_SOURCE
47
QEMU_CFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
48
QEMU_CFLAGS+=-U_FORTIFY_SOURCE
49 49
LIBS+=-lm
50 50
ifdef CONFIG_SOLARIS
51 51
ifdef CONFIG_NEEDS_LIBSUNMATH
52 52
LIBS+=-lsunmath
53 53
LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib
54
CFLAGS+=-I/opt/SUNWspro/prod/include/cc
54
QEMU_CFLAGS+=-I/opt/SUNWspro/prod/include/cc
55 55
endif
56 56
endif
57 57

  
58
kvm.o: CFLAGS+=$(KVM_CFLAGS)
59
kvm-all.o: CFLAGS+=$(KVM_CFLAGS)
58
kvm.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
59
kvm-all.o: QEMU_CFLAGS+=$(KVM_CFLAGS)
60 60

  
61 61
all: $(PROGS)
62 62
# Dummy command so that make thinks it has done something
......
68 68
libobj-$(CONFIG_KQEMU) += kqemu.o
69 69
# TCG code generator
70 70
libobj-y += tcg/tcg.o tcg/tcg-runtime.o
71
CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
71
QEMU_CFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH)
72 72
ifeq ($(ARCH),sparc64)
73
CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc
73
QEMU_CFLAGS+=-I$(SRC_PATH)/tcg/sparc
74 74
endif
75 75
ifdef CONFIG_SOFTFLOAT
76 76
libobj-y += fpu/softfloat.o
77 77
else
78 78
libobj-y += fpu/softfloat-native.o
79 79
endif
80
CPPFLAGS+=-I$(SRC_PATH)/fpu
80
QEMU_CFLAGS+=-I$(SRC_PATH)/fpu
81 81
libobj-y += op_helper.o helper.o
82 82

  
83 83
ifeq ($(TARGET_BASE_ARCH), arm)
......
151 151

  
152 152
# HELPER_CFLAGS is used for all the code compiled with static register
153 153
# variables
154
op_helper.o: CFLAGS += $(HELPER_CFLAGS)
154
op_helper.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
155 155

  
156
cpu-exec.o: CFLAGS += $(HELPER_CFLAGS)
156
cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
157 157

  
158 158
#########################################################
159 159
# Linux user emulator target
......
161 161
ifdef CONFIG_LINUX_USER
162 162

  
163 163
VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
164
CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
164
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
165 165

  
166 166
# profiling code
167 167
ifdef TARGET_GPROF
168 168
LDFLAGS+=-p
169
CFLAGS+=-p
169
QEMU_CFLAGS+=-p
170 170
endif
171 171

  
172 172
obj-y = main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \
......
192 192

  
193 193
# Note: this is a workaround. The real fix is to avoid compiling
194 194
# cpu_signal_handler() in cpu-exec.c.
195
signal.o: CFLAGS += $(HELPER_CFLAGS)
195
signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
196 196

  
197 197
ARLIBS=../libqemu_user.a libqemu.a
198 198
endif #CONFIG_LINUX_USER
......
203 203
ifdef CONFIG_DARWIN_USER
204 204

  
205 205
VPATH+=:$(SRC_PATH)/darwin-user
206
CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
206
QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
207 207

  
208 208
# Leave some space for the regular program loading zone
209 209
LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
......
215 215

  
216 216
# Note: this is a workaround. The real fix is to avoid compiling
217 217
# cpu_signal_handler() in cpu-exec.c.
218
signal.o: CFLAGS += $(HELPER_CFLAGS)
218
signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
219 219

  
220 220
ARLIBS=libqemu.a
221 221

  
......
227 227
ifdef CONFIG_BSD_USER
228 228

  
229 229
VPATH+=:$(SRC_PATH)/bsd-user
230
CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
230
QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
231 231

  
232 232
obj-y = main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o \
233 233
        gdbstub.o gdbstub-xml.o ioport-user.o
......
235 235

  
236 236
# Note: this is a workaround. The real fix is to avoid compiling
237 237
# cpu_signal_handler() in cpu-exec.c.
238
signal.o: CFLAGS += $(HELPER_CFLAGS)
238
signal.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
239 239

  
240 240
ARLIBS=libqemu.a ../libqemu_user.a
241 241

  
......
281 281
sound-obj-$(CONFIG_CS4231A) += cs4231a.o
282 282

  
283 283
ifdef CONFIG_ADLIB
284
adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0
284
adlib.o fmopl.o: QEMU_CFLAGS := ${QEMU_CFLAGS} -DBUILD_Y8950=0
285 285
endif
286 286

  
287 287
ifdef CONFIG_VNC_TLS
288
CPPFLAGS += $(VNC_TLS_CFLAGS)
288
QEMU_CFLAGS += $(VNC_TLS_CFLAGS)
289 289
LIBS += $(VNC_TLS_LIBS)
290 290
endif
291 291

  
292 292
ifdef CONFIG_VNC_SASL
293
CPPFLAGS += $(VNC_SASL_CFLAGS)
293
QEMU_CFLAGS += $(VNC_SASL_CFLAGS)
294 294
LIBS += $(VNC_SASL_LIBS)
295 295
endif
296 296

  
......
325 325
obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o
326 326

  
327 327
ifeq ($(TARGET_BASE_ARCH), i386)
328
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
328
QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
329 329
endif
330 330

  
331 331
# shared objects
......
347 347
obj-ppc-$(CONFIG_KVM) += kvm_ppc.o
348 348

  
349 349
ifeq ($(TARGET_BASE_ARCH), ppc)
350
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
350
QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
351 351
endif
352 352

  
353 353
obj-ppc-$(CONFIG_FDT) += device_tree.o
......
363 363
obj-mips-y += vmware_vga.o
364 364

  
365 365
ifeq ($(TARGET_BASE_ARCH), mips)
366
CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
366
QEMU_CFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE
367 367
endif
368 368

  
369 369
obj-microblaze-y = petalogix_s3adsp1800_mmu.o
......
424 424
obj-arm-y += syborg_virtio.o
425 425

  
426 426
ifeq ($(TARGET_BASE_ARCH), arm)
427
CPPFLAGS += -DHAS_AUDIO
427
QEMU_CFLAGS += -DHAS_AUDIO
428 428
endif
429 429

  
430 430
obj-sh4-y = shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o
......
441 441
endif
442 442
endif
443 443
ifdef CONFIG_SLIRP
444
CPPFLAGS+=-I$(SRC_PATH)/slirp
444
QEMU_CFLAGS+=-I$(SRC_PATH)/slirp
445 445
endif
446 446

  
447 447
# specific flags are needed for non soft mmu emulator
......
455 455
endif
456 456
endif
457 457
ifdef TARGET_GPROF
458
vl.o: CFLAGS+=-p
458
vl.o: QEMU_CFLAGS+=-p
459 459
LDFLAGS+=-p
460 460
endif
461 461

  
......
470 470
# profiling code
471 471
ifdef TARGET_GPROF
472 472
LDFLAGS+=-p
473
main.o: CFLAGS+=-p
473
main.o: QEMU_CFLAGS+=-p
474 474
endif
475 475

  
476
vl.o: CFLAGS+=$(SDL_CFLAGS)
476
vl.o: QEMU_CFLAGS+=$(SDL_CFLAGS)
477 477

  
478 478
vl.o: qemu-options.h
479 479

  

Also available in: Unified diff