# Make file for PCRE (Perl-Compatible Regular Expression) library. # Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the # memmove() function, but has bcopy(). # Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that # lacks the strerror() function, but can provide the equivalent by indexing # into errlist. SHELL = /bin/sh prefix = @prefix@ exec_prefix = @exec_prefix@ srcdir = @srcdir@ VPATH = $(srcdir) @SET_MAKE@ CC = @CC@ CFLAGS = @CFLAGS@ @PCRE_DEFINES@ CPPOPTS = -I. RANLIB = @RANLIB@ RM = rm x = @PROG_EXT@ PRELIB = @LIB_PREFIX@ 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: @SHOW_CC@ @ECHO_CC@$(CC) $(CPPOPTS) $(CFLAGS) -c $(srcdir)/$*.c .c.i: @SHOW_CC@ @ECHO_CC@$(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) @SHOW_CC@ @ECHO_CC@$(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) @SHOW_CC@ @ECHO_CC@$(CC) -o $@ $(CFLAGS) $(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 dftables$x chartables.c runtest: all ./RunTest # End