-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
94 lines (73 loc) · 2.72 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# ASS01 Example Makefile
#
# This makefile is intended for use with GNU make
# This example is intended to be built with Linaro bare-metal GCC
TARGET=fact01.axf
CC=aarch64-elf-gcc
LD=aarch64-elf-gcc
# Select build rules based on Windows or Unix
ifdef WINDIR
DONE=@if exist $(1) echo Build completed.
RM=if exist $(1) del /q $(1)
SHELL=$(WINDIR)\system32\cmd.exe
else
ifdef windir
DONE=@if exist $(1) echo Build completed.
RM=if exist $(1) del /q $(1)
SHELL=$(windir)\system32\cmd.exe
else
DONE=@if [ -f $(1) ]; then echo Build completed.; fi
RM=rm -f $(1)
endif
endif
all: $(TARGET)
$(call DONE,$(TARGET))
rebuild: clean all
clean:
$(call RM,*.o)
$(call RM,$(TARGET))
main.o: main.c
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
addnode.o: addnode.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
deletenode.o: deletenode.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
pushstack.o: pushstack.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
popstack.o: popstack.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
gettop.o: gettop.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
getlength.o: getlength.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
bstinsert.o: bstinsert.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
bstfind.o: bstfind.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
bstfindmin.o: bstfindmin.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
bstfindmax.o: bstfindmax.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
hashinsert.o: hashinsert.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
hashdelete.o: hashdelete.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
hashfind.o: hashfind.S
# Compile for best debug view (lowest optimization)
$(CC) -c -march=armv8-a -g -O0 $^ -o $@
$(TARGET): main.o addnode.o deletenode.o pushstack.o popstack.o gettop.o getlength.o bstinsert.o bstfind.o bstfindmin.o bstfindmax.o hashinsert.o hashdelete.o hashfind.o
# Link with specific base address to suit VE model memory layout
$(LD) --specs=aem-ve.specs -Wl,--build-id=none main.o addnode.o deletenode.o pushstack.o popstack.o gettop.o getlength.o bstinsert.o bstfind.o bstfindmin.o bstfindmax.o hashinsert.o hashdelete.o hashfind.o -o $@