# 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@

CFLAGS= -O

SRCS=	regexp.c regsub.c
OBJS=	regexp.o regsub.o
INCLUDES= -I.

all:	libregexp.a

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

distclean: clean
	rm -f Makefile

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

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

install: all
