2008-09-14 17:18:29 +00:00
|
|
|
CROSS=alpha-linux-gnu-
|
|
|
|
CC=$(CROSS)gcc
|
|
|
|
AS=$(CROSS)as
|
|
|
|
|
|
|
|
SIM=../../alpha-linux-user/qemu-alpha
|
|
|
|
|
|
|
|
CFLAGS=-O
|
2008-09-17 22:04:37 +00:00
|
|
|
LINK=$(CC) -o $@ crt.o $< -nostdlib
|
2008-09-14 17:18:29 +00:00
|
|
|
|
|
|
|
TESTS=test-cond test-cmov
|
|
|
|
|
|
|
|
all: hello-alpha $(TESTS)
|
|
|
|
|
|
|
|
hello-alpha: hello-alpha.o crt.o
|
|
|
|
$(LINK)
|
|
|
|
|
|
|
|
test-cond: test-cond.o crt.o
|
|
|
|
$(LINK)
|
|
|
|
|
|
|
|
test-cmov.o: test-cond.c
|
|
|
|
$(CC) -c $(CFLAGS) -DTEST_CMOV -o $@ $<
|
|
|
|
|
|
|
|
test-cmov: test-cmov.o crt.o
|
|
|
|
$(LINK)
|
|
|
|
|
2009-04-10 21:27:15 +00:00
|
|
|
test-ovf: test-ovf.o crt.o
|
|
|
|
$(LINK)
|
|
|
|
|
2008-09-17 22:04:37 +00:00
|
|
|
check: $(TESTS)
|
|
|
|
for f in $(TESTS); do $(SIM) $$f || exit 1; done
|
|
|
|
|
2008-09-14 17:18:29 +00:00
|
|
|
clean:
|
|
|
|
$(RM) *.o *~ hello-alpha $(TESTS)
|
|
|
|
|
2008-09-17 22:04:37 +00:00
|
|
|
.PHONY: clean all check
|