cryptopals_c

cryptopals crypto challenges solutions in pure c
git clone git://git.superpozycja.net/cryptopals_c
Log | Files | Refs | README

commit 84914a7391a804af090b11e92cdaee1ef160000e
parent 8c2929ed7d6bb1c047d706435311b412ef62d0dd
Author: anna <anna@brokenlove.online>
Date:   Sun,  1 Sep 2024 16:37:53 +0200

make an actual functioning (but ugly) build method for those

Diffstat:
Amakefile | 24++++++++++++++++++++++++
1 file changed, 24 insertions(+), 0 deletions(-)

diff --git a/makefile b/makefile @@ -0,0 +1,24 @@ +LIB_SRC=$(shell find lib -name '*.c') +CHALLS_SRC=$(shell find src -name '*.c') +LIB_OBJS=0xdeadbabe + +all: lib challs + +challs: $(CHALLS_OBJS) dirs + $(foreach file,$(CHALLS_SRC),$(CC) -o bin/$(subst src/,,$(basename $(file))) $(file) $(LIB_OBJS);) + +lib: $(LIB_SRC) dirs + $(foreach file,$(LIB_SRC),$(CC) -c -o bin/$(basename $(file)).o $(file);) + $(eval override LIB_OBJS=$(shell find bin/lib -name '*.o')) + +dirs: + mkdir -p bin + mkdir -p bin/lib + mkdir -p bin/s1 + mkdir -p bin/s2 + mkdir -p bin/s3 + mkdir -p bin/s4 + mkdir -p bin/s5 + mkdir -p bin/s6 + mkdir -p bin/s7 + mkdir -p bin/s8