Revision 076d2471

b/Makefile
24 24
.PHONY: all clean cscope distclean dvi html info install install-doc \
25 25
	recurse-all speed tar tarbin test build-all
26 26

  
27
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
27
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
28 28

  
29 29
LIBS+=-lz $(LIBS_TOOLS)
30 30

  
b/Makefile.hw
7 7

  
8 8
.PHONY: all
9 9

  
10
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
10
$(call set-vpath, $(SRC_PATH):$(SRC_PATH)/hw)
11 11

  
12 12
QEMU_CFLAGS+=-I.. -I$(SRC_PATH)/fpu
13 13

  
b/Makefile.target
11 11
endif
12 12

  
13 13
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
14
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw
14
$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
15 15
QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H
16 16

  
17 17
include $(SRC_PATH)/Makefile.objs
......
91 91

  
92 92
ifdef CONFIG_LINUX_USER
93 93

  
94
VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
94
$(call set-vpath, $(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR))
95

  
95 96
QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)
96 97
obj-y = main.o syscall.o strace.o mmap.o signal.o thunk.o \
97 98
      elfload.o linuxload.o uaccess.o gdbstub.o
......
122 123

  
123 124
ifdef CONFIG_DARWIN_USER
124 125

  
125
VPATH+=:$(SRC_PATH)/darwin-user
126
$(call set-vpath, $(SRC_PATH)/darwin-user)
127

  
126 128
QEMU_CFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
127 129

  
128 130
# Leave some space for the regular program loading zone
......
147 149

  
148 150
ifdef CONFIG_BSD_USER
149 151

  
150
VPATH+=:$(SRC_PATH)/bsd-user
152
$(call set-vpath, $(SRC_PATH)/bsd-user)
153

  
151 154
QEMU_CFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH)
152 155

  
153 156
obj-y = main.o bsdload.o elfload.o mmap.o signal.o strace.o syscall.o \
b/Makefile.user
6 6

  
7 7
.PHONY: all
8 8

  
9
# Do not take %.o from $(SRC_PATH), only %.c and %.h
10
# All %.o for user targets should be built with -fpie, when
11
# configured with --enable-user-pie, so we don't want to
12
# take %.o from $(SRC_PATH), since they built without -fpie
13
vpath %.c %.h $(SRC_PATH)
9
$(call set-vpath, $(SRC_PATH))
14 10

  
15 11
QEMU_CFLAGS+=-I..
16 12

  
b/pc-bios/optionrom/Makefile
5 5
include ../../config-host.mak
6 6
include $(SRC_PATH)/rules.mak
7 7

  
8
VPATH=$(SRC_PATH)/pc-bios/optionrom
8
$(call set-vpath, $(SRC_PATH)/pc-bios/optionrom)
9

  
9 10
.PHONY : all clean build-all
10 11

  
11 12
CFLAGS := -Wall -Wstrict-prototypes -Werror -fomit-frame-pointer -fno-builtin
b/rules.mak
39 39
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
40 40
              >/dev/null 2>&1 && echo OK), $2, $3)
41 41

  
42
set-vpath = $(if $1,$(foreach PATTERN,%.c %.h %.S, $(eval vpath $(PATTERN) $1)))
43

  
42 44
# Generate timestamp files for .h include files
43 45

  
44 46
%.h: %.h-timestamp
b/tests/Makefile
1 1
-include ../config-host.mak
2
VPATH=$(SRC_PATH)/tests
2

  
3
$(call set-vpath, $(SRC_PATH)/tests)
3 4

  
4 5
CFLAGS=-Wall -O2 -g -fno-strict-aliasing
5 6
#CFLAGS+=-msse2

Also available in: Unified diff