diff --git a/tools/prng_benchmark/Makefile b/tools/prng_benchmark/Makefile new file mode 100644 index 0000000..a2557c0 --- /dev/null +++ b/tools/prng_benchmark/Makefile @@ -0,0 +1,47 @@ +# Makefile for PRNG Benchmark + +# Compiler +CC = gcc + +# Compiler Flags +CFLAGS = -O2 + +# Libraries to Link Against +LIBS = -lssl -lcrypto -lm + +# Source Files +SOURCES = prng_benchmark.c \ + mt19937ar-cok/mt19937ar-cok.c \ + isaac_rand/isaac_rand.c \ + isaac_rand/isaac64.c \ + alfg/add_lagg_fibonacci_prng.c \ + xor/xoroshiro256_prng.c \ + aes/aes_ctr_prng.c + +# Object Files +OBJECTS = $(SOURCES:.c=.o) + +# Executable Name +TARGET = prng_benchmark + +# Default Target +all: $(TARGET) + +# Link Object Files to Create Executable +$(TARGET): $(OBJECTS) + $(CC) $(CFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) + +# Compile .c Files to .o Object Files +%.o: %.c + $(CC) $(CFLAGS) -c $< -o $@ + +# Clean Build Artifacts +clean: + rm -f $(OBJECTS) $(TARGET) + +# Optional: Run the Benchmark +run: $(TARGET) + ./$(TARGET) + +# Phony Targets +.PHONY: all clean run