1# -*- Mode: makefile -*-
2#
3# Multiarch Tests - included from tests/tcg/Makefile.target
4#
5# These tests are plain C and built without any architecture specific code.
6#
7
8MULTIARCH_SRC=$(SRC_PATH)/tests/tcg/multiarch
9
10# Set search path for all sources
11VPATH 		+= $(MULTIARCH_SRC)
12MULTIARCH_SRCS   =$(notdir $(wildcard $(MULTIARCH_SRC)/*.c))
13MULTIARCH_TESTS  =$(MULTIARCH_SRCS:.c=)
14
15# Update TESTS
16TESTS		+=$(MULTIARCH_TESTS)
17
18#
19# The following are any additional rules needed to build things
20#
21
22testthread: LDFLAGS+=-lpthread
23
24# We define the runner for test-mmap after the individual
25# architectures have defined their supported pages sizes. If no
26# additional page sizes are defined we only run the default test.
27
28# default case (host page size)
29run-test-mmap: test-mmap
30	$(call run-test, test-mmap, $(QEMU) $<, \
31		"$< (default) on $(TARGET_NAME)")
32
33# additional page sizes (defined by each architecture adding to EXTRA_RUNS)
34run-test-mmap-%: test-mmap
35	$(call run-test, test-mmap-$*, $(QEMU) -p $* $<,\
36		"$< ($* byte pages) on $(TARGET_NAME)")
37