-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (35 loc) · 1.25 KB
/
Makefile
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
39
40
41
42
43
44
45
46
47
48
49
COQOPTS = -R ../../plugin CertiCoq.Plugin -I ../../plugin -R ./ CertiCoq.Benchmarks -R ../lib CertiCoq.Benchmarks.lib
ARMGNU = arm-none-eabi
AOPS = --warn --fatal-warnings -mcpu=cortex-m3 -mthumb
COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding -mcpu=cortex-m3 -mthumb
OFILES = main.o glue.o gc_stack.o test.o
INCLUDE=./runtime
.PHONY=all clean
all : main.bin
CertiCoq.Benchmarks.tests.test.c: tests.v
coqc $(COQOPTS) tests.v
vectors.o : vectors.s
$(ARMGNU)-as $(AOPS) vectors.s -o vectors.o
main.o : main.c
$(ARMGNU)-gcc $(COPS) -I$(INCLUDE) -c main.c -o main.o
gc_stack.o : $(INCLUDE)/gc_stack.c
$(ARMGNU)-gcc $(COPS) -I$(INCLUDE) -c $(INCLUDE)/gc_stack.c -o gc_stack.o
test.o : CertiCoq.Benchmarks.tests.test.c
$(ARMGNU)-gcc $(COPS) -I$(INCLUDE) -c CertiCoq.Benchmarks.tests.test.c -o test.o
glue.o : glue.c
$(ARMGNU)-gcc $(COPS) -I$(INCLUDE) -c glue.c -o glue.o
main.bin : memmap vectors.o $(OFILES)
$(ARMGNU)-gcc -nostartfiles -o main.elf -T memmap vectors.o $(OFILES)
$(ARMGNU)-objdump -D main.elf > main.list
$(ARMGNU)-objcopy main.elf main.bin -O binary
clean:
rm -f *.bin
rm -f *.o
rm -f *.elf
rm -f *.list
rm -f CertiCoq.Benchmarks.tests.*.c
rm -f CertiCoq.Benchmarks.tests.*.h
rm -f ./*.vo
rm -f ./*.vos
rm -f ./*.vok
rm -f ./*.glob