aboutsummaryrefslogtreecommitdiffstats
path: root/test/mppa/Makefile
blob: 36bd49bcb5593b20a12babfdf97c7041349ab9f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
DIR=general
TESTNAMES=simple call branch for forvar forvarl branchz branchzu

TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF=$(addsuffix .bin,$(TESTS))
ASM=$(addsuffix .s,$(TESTS))
DEBUG:=$(if $(DEBUG),"-dall",)

all: $(ELF)

nobin: $(ASM)

$(DIR)/%.bin: $(DIR)/%.s
	k1-gcc $< -o $@

.SECONDARY:
$(DIR)/%.s: $(DIR)/%.c
	ccomp $(DEBUG) -O0 -v -S $< -o $@

.PHONY:
check: $(ELF)
	bash check.sh $(ELF)

.PHONY:
clean:
	rm -f $(DIR)/*.alloctrace
	rm -f $(DIR)/*.cm
	rm -f $(DIR)/*.compcert.c
	rm -f $(DIR)/*.i
	rm -f $(DIR)/*.light.c
	rm -f $(DIR)/*.ltl
	rm -f $(DIR)/*.mach
	rm -f $(DIR)/*.parsed.c
	rm -f $(DIR)/*.rtl.?
	rm -f $(DIR)/*.s
	rm -f $(DIR)/output/*.out
	rm -rf $(DIR)/profile/
	rm -f $(ELF)