# $Id: Makefile.in,v 1.37 2005/12/31 05:33:37 djm Exp $

VPATH=.
CC=gcc
LD=gcc
srcdir=.
CFLAGS = -O2
CPPFLAGS=-I. -I.. -I$(srcdir) -I$(srcdir)/..
AR=ar
RANLIB=ranlib

OPENBSD=strlcat.o strlcpy.o strmode.o strsep.o strtonum.o \
strtoll.o strtoul.o

COMPAT=bsd-asprintf.o 

.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

all: libopenbsd-compat.a

$(COMPAT): config.h
$(OPENBSD): config.h

libopenbsd-compat.a:  $(COMPAT) $(OPENBSD)
	rm -f $@
	$(AR) cq $@ $(COMPAT) $(OPENBSD)
	$(RANLIB) $@

clean:
	rm -f *.o *.a core 

distclean: clean
	rm -f *~ config.h

# vim:noexpandtab
