1# 2# Alpha system tests 3# 4 5ALPHA_SYSTEM_SRC=$(SRC_PATH)/tests/tcg/alpha/system 6VPATH+=$(ALPHA_SYSTEM_SRC) 7 8# These objects provide the basic boot code and helper functions for all tests 9CRT_OBJS=boot.o 10 11ALPHA_TEST_SRCS=$(wildcard $(ALPHA_SYSTEM_SRC)/*.c) 12ALPHA_TESTS = $(patsubst $(ALPHA_SYSTEM_SRC)/%.c, %, $(ALPHA_TEST_SRCS)) 13 14CRT_PATH=$(ALPHA_SYSTEM_SRC) 15LINK_SCRIPT=$(ALPHA_SYSTEM_SRC)/kernel.ld 16LDFLAGS=-Wl,-T$(LINK_SCRIPT) 17TESTS+=$(ALPHA_TESTS) $(MULTIARCH_TESTS) 18CFLAGS+=-nostdlib -g -O1 -mcpu=ev6 $(MINILIB_INC) 19LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc 20 21# building head blobs 22.PRECIOUS: $(CRT_OBJS) 23 24%.o: $(CRT_PATH)/%.S 25 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -x assembler-with-cpp -Wa,--noexecstack -c $< -o $@ 26 27# Build and link the tests 28%: %.c $(LINK_SCRIPT) $(CRT_OBJS) $(MINILIB_OBJS) 29 $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $< -o $@ $(LDFLAGS) 30 31memory: CFLAGS+=-DCHECK_UNALIGNED=0 32 33# Running 34QEMU_OPTS+=-serial chardev:output -kernel 35