1sysconfdir=@sysconfdir@
2piddir=@piddir@
3srcdir=@srcdir@
4top_srcdir=@top_srcdir@
5
6VPATH=@srcdir@
7CC=@CC@
8LD=@LD@
9CFLAGS=@CFLAGS@
10CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/.. @CPPFLAGS@ @DEFS@
11LIBS=@LIBS@
12AR=@AR@
13RANLIB=@RANLIB@
14INSTALL=@INSTALL@
15LDFLAGS=-L. @LDFLAGS@
16
17OPENBSD=base64.o \
18	basename.o \
19	bcrypt_pbkdf.o \
20	bcrypt_pbkdf.o \
21	bindresvport.o \
22	blowfish.o \
23	daemon.o \
24	dirname.o \
25	explicit_bzero.o \
26	fmt_scaled.o \
27	freezero.o \
28	getcwd.o \
29	getgrouplist.o \
30	getopt_long.o \
31	getrrsetbyname.o \
32	glob.o \
33	inet_aton.o \
34	inet_ntoa.o \
35	inet_ntop.o \
36	md5.o \
37	mktemp.o \
38	pwcache.o \
39	readpassphrase.o \
40	reallocarray.o \
41	realpath.o \
42	recallocarray.o \
43	rmd160.o \
44	rresvport.o \
45	setenv.o \
46	setproctitle.o \
47	sha1.o \
48	sha2.o \
49	sigact.o \
50	strcasestr.o \
51	strlcat.o \
52	strlcpy.o \
53	strmode.o \
54	strndup.o \
55	strnlen.o \
56	strptime.o \
57	strsep.o \
58	strtoll.o \
59	strtonum.o \
60	strtoull.o \
61	strtoul.o \
62	timingsafe_bcmp.o \
63	vis.o
64
65COMPAT=	arc4random.o \
66	bsd-asprintf.o \
67	bsd-closefrom.o \
68	bsd-cygwin_util.o \
69	bsd-err.o \
70	bsd-flock.o \
71	bsd-getline.o \
72	bsd-getpagesize.o \
73	bsd-getpeereid.o \
74	bsd-malloc.o \
75	bsd-misc.o \
76	bsd-nextstep.o \
77	bsd-openpty.o \
78	bsd-poll.o \
79	bsd-setres_id.o \
80	bsd-signal.o \
81	bsd-snprintf.o \
82	bsd-statvfs.o \
83	bsd-waitpid.o \
84	fake-rfc2553.o \
85	getrrsetbyname-ldns.o \
86	kludge-fd_set.o \
87	openssl-compat.o \
88	libressl-api-compat.o \
89	xcrypt.o
90
91PORTS=	port-aix.o \
92	port-irix.o \
93	port-linux.o \
94	port-solaris.o \
95	port-net.o \
96	port-uw.o
97
98.c.o:
99	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
100
101all: libopenbsd-compat.a
102
103$(COMPAT): ../config.h
104$(OPENBSD): ../config.h
105$(PORTS): ../config.h
106
107libopenbsd-compat.a:  $(COMPAT) $(OPENBSD) $(PORTS)
108	$(AR) rv $@ $(COMPAT) $(OPENBSD) $(PORTS)
109	$(RANLIB) $@
110
111clean:
112	rm -f *.o *.a core
113
114distclean: clean
115	rm -f Makefile *~
116