-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (49 loc) · 1.57 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
# Variables
EXE=rho-pollard
FILE=rapport-stage
DLP=computing-dlp
IMPLEMCHORRIVEST=implementation-chor-rivest
# Special rules and targets
.PHONY: all clean help info open
# Rules and tagets
all: clean
@mkdir $(FILE)
@cd tex && $(MAKE)
@cp -f tex/$(FILE).pdf $(FILE)/
@mkdir $(FILE)/$(IMPLEMCHORRIVEST)
@cp -f sage/chor-rivest-vaudenay/* $(FILE)/$(IMPLEMCHORRIVEST)/
@rm -f $(FILE)/$(IMPLEMCHORRIVEST)/draft.sage
@mkdir $(FILE)/$(DLP)
@cp -f sage/DLP/hellman-reyneri.sage $(FILE)/$(DLP)/
@cp -f sage/DLP/pohlig-hellman.sage $(FILE)/$(DLP)/
@cp -f sage/DLP/joux-algorithm.sage $(FILE)/$(DLP)/
@cp -f sage/DLP/README.md $(FILE)/$(DLP)/
@cd c && $(MAKE) nodebug
@mkdir $(FILE)/$(EXE)
@cp -f c/$(EXE) $(FILE)/$(EXE)/
@cp -f c/README.md $(FILE)/$(EXE)/
@cp -f c/test/primes $(FILE)/$(EXE)/
$(EXE):
@cd c && $(MAKE) nodebug
@cp -f c/$(EXE) ./
pdf:
@cd tex && $(MAKE) $(FILE)
@cp -f tex/$(FILE).pdf ./
clean:
@cd c && $(MAKE) clean
@cd tex && $(MAKE) clean
@echo "./ : Cleaning..."
@rm -f *~ $(EXE) *.pdf *.log
@rm -rf ./$(FILE)
open: pdf
@evince $(FILE).pdf&
info:
@more README.md
help:
@echo "all:\t\tRun the target build."
@echo "$(EXE):\tBuid executable file $(EXE) recursively in the directory."
@echo "pdf:\t\tBuid PDF text file $(FILE).pdf recursively in the directory."
@echo "build:\t\tBuild all executable file(s) and PDF text file(s) recursively in the directory."
@echo "clean:\t\tRemove all files produced by the compilation."
@echo "info:\t\tGive info about this project."
@echo "help:\t\tDisplay the main targets of this Makefile with a short despriction."