-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (16 loc) · 1.01 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
OPTS := -Wall -pedantic -std=c11
all: frontend cracker_debug fastcracker
build/%.o: %.c
gcc $(OPTS) -c $< -O3 -fpic -o $@
build/libenigma.so: build/enigma.o build/readlines.o build/rotor.o
gcc build/enigma.o build/readlines.o build/rotor.o -shared -O3 -o build/libenigma.so
build/libdatastructures.so: build/data_structures/linked_list.o build/data_structures/hashmap.o
gcc -shared -O3 -o build/libdatastructures.so build/data_structures/linked_list.o build/data_structures/hashmap.o
frontend: build/libenigma.so
gcc -Lbuild -Wl,-rpath=build -O3 -o build/enigma frontend.c -lenigma
cracker_debug: build/libenigma.so build/libdatastructures.so
gcc -Lbuild -Wl,-rpath=build -pg -g -o build/cracker cracker.c -lenigma -ldatastructures -lm -lpthread
fastcracker: build/libenigma.so build/libdatastructures.so
gcc -Lbuild -Wl,-rpath=build -O3 -o build/fastcracker cracker.c -lenigma -ldatastructures -lm -lpthread
make clean:
rm -f build/*.o build/*.so build/data_structures/*.o build/enigma build/cracker build/fastcracker