-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (23 loc) · 781 Bytes
/
Makefile
File metadata and controls
34 lines (23 loc) · 781 Bytes
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
# INDIQUEZ ICI : Votre nom et celui de votre binôme
AUTEURS := BasEliot_ArnaudgoddetEtienne
EXE_ASM := riscv-assembler
SRC_ASM := $(wildcard assembler/*.c)
EXE_EMU := riscv-emulator
SRC_EMU := $(wildcard emulator/*.c)
TEST_DIR := tests/
all: $(EXE_ASM) $(EXE_EMU)
$(EXE_ASM): $(SRC_ASM)
gcc $^ -o $@ -Wall -Wextra -O0 -g
$(EXE_EMU): $(SRC_EMU)
gcc $^ -o $@ -Wall -Wextra -O0 -g
test: $(EXE_ASM) $(EXE_EMU) test.py
@python3 test.py -v --tb=short --no-header
.PHONY: all test
cleanall: clean
@ rm -rf __pycache__ .pytest_cache .hypothesis
@ rm -f $(EXE_EMU) $(EXE_ASM)
clean:
@ find tests \( -name '*.o' -o -name '*.bin' -o -name '*.hex' -o -name '*.state' \) -delete
tar: cleanall
@ tar -cvzf ../$(AUTEURS).tgz *
@ echo "==="; echo "Created: ../$(AUTEURS).tgz"