VPATH=@srcdir@
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
datadir=@datadir@
includedir=@includedir@
infodir=@infodir@
libdir=@libdir@
libexecdir=@libexecdir@
localstatedir=@localstatedir@
mandir=@mandir@
sbindir=@sbindir@
sharedstatedir=@sharedstatedir@
sysconfdir=@sysconfdir@
# Things you might want to put in DEFS:
# -Dvoid=int		compilers that don't do void
# -DCHARBITS=0377	compilers that don't do unsigned char
# -DSTATIC=extern	compilers that don't like "static foo();" as forward decl
# -DSTRCSPN		library does not have strcspn()
# -Dstrchr=index	library does not have strchr()
# -DERRAVAIL		have utzoo-compatible error() function and friends

SHELL=	 /bin/sh
CC=	 @CC@
INSTALL= @INSTALL@

DEFS=	 @DEFS@
LIBS=	 @LIBS@

SRCS=	regexp.c regsub.c
OBJS=	regexp.o regsub.o
INCLUDES= -I$(srcdir)
CFLAGS= -O $(INCLUDES) $(DEFS)

all:	libregexp.a

libregexp.a: $(OBJS)
	ar cruv libregexp.a $(OBJS)
	@RANLIB@ libregexp.a

dist:   $(SRCS) Makefile
	-mkdir ../../dist/source/regexp
	cp -p $(SRCS) ../../dist/source/regexp/
	cp -p Makefile.in ../../dist/source/regexp/

.c.o:
	-rm -f $*.o
	${CC} ${CFLAGS} ${INCLUDES} ${DEFS} -c $*.c

clean:
	-rm -f *~ \#* *.o libregexp.a
