-rw-r--r-- 1476 cryptattacktester-20230614/Makefile raw
CPP=g++ -fPIC -std=gnu++11 -g -O -Wall -Wextra -Wno-sign-compare
ATTACKBINS=\
attackparams \
predictedcost predictedprob predictedcp \
searchparams \
circuitcost circuitexample circuitprob
MOREBINS=\
problemparams \
biginttest bittest weighttest ramtest subsettest sorttest echelontest collisiontest
SYSLIBS=-lmpfi -lmpfr -lgmp -lcrypto
ATTACKLIBS=\
attack_scan
LIBS=\
bit \
random \
bigint_mpz bigfloat_mpfi \
problem_list \
decoding uniformmatrix \
aes128 \
attack_list \
aes128_enum aes128_enum_params aes128_enum_cost aes128_enum_prob \
bruteforce bruteforce_params bruteforce_cost bruteforce_prob \
bruteforce2 bruteforce2_params bruteforce2_cost bruteforce2_prob \
isd0 isd0_params isd0_cost isd0_prob \
isd1 isd1_params isd1_cost isd1_prob \
isd2 isd2_params isd2_cost isd2_prob \
ram ram_cost \
index index_cost \
bit_vector_cost \
bit_matrix bit_matrix_cost \
parity parity_cost \
subset_cost \
sorting sorting_cost \
transition queue_prob collision_prob \
selection \
permutation
CPPSRC=$(ATTACKBINS:=.cpp) $(MOREBINS:=.cpp) $(ATTACKLIBS:=.cpp) $(LIBS:=.cpp)
CPPOBJ=$(CPPSRC:.cpp=.o)
CPPDEP=$(CPPSRC:.cpp=.d)
all: $(ATTACKBINS) $(MOREBINS)
$(ATTACKBINS): %: %.o $(ATTACKLIBS:=.o) lib.so
$(CPP) -o $@ $^ $(SYSLIBS) -Wl,-rpath=`pwd`
$(MOREBINS): %: %.o lib.so
$(CPP) -o $@ $^ $(SYSLIBS) -Wl,-rpath=`pwd`
lib.so: $(LIBS:=.o)
gcc -shared -o lib.so $^ $(SYSLIBS)
$(CPPOBJ): %.o: %.cpp
$(CPP) -MMD -MP -c $<
.SECONDARY:
-include $(CPPDEP)