-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·70 lines (59 loc) · 2.58 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
68
69
70
# Project: LockFile
# Author: ramb0
# Version: 1.0
CC=g++
OUTPUT_FILE=LockFile
MAIN_FILE=main.cpp
SOURCE_FOLDER=./src
BUILD_FOLDER=./build
default:
mkdir -p ./build/
mkdir -p ./src/
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
build:
mkdir -p ./build/
mkdir -p ./src/
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
encrypt:
find -name *.enc -type f -delete
mv ./testFiles/testFolder2 ./testFiles/testFolder
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
./build/$(OUTPUT_FILE) -e ./testFiles/testFolder
decrypt:
mv ./testFiles/testFolder ./testFiles/testFolder2
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
./build/$(OUTPUT_FILE) -d ./testFiles/testFolder.crypt
info:
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
./build/$(OUTPUT_FILE) -i ./testFiles/testFolder.crypt
check:
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread
./build/$(OUTPUT_FILE) -c ./testFiles/testFolder.crypt
debug:
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/main.cpp -ggdb3 --no-warnings -lcrypto -pthread
./build/$(OUTPUT_FILE)
test:
rm -rf ./testFiles/testFolder
rm -rf ./testFiles/testFolder2
rm ./testFiles/testFolder.crypt
mkdir -p ./testFiles/testFolder
echo "A big test file inside test folder!!!" > ./testFiles/testFolder/test.txt
mkdir -p ./testFiles/testFolder/testFolder2
echo "A very large file" > ./testFiles/testFolder/testFolder2/test2.txt
cp /usr/bin/ls ./testFiles/testFolder/testFolder2/ls_example
touch ./testFiles/testFolder/empty_file
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread -ggdb3
./build/$(OUTPUT_FILE) -r -e ./testFiles/testFolder
$(CC) -o $(BUILD_FOLDER)/$(OUTPUT_FILE) $(SOURCE_FOLDER)/$(MAIN_FILE) --no-warnings -lcrypto -pthread -ggdb3
./build/$(OUTPUT_FILE) -d ./testFiles/testFolder.crypt
diff ./testFiles/testFolder/testFolder2/ls_example /usr/bin/ls
reset:
rm -rf ./testFiles/testFolder
rm -rf ./testFiles/testFolder2
rm ./testFiles/testFolder.crypt
mkdir -p ./testFiles/testFolder
echo "A big test file inside test folder!!!" > ./testFiles/testFolder/test.txt
mkdir -p ./testFiles/testFolder/testFolder2
echo "A very large file" > ./testFiles/testFolder/testFolder2/test2.txt
cp /usr/bin/ls ./testFiles/testFolder/testFolder2/ls_example
touch ./testFiles/testFolder/empty_file