#
# regular expression library
#
# $Header: /usr/local/libdata/cvs/c-lib/libregex/Makefile,v 1.6 1998/08/16 21:36:29 simons Exp $
#

# Compiler flags:
# ===============
#
# Define one of the following symbols to archive the described effect:
#
# DEBUG		- to include debugging info into the binary
#
CPPFLAGS += -DPOSIX_MISTAKE

# Linker flags:
# =============
#
LDFLAGS  =


#
# Labels:
# =======
#
CC	= gcc
LD	= gcc
AR	= ar
RANLIB	= ranlib
OBJS	= regcomp.o regerror.o regexec.o regfree.o


#
# Targets
#
.PHONY: all clean

all:	libregex.a

clean:
	rm -f ${OBJS} libregex.a test test.o *.core


#
# Actions
#
libregex.a:	${OBJS}
	rm -f libregex.a
	${AR} cr libregex.a ${OBJS}
	${RANLIB} libregex.a

test: 		test.o libregex.a
	${LD} test.o -o test ${LDFLAGS} libregex.a


#
# Dependencies
#
regcomp.o: regex.h utils.h regex2.h cclass.h cname.h
regerror.o: regex.h utils.h
regexec.o: regex.h utils.h regex2.h engine.c
regfree.o: regex.h utils.h regex2.h
test.o: regex.h
