-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (33 loc) · 953 Bytes
/
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
CC=gcc
CFLAGS=
AES128: init utils.o expandKey.o addRoundKey.o subBytes.o shiftRows.o mixColumns.o aes.o main.o
mkdir -p build
gcc -o build/AES128 \
objects/main.o \
objects/aes.o \
objects/utils.o \
objects/expandKey.o \
objects/addRoundKey.o \
objects/subBytes.o \
objects/shiftRows.o \
objects/mixColumns.o $(CFLAGS)
clean:
rm objects/*.o AES128
init:
mkdir -p objects
utils.o: init
gcc -o objects/utils.o -c src/utils.c $(CFLAGS)
expandKey.o: init
gcc -o objects/expandKey.o -c src/expandKey.c $(CFLAGS)
addRoundKey.o: init
gcc -o objects/addRoundKey.o -c src/addRoundKey.c $(CFLAGS)
subBytes.o: init
gcc -o objects/subBytes.o -c src/subBytes.c $(CFLAGS)
shiftRows.o: init
gcc -o objects/shiftRows.o -c src/shiftRows.c $(CFLAGS)
mixColumns.o: init
gcc -o objects/mixColumns.o -c src/mixColumns.c $(CFLAGS)
aes.o: init
gcc -o objects/aes.o -c src/aes.c $(CFLAGS)
main.o: init
gcc -o objects/main.o -c src/main.c $(CFLAGS)