-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
65 lines (51 loc) · 1.06 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
CC=g++
CFLAGS= -Wall -Wextra -Wshadow -D_GLIBCXX_ASSERTIONS -DDEBUG -ggdb3 -fmax-errors=2 -std=c++11
EXEC=./C
NUM=$(shell ls waiting/ | wc -l)
RC = rustc
RFLAGS = -C opt-level=3
REXEC = ./R
c:
@$(CC) main.cpp -o $(EXEC)
@echo "OK!"
cts:
@tee contest/n{1..10}.cpp <template.cpp > /dev/null
a:
@$(CC) $(CFLAGS) contest/n$(a).cpp -o $(EXEC)
@echo "OK!"
@./$(EXEC)
Scts:
@mv contest/$(f) Solved/"$(g).cpp";
n:
@cp template.cpp main.cpp
na:
@echo "File number ${NUM}."
@if [ -f main.cpp ]; then mv main.cpp waiting/$(NUM).cpp; fi
@cp template.cpp main.cpp
@echo "New main.cpp file!"
b:
@rm main.cpp
@mv waiting/$(n).cpp main.cpp;
@echo "File $(n) on main"
k:
@echo $(f) "Solved"
@mv main.cpp Solved/C++/"$(f).cpp";
@cp template.cpp main.cpp
e:
@./$(EXEC)
ef:
@if [ -f ap.txt]; then rm -rf ap.txt ; fi
./$(EXEC) > ap.txt
r:
@$(RC) $(RFLAGS) -o $(REXEC) rust/src/main.rs
@echo "OK!"
rk:
@echo $(f) "Solved"q
@mv rust/src/main.rs Solved/Rust/"$(f).rs";
@cp template.rs rust/src/main.rs
re:
@./$(REXEC);
cleanC:
rm -rf $(EXEC)
cleanR:
rm -rf $(REXEC)