Makefile
783 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
35
36
37
.PHONY: default cleantmp clean
default: CR.pdf
#default: $(subst md,pdf,$(wildcard *.md))
# COMPTE-RENDU
SOURCES=$(wildcard *.txt)
%.pdf: %.html
scripts/html2pdf -i "$<" -o "$@" -t "Tutorat de microprocesseurs S6 - TD1 Sujet 8"
%.html: %.tmp template.html
scripts/md2html -i "$<" -o "$@" -t template.html
%.tmp: %.md $(SOURCES)
scripts/node_modules/markedpp/bin/markedpp.js "$<" > "$@"
# PROGRAMME
%.asm: %.txt
wine scripts/Compilateur.exe scripts/gram.txt "$<" "$@"
%.hex: %.asm
wine scripts/gavrasm.exe "$<"
%.upload: %.hex
avrdude -C scripts/avrdude.conf -v -p atmega2560 -c wiring -P /dev/ttyACM0 -b 115200 -D -U flash:w:"$<":i
%.up: %.upload
clean:
rm -rf $(subst md,html,$(wildcard *.md)) *.tmp
rm -rf $(subst md,pdf,$(wildcard *.md))
rm -rf *.hex *.lst