summaryrefslogtreecommitdiffstats
path: root/tests/crypt/Makefile
blob: dd676f4b2aa920e405c1ce8ac39b32c92fd1cfb2 (plain) (blame)
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
34
35
36
TOP=	../..
include ${TOP}/iconfig.mk

PROG=		run-test
SRCS=		run-test.c
SRCS+=		test_hmac_md5.c

CFLAGS?=	-O2
CSTD?=		c99
CFLAGS+=	-std=${CSTD}

CPPFLAGS+=	-I${TOP} -I${TOP}/src

PCRYPT_SRCS=	${CRYPT_SRCS:compat/%=${TOP}/compat/%}
OBJS+=		${SRCS:.c=.o} ${PCRYPT_SRCS:.c=.o}

.c.o:
	${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@

all: ${PROG}

clean:
	rm -f ${OBJS} ${PROG} ${PROG}.core ${CLEANFILES}

distclean: clean
	rm -f .depend
	rm -f *.diff *.patch *.orig *.rej

.depend: ${SRCS} ${PCRYPT_SRCS}
	${CC} ${CPPFLAGS} -MM ${SRCS} ${PCRYPT_SRCS}

${PROG}: ${DEPEND} ${OBJS}
	${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}

test: ${PROG}
	./${PROG}