|
@@ -2,11 +2,31 @@ SOURCE=null
|
2
|
2
|
QUOI=null
|
3
|
3
|
|
4
|
4
|
default:
|
5
|
|
- @echo "Specifiez une cible [projet|clean|exec]"
|
|
5
|
+ @echo "Specifiez une cible [compile|clean|exec]"
|
6
|
6
|
|
7
|
|
-projet:
|
|
7
|
+compile:
|
|
8
|
+ifeq ($(QUOI),null)
|
|
9
|
+ @echo "USAGE : make compile QUOI=\"[compilateur|cross_assembleur|all]\""
|
|
10
|
+else
|
|
11
|
+ifeq ($(QUOI),compilateur)
|
|
12
|
+ @echo "Compilation du compilateur"
|
8
|
13
|
$(MAKE) -C Compilateur build
|
|
14
|
+ @echo "Compilation terminée"
|
|
15
|
+else ifeq ($(QUOI),cross_asembleur)
|
|
16
|
+ @echo "Compilation du CrossAssembleur"
|
9
|
17
|
$(MAKE) -C CrossAssembleur build
|
|
18
|
+ @echo "Compilation terminée"
|
|
19
|
+else ifeq ($(QUOI),all)
|
|
20
|
+ @echo "Compilation du compilateur"
|
|
21
|
+ $(MAKE) -C Compilateur build
|
|
22
|
+ @echo "Compilation terminée"
|
|
23
|
+ @echo "Compilation du CrossAssembleur"
|
|
24
|
+ $(MAKE) -C CrossAssembleur build
|
|
25
|
+ @echo "Compilation terminée"
|
|
26
|
+else
|
|
27
|
+ @echo "USAGE : make compile QUOI=\"[compilateur|cross_assembleur|all]\""
|
|
28
|
+endif
|
|
29
|
+endif
|
10
|
30
|
|
11
|
31
|
clean:
|
12
|
32
|
$(MAKE) -C Compilateur clean
|
|
@@ -14,16 +34,16 @@ clean:
|
14
|
34
|
|
15
|
35
|
exec:
|
16
|
36
|
ifeq ($(SOURCE),null)
|
17
|
|
- @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_asm|load|all]\""
|
|
37
|
+ @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_assemble|load|all]\""
|
18
|
38
|
else ifeq ($(QUOI),null)
|
19
|
|
- @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_asm|load|all]\""
|
|
39
|
+ @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_assemble|load|all]\""
|
20
|
40
|
else
|
21
|
41
|
ifeq ($(QUOI),compile)
|
22
|
42
|
@echo "Compilation"
|
23
|
43
|
cat $(SOURCE).c | Compilateur/rondoudou_gcc
|
24
|
44
|
@mv output.txt $(SOURCE).memasm
|
25
|
45
|
@echo "Compilation terminée"
|
26
|
|
-else ifeq ($(QUOI),cross_asm)
|
|
46
|
+else ifeq ($(QUOI),cross_assemble)
|
27
|
47
|
@echo "CrossAssemblage"
|
28
|
48
|
cat $(SOURCE).memasm | CrossAssembleur/rondoudou_cross_assembleur
|
29
|
49
|
@mv output.asm $(SOURCE).regasm
|
|
@@ -49,7 +69,7 @@ else ifeq ($(QUOI),all)
|
49
|
69
|
@mv $(SOURCE).tmp.vhd Processeur/Processeur.srcs/sources_1/new/MemoireInstructions.vhd
|
50
|
70
|
@echo "Chargement du binaire terminé"
|
51
|
71
|
else
|
52
|
|
- @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_asm|load|all]\""
|
|
72
|
+ @echo "USAGE : make exec SOURCE=\"file_name\" QUOI=\"[compile|cross_assemble|load|all]\""
|
53
|
73
|
endif
|
54
|
74
|
endif
|
55
|
75
|
|