aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 17e20e24826fedd1108d687940b1e8f90f8028f8 (plain)
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
SHELL = /bin/sh
CC = clang
# -Wunused-function is pretty annoying here, as everything is static and not
# all parts of common.c are used in all the executables
CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-function \
	-ggdb -fsanitize=address,undefined
# -lpthread is only there for debugging (gdb & errno)
# -lrt is only for glibc < 2.17
LDFLAGS = `pkg-config --libs libssl` -lpthread -lrt

.PHONY: all clean
.SUFFIXES:

targets = zyklonb kike

all: $(targets)

clean:
	rm -f $(targets) kike-replies.c

zyklonb: zyklonb.c common.c siphash.c
	$(CC) zyklonb.c siphash.c -o $@ $(CFLAGS) $(LDFLAGS)
kike: kike.c common.c siphash.c kike-replies.c
	$(CC) kike.c siphash.c -o $@ $(CFLAGS) $(LDFLAGS)

# Generates kike.msg as a by-product
kike-replies.c: kike-replies
	$(SHELL) kike-gen-replies.sh < $< > $@