# Where to find include and library directories # containing botan-1.10 files. # Change to /usr for a standard installation of botan. PREFIX = /c/cs467 # Compile with debug option and all warnings on. ------------ CXXFLAGS = -g -Wall -O1 -std=c++14 -I $(INCLDIR) INCLDIR = $(PREFIX)/include/botan-1.10 LIBDIR = $(PREFIX)/lib64 LDFLAGS = -L $(LIBDIR) -Wl,-rpath=$(LIBDIR) LIBS = -lbotan-1.10 # Object modules comprising this application ---------------- OBJ = aes.o bytearray.o dist.o prng.o OBJ-SO = $(OBJ) snakeoil.o main.o OBF-BF = $(OBJ) bruteforce.o analyze.o # Build targets TARGETS = snakeoil bruteforce .PHONY: all clean all: $(TARGETS) snakeoil: $(OBJ-SO) $(CXX) -o $@ $(OBJ-SO) $(LDFLAGS) $(LIBS) bruteforce: $(OBF-BF) $(CXX) -o $@ $(CXXFLAGS) $(OBF-BF) $(LDFLAGS) $(LIBS) # Delete .o and exe files and force recompilation. ---------- clean: rm -f $(OBJ-SO) $(OBF-BF) $(TARGETS) # Dependencies ---------------------------------------------- aes.o: aes.cpp aes.hpp bytearray.hpp prng.hpp exception.hpp analyze.o: analyze.cpp analyze.hpp aes.hpp bytearray.hpp prng.hpp \ dist.hpp exception.hpp bruteforce.o: bruteforce.cpp analyze.hpp aes.hpp bytearray.hpp prng.hpp \ dist.hpp bytearray.o: bytearray.cpp bytearray.hpp prng.hpp exception.hpp dist.o: dist.cpp dist.hpp exception.hpp main.o: main.cpp snakeoil.hpp aes.hpp bytearray.hpp prng.hpp prng.o: prng.cpp prng.hpp snakeoil.o: snakeoil.cpp snakeoil.hpp aes.hpp bytearray.hpp prng.hpp \ exception.hpp