2014-06-14 20:26:28 +02:00
|
|
|
SHELL = /bin/sh
|
|
|
|
CC = clang
|
2014-07-14 20:39:01 +02:00
|
|
|
# -Wunused-function is pretty annoying here, as everything is static and not
|
|
|
|
# all parts of common.c are used in all the executables
|
2014-07-19 17:44:49 +02:00
|
|
|
CFLAGS = -std=c99 -Wall -Wextra -Wno-unused-function \
|
|
|
|
-ggdb -fsanitize=address,undefined
|
2014-07-09 01:54:50 +02:00
|
|
|
# -lpthread is only there for debugging (gdb & errno)
|
|
|
|
LDFLAGS = `pkg-config --libs libssl` -lpthread
|
2014-06-14 20:26:28 +02:00
|
|
|
|
|
|
|
.PHONY: all clean
|
2014-08-10 00:47:26 +02:00
|
|
|
.SUFFIXES:
|
2014-06-14 20:26:28 +02:00
|
|
|
|
2014-08-10 03:46:49 +02:00
|
|
|
targets = zyklonb kike
|
2014-06-14 20:26:28 +02:00
|
|
|
|
|
|
|
all: $(targets)
|
|
|
|
|
|
|
|
clean:
|
2014-08-10 00:47:26 +02:00
|
|
|
rm -f $(targets) kike-replies.c
|
2014-06-14 20:26:28 +02:00
|
|
|
|
2014-08-10 00:47:26 +02:00
|
|
|
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)
|
2014-07-14 20:39:01 +02:00
|
|
|
|
2014-08-10 03:46:49 +02:00
|
|
|
# Generates kike.msg as a by-product
|
|
|
|
kike-replies.c: kike-replies
|
2014-08-10 00:47:26 +02:00
|
|
|
$(SHELL) kike-gen-replies.sh < $< > $@
|
2014-06-14 20:26:28 +02:00
|
|
|
|