# Automagically generated by 'configure'

PROG=mdp
CFLAGS+=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mcpu=power8 -mtune=power8 -DHAS_NO_STRLCPY -DHAS_NO_STRLCAT -DHAS_NO_WCSLCPY -std=c99 -pedantic
CFLAGS+=-Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual
CFLAGS+=-Wstrict-prototypes -Wmissing-prototypes
CFLAGS+=-Wmissing-declarations -Wnested-externs -Winline
CFLAGS+=-DMDP_VERSION=\"0.7.4\" -D_GNU_SOURCE
CFLAGS+=-O2
EXTRA_OBJECTS=arc4random.o strlcpy.o strlcat.o wcslcpy.o
CC?=cc
PREFIX?=/usr
MANDEST=share/man
CURSESLIB=-lncursesw
PROG=stub
SRC=../../../src
OBJECTS= \
	stub.o \
	${SRC}/debug.o \
	${SRC}/lock.o \
	${SRC}/str.o \
	${SRC}/utils.o \
	${SRC}/xmalloc.o

OBJECTS+=${EXTRA_OBJECTS}
CFLAGS+=-I${SRC}/

all: ${PROG}

arc4random.o:
	cp ${SRC}/arc4random.o .

strlcpy.o:
	cp ${SRC}/strlcpy.o .

strlcat.o:
	cp ${SRC}/strlcat.o .

wcslcpy.o:
	cp ${SRC}/wcslcpy.o .

${PROG}: ${OBJECTS}
	${CC} ${LDFLAGS} -o ${PROG} ${OBJECTS} ${CURSESLIB} 

test: ${PROG}
	@find . -name "test_*.sh" | xargs -n 1 sh

clean:
	rm -f ${PROG} *.o *core test.expected test.stdout test.stderr test.diff
