# Generated automatically from Makefile.in by configure.
# Make file for PCRE (Perl-Compatible Regular Expression) library.

# The repeated -I. option is intentional, to work around the use of quoted
# includes in the pcre source.  Bracketed includes would be more portable
# for nested include-files.

SHELL		= /bin/sh
prefix		= /usr/local
exec_prefix	= ${prefix}
srcdir		= .


CC	= gcc
CFLAGS	= -O2  
CPPOPTS = -DHAVE_CONFIG_H -I. -I. -I../include
RANLIB	= ranlib
RM	= rm
x	= 
PRELIB	= lib
AR	= ar cq

##########################################################################

OBJ	= \
	maketables.o \
	get.o \
	study.o \
	pcre.o

PCR_DEP	= \
	internal.h \
	pcre.h

all:	$(PRELIB)pcre.a $(PRELIB)pcreposix.a pcretest$x pgrep$x

.SUFFIXES: .i

.c.o:
# compiling
	$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c

.c.i:
# compiling
	$(CPP) -C $(CPPOPTS) $*.c >$@

pgrep$x:	$(PRELIB)pcre.a pgrep.o
		$(CC) $(CFLAGS) -o $@ pgrep.o $(PRELIB)pcre.a

pcretest$x:	$(PRELIB)pcre.a $(PRELIB)pcreposix.a pcretest.o
		$(CC) $(CFLAGS) -o $@ pcretest.o $(PRELIB)pcre.a $(PRELIB)pcreposix.a

$(PRELIB)pcre.a: $(OBJ)
		$(RM) -f $(PRELIB)pcre.a
		$(AR) $(PRELIB)pcre.a $(OBJ)
		$(RANLIB) $(PRELIB)pcre.a

$(PRELIB)pcreposix.a: pcreposix.o
		$(RM) -f $(PRELIB)pcreposix.a
		$(AR) $(PRELIB)pcreposix.a pcreposix.o
		$(RANLIB) $(PRELIB)pcreposix.a

pcre.o:		chartables.c pcre.c $(PCR_DEP)

pcreposix.o:	pcreposix.c pcreposix.h $(PCR_DEP)

maketables.o:	maketables.c $(PCR_DEP)
# compiling
	$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/maketables.c

get.o:		get.c $(PCR_DEP)

study.o:	study.c $(PCR_DEP)

pcretest.o:	pcretest.c pcre.h

pgrep.o:	pgrep.c pcre.h

# An auxiliary program makes the default character table source

chartables.c:	dftables$x
		./dftables$x >$@

dftables$x:	dftables.c maketables.c $(PCR_DEP)
# compiling
		$(CC) -o $@ $(CFLAGS) $(CPPOPTS) $(srcdir)/dftables.c

# We deliberately omit dftables and chartables.c from 'make clean'; once made
# chartables.c shouldn't change, and if people have edited the tables by hand,
# you don't want to throw them away.

clean:;		$(RM) -f *.o *.a pcretest$x pgrep$x

distclean:	clean ; $(RM) -f pcre.h dftables$x chartables.c

runtest:	all
		./RunTest

# End
