blob: dabdb091211d1c9cd061002e6631d812a2f25740 [file] [log] [blame]
Darren Tucker316fac62014-06-17 23:06:07 +10001# $Id: Makefile.in,v 1.5 2014/06/17 13:06:08 dtucker Exp $
Darren Tucker4881c372006-02-19 22:50:20 +11002
3sysconfdir=@sysconfdir@
4piddir=@piddir@
5srcdir=@srcdir@
6top_srcdir=@top_srcdir@
7
8VPATH=@srcdir@
9CC=@CC@
10LD=@LD@
11CFLAGS=@CFLAGS@
12CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
Darren Tuckerf0625692006-08-19 19:12:14 +100013EXEEXT=@EXEEXT@
Darren Tucker4881c372006-02-19 22:50:20 +110014LIBCOMPAT=../libopenbsd-compat.a
Darren Tuckerf0625692006-08-19 19:12:14 +100015LIBS=@LIBS@
16LDFLAGS=@LDFLAGS@ $(LIBCOMPAT)
17
18TESTPROGS=closefromtest$(EXEEXT) snprintftest$(EXEEXT) strduptest$(EXEEXT) \
Darren Tucker316fac62014-06-17 23:06:07 +100019 strtonumtest$(EXEEXT) opensslvertest$(EXEEXT)
Darren Tucker4881c372006-02-19 22:50:20 +110020
21all: t-exec ${OTHERTESTS}
22
Darren Tucker316fac62014-06-17 23:06:07 +100023%$(EXEEXT): %.c $(LIBCOMPAT)
Darren Tuckerf0625692006-08-19 19:12:14 +100024 $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< $(LIBCOMPAT) $(LIBS)
25
Darren Tucker4881c372006-02-19 22:50:20 +110026t-exec: $(TESTPROGS)
27 @echo running compat regress tests
28 @for TEST in ""$?; do \
29 echo "run test $${TEST}" ... 1>&2; \
Darren Tuckerf0625692006-08-19 19:12:14 +100030 ./$${TEST}$(EXEEXT) || exit $$? ; \
Darren Tucker4881c372006-02-19 22:50:20 +110031 done
32 @echo finished compat regress tests
33
Darren Tucker4881c372006-02-19 22:50:20 +110034clean:
35 rm -f *.o *.a core $(TESTPROGS) valid.out
36
37distclean: clean
38 rm -f Makefile *~