]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Compile eloop with config.h by default and bring in compat modules.
authorRoy Marples <roy@marples.name>
Tue, 3 Oct 2017 14:50:27 +0000 (15:50 +0100)
committerRoy Marples <roy@marples.name>
Tue, 3 Oct 2017 14:50:27 +0000 (15:50 +0100)
This allows us to build this test AND dhcpcd exactly the same,
which is important as they build eloop.o in the same place.

tests/eloop-bench/Makefile

index 90d258789163c9fd25fa38229f6910c60bed5db2..a0d30983c36835ddbe0af6063e8599bfe1c3ac75 100644 (file)
@@ -9,9 +9,9 @@ CFLAGS?=        -O2
 CSTD?=         c99
 CFLAGS+=       -std=${CSTD}
 
-CPPFLAGS+=     -DNO_CONFIG_H
-CPPFLAGS+=     -DQUEUE_H=../compat/queue.h
-CPPFLAGS+=     -I${TOP}/src
+#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
@@ -19,8 +19,10 @@ CPPFLAGS+=   -I${TOP}/src
 #CPPFLAGS+=    -DHAVE_PSELECT
 #CPPFLAGS+=    -DHAVE_EPOLL
 #CPPFLAGS+=    -DHAVE_PPOLL
+CPPFLAGS+=     -DWARN_SELECT
 
-OBJS+=          ${SRCS:.c=.o}
+PCOMPAT_SRCS=   ${COMPAT_SRCS:compat/%=${TOP}/compat/%}
+OBJS+=          ${SRCS:.c=.o} ${PCOMPAT_SRCS:.c=.o}
 
 .c.o: Makefile
        ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@
@@ -36,7 +38,7 @@ distclean: clean
 depend:
 
 ${PROG}: ${DEPEND} ${OBJS}
-       ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD}
+       ${CC} ${LDFLAGS} -o $@ ${OBJS}
 
 test: ${PROG}
        ./${PROG}