all repos — cryptopals-challenges @ 08b7de53f2f279ab297af47e39a65a8bc7eccf32

cryptopals-challenges

set1/Makefile

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
CC      = gcc
CFLAGS  = -Wall -Wpedantic -Wextra -std=c99 -fstack-protector-all \
          -fdiagnostics-color=auto
DEBUG   = -0g -ggdb
LINK    =
LIB_INC =
SRC_DIR = src
OUT_DIR = bin
TARGETS = base64 fixed-xor char-freq-analyze repeating-key-xor aes-ecb


all: $(TARGETS)

# TODO toggle mbedtls or tiny-AES-c
#EXT_INCLUDES = -Iaes-libs/mbedtls/include/
#EXT_LIBS     = -Laes-libs/mbedtls/library
#LDLIBS       = -lmbedcrypto
#
EXT_INCLUDES = -Iaes-libs/tiny-AES-c
#EXT_LIBS     = -Laes-libs/tiny-AES-c
#LDLIBS       = -laes

%: $(SRC_DIR)/%.c
	$(CC) $(CFLAGS) -o $(OUT_DIR)/$@ $<

aes-ecb: $(SRC_DIR)/aes-ecb.c
	$(CC) $(CFLAGS) $(EXT_INCLUDES) $(EXT_LIBS) -o $(OUT_DIR)/$@ $< $(LDLIBS)

clean:
	$(RM) *.o $(OUT_DIR)/*

.PHONY: all clean