Skip to content

Commit

Permalink
Makefile was ignored, now fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Knogle committed Nov 6, 2024
1 parent 5326c1f commit 0d3c014
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions tools/prng_benchmark/Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0d3c014

Please sign in to comment.