mirror of
https://github.com/opnsense/src.git
synced 2026-03-03 13:51:30 -05:00
- Compile the tests with .t suffix, so prove can use them directly. - The CHECKX() macro should increment ntest just like the CHECK() macro. - For consistency remove # from the pwd.t output. Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>
33 lines
780 B
Makefile
33 lines
780 B
Makefile
# $FreeBSD$
|
|
|
|
SERVICES= dns
|
|
SERVICES+= grp
|
|
SERVICES+= pwd
|
|
SERVICES+= sysctl
|
|
|
|
CFLAGS= -O2 -pipe -std=gnu99 -fstack-protector
|
|
CFLAGS+= -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter
|
|
CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type
|
|
CFLAGS+= -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter
|
|
CFLAGS+= -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls
|
|
CFLAGS+= -Wold-style-definition -Wno-pointer-sign
|
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libcapsicum
|
|
CFLAGS+= -ggdb
|
|
|
|
SERVTEST= ${SERVICES:=.t}
|
|
|
|
all: ${SERVTEST}
|
|
|
|
.for SERVICE in ${SERVICES}
|
|
|
|
${SERVICE}.t: ${SERVICE}.c
|
|
${CC} ${CFLAGS} ${@:.t=.c} -o $@ -lcapsicum -lnv
|
|
|
|
.endfor
|
|
|
|
test: all
|
|
@prove -r ${.CURDIR}
|
|
|
|
clean:
|
|
rm -f ${SERVTEST}
|