Commit e5fd43a9268661c19e4a743680003a181dd67e0a

Authored by malc
1 parent f8edcbaa

Support out-of-the-tree building of tests

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5288 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 3 additions and 2 deletions
tests/Makefile
1 -include ../config-host.mak 1 -include ../config-host.mak
  2 +VPATH=$(SRC_PATH)/tests
2 3
3 CFLAGS=-Wall -O2 -g -fno-strict-aliasing 4 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
4 #CFLAGS+=-msse2 5 #CFLAGS+=-msse2
@@ -33,11 +34,11 @@ test_path: test_path.c @@ -33,11 +34,11 @@ test_path: test_path.c
33 test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \ 34 test-i386: test-i386.c test-i386-code16.S test-i386-vm86.S \
34 test-i386.h test-i386-shift.h test-i386-muldiv.h 35 test-i386.h test-i386-shift.h test-i386-muldiv.h
35 $(CC) -m32 $(CFLAGS) $(LDFLAGS) -static -o $@ \ 36 $(CC) -m32 $(CFLAGS) $(LDFLAGS) -static -o $@ \
36 - test-i386.c test-i386-code16.S test-i386-vm86.S -lm 37 + $(<D)/test-i386.c $(<D)/test-i386-code16.S $(<D)/test-i386-vm86.S -lm
37 38
38 test-x86_64: test-i386.c \ 39 test-x86_64: test-i386.c \
39 test-i386.h test-i386-shift.h test-i386-muldiv.h 40 test-i386.h test-i386-shift.h test-i386-muldiv.h
40 - $(CC) -m64 $(CFLAGS) $(LDFLAGS) -static -o $@ test-i386.c -lm 41 + $(CC) -m64 $(CFLAGS) $(LDFLAGS) -static -o $@ $(<D)/test-i386.c -lm
41 42
42 ifeq ($(ARCH),i386) 43 ifeq ($(ARCH),i386)
43 test: test-i386 44 test: test-i386