/
Makefile
67 lines (55 loc) · 1.76 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
66
67
DEPS = lib/*.cpp
FILE = lib/fileio.cpp
all: cipher
test: test_ascii test_atbash test_binary test_caesar test_hex test_morse test_nato test_octal test_vigenere
.PHONY: cipher
cipher: main.cpp $(DEPS)
g++ -o cipher main.cpp $(DEPS)
ifeq ($(OS), Windows_NT)
./cipher.exe
else
./cipher
endif
.PHONY: test_ascii
test_ascii: tests/test_ascii.cpp lib/ascii.cpp $(FILE)
g++ -o test_ascii tests/test_ascii.cpp lib/ascii.cpp $(FILE)
./test_ascii.exe
.PHONY: test_atbash
test_atbash: tests/test_atbash.cpp lib/atbash.cpp $(FILE)
g++ -o test_atbash tests/test_atbash.cpp lib/atbash.cpp $(FILE)
./test_atbash.exe
.PHONY: test_binary
test_binary: tests/test_binary.cpp lib/binary.cpp $(FILE)
g++ -o test_binary tests/test_binary.cpp lib/binary.cpp $(FILE)
./test_binary.exe
.PHONY: test_caesar
test_caesar: tests/test_caesar.cpp lib/caesar.cpp $(FILE)
g++ -o test_caesar tests/test_caesar.cpp lib/caesar.cpp $(FILE)
./test_caesar.exe
.PHONY: test_hex
test_hex: tests/test_hex.cpp lib/hex.cpp $(FILE)
g++ -o test_hex tests/test_hex.cpp lib/hex.cpp $(FILE)
./test_hex.exe
.PHONY: test_morse
test_morse: tests/test_morse.cpp lib/morse.cpp $(FILE)
g++ -o test_morse tests/test_morse.cpp lib/morse.cpp $(FILE)
./test_morse.exe
.PHONY: test_nato
test_nato: tests/test_nato.cpp lib/nato.cpp $(FILE)
g++ -o test_nato tests/test_nato.cpp lib/nato.cpp $(FILE)
./test_nato.exe
.PHONY: test_octal
test_octal: tests/test_octal.cpp lib/octal.cpp $(FILE)
g++ -o test_octal tests/test_octal.cpp lib/octal.cpp $(FILE)
./test_octal.exe
.PHONY: test_vigenere
test_vigenere: tests/test_vigenere.cpp lib/vigenere.cpp $(FILE)
g++ -o test_vigenere tests/test_vigenere.cpp lib/vigenere.cpp $(FILE)
./test_vigenere.exe
.PHONY: clean
clean:
ifeq ($(OS), Windows_NT)
erase cipher.exe
else
rm -rf ./cipher
endif