-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
130 lines (105 loc) · 3.68 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
###############################################################################
# Set PATH to ASIS library below (default corresponds to the case where you
# installed ASIS in the Gnat directory)
ASIS_TOP = /usr/gnat-2012/
###############################################################################
# Depending on your version of ASIS, the ASIS directory may be split into
# several directories or not. Uncomment the set of declarations that matches
# your installation (default corresponds to the current versions of GnatPro and
# GnatGPL):
# ASIS_INCLUDE = ${ASIS_TOP}
# ASIS_OBJ = ${ASIS_TOP}
# ASIS_LIB = ${ASIS_TOP}
# ASIS_INCLUDE = ${ASIS_TOP}/src
# ASIS_OBJ = ${ASIS_TOP}/obj
# ASIS_LIB = ${ASIS_TOP}/lib
ASIS_INCLUDE = ${ASIS_TOP}/include/asis
ASIS_OBJ = ${ASIS_TOP}/lib/asis
ASIS_LIB = ${ASIS_TOP}/lib/asis
###############################################################################
# SYSTEM COMMANDS (do not change)
W32_RM = del /q /s /f
W32_EXT = .exe
W32_EXEC =
UNIX_RM = rm -f
UNIX_EXT =
UNIX_EXEC = ./
###############################################################################
# GNAT options, adjust to your taste
GARGS = -gnatf -gnatwa -aI${ASIS_INCLUDE} -aO${ASIS_OBJ} -g
CARGS = -cargs -O2 -gnatWh -gnat05 -gnato
BARGS = -bargs -E
LARGS = -largs -L${ASIS_LIB} -lasis
###############################################################################
# Choose your system by adding/removing comment tags
#RM = ${W32_RM}
#EXT = ${W32_EXT}
#EXEC = ${W32_EXEC}
RM = ${UNIX_RM}
EXT = ${UNIX_EXT}
EXEC = ${UNIX_EXEC}
###############################################################################
# Do not change anything below this line
.PHONY : *
help :
@echo "---------------------------------------------------------------"
@echo "-- --"
@echo "-- make <entry> --"
@echo "-- --"
@echo "-- <entry> ::= help -- print this message --"
@echo "-- | build -- build all executables --"
@echo "-- | adarorg -- build AdaRORG --"
@echo "-- | expr -- build expr --"
@echo "-- | clean -- delete object files --"
@echo "-- --"
@echo "---------------------------------------------------------------"
build : adarorg adarorg_report filelist
adarorg : mkdir
@cd src; gnatmake adarorg.adb ${GARGS} ${CARGS} ${CARGS_EXTRA} ${BARGS} ${LARGS}
@mv src/adarorg bin/
adarorg_report :
@cd src; gnatmake adarorg_report.adb
@mv src/adarorg_report bin/
filelist :
@cd src; gnatmake print_filelist.adb
@mv src/print_filelist bin/
mkdir :
@mkdir -p bin
expr:
gnatmake test/expr*.adb -largs -lasis
expr_1:
- ${RM} -rf test/*.ror
@cd test/; ../bin/adarorg original/expr_1.adb -Ioriginal/spec/
@cd test/; gnatchop -w expr_1.ror;
@cd test/; gnatmake expr_1.adb -Ioriginal/ -Ioriginal/spec/ -I../src/
expr_2:
./adarorg test/expr_2.adb
gnatchop -w expr_2.ror
expr_3:
./adarorg test/expr_3.adb
gnatchop -w expr_3.ror
expr_4:
./adarorg test/expr_4.adb
gnatchop -w expr_4.ror
expr_5:
./adarorg test/expr_5.adb
gnatchop -w expr_5.ror
expr_6:
./adarorg test/expr_6.adb
gnatchop -w expr_6.ror
expr_7:
./adarorg test/expr_7.adb
gnatchop -w expr_7.ror
expr_8:
./adarorg test/expr_8.adb
gnatchop -w expr_8.ror
expr_9:
./adarorg test/expr_9.adb
gnatchop -w expr_9.ror
expr_10:
./adarorg test/expr_10.adb
gnatchop -w expr_10.ror
clean: clean_debug
- ${RM} -rf src/*.o src/*.ali src/b~*
clean_debug:
- ${RM} -rf *coverage.dat *.adt *.ror filelist.dat