summaryrefslogtreecommitdiffstats
path: root/tests/eloop-bench/Makefile
blob: 332e889fc00dd5f4174455ffbfd09df0dcaba52d (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
37
38
39
40
41
42
43
44
45
TOP?=	../..
include ${TOP}/iconfig.mk

PROG=		eloop-bench
SRCS=		eloop-bench.c
SRCS+=		${TOP}/src/eloop.c

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

#CPPFLAGS+=	-DNO_CONFIG_H
#CPPFLAGS+=	-DQUEUE_H=../compat/queue.h
CPPFLAGS+=	-I${TOP} -I${TOP}/src

# Default is to let eloop decide
#CPPFLAGS+=	-DHAVE_KQUEUE
#CPPFLAGS+=	-DHAVE_POLLTS
#CPPFLAGS+=	-DHAVE_PSELECT
#CPPFLAGS+=	-DHAVE_EPOLL
#CPPFLAGS+=	-DHAVE_PPOLL
CPPFLAGS+=	-DWARN_SELECT

PCOMPAT_SRCS=   ${COMPAT_SRCS:compat/%=${TOP}/compat/%}
OBJS+=          ${SRCS:.c=.o} ${PCOMPAT_SRCS:.c=.o}

.c.o: Makefile
	${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:

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

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