From 0d3c0141d5fcc2342c71c9d34ddf77518af53b16 Mon Sep 17 00:00:00 2001 From: Fabian Druschke Date: Wed, 6 Nov 2024 20:48:54 +0100 Subject: [PATCH] Makefile was ignored, now fixed. --- tools/prng_benchmark/Makefile | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 tools/prng_benchmark/Makefile 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