| 1 |
# Make file for PCRE (Perl-Compatible Regular Expression) library.
|
| 2 |
|
| 3 |
# Edit CC, CFLAGS, and RANLIB for your system.
|
| 4 |
|
| 5 |
# It is believed that RANLIB=ranlib is required for AIX, BSDI, FreeBSD, Linux,
|
| 6 |
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix.
|
| 7 |
|
| 8 |
# Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the
|
| 9 |
# memmove() function, but has bcopy().
|
| 10 |
|
| 11 |
# Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that
|
| 12 |
# lacks the strerror() function, but can provide the equivalent by indexing
|
| 13 |
# into errlist.
|
| 14 |
|
| 15 |
AR = ar cq
|
| 16 |
CC = gcc -O2 -Wall
|
| 17 |
CFLAGS =
|
| 18 |
RANLIB = @true
|
| 19 |
|
| 20 |
##########################################################################
|
| 21 |
|
| 22 |
OBJ = maketables.o get.o study.o pcre.o
|
| 23 |
|
| 24 |
all: libpcre.a libpcreposix.a pcretest pgrep
|
| 25 |
|
| 26 |
pgrep: libpcre.a pgrep.o
|
| 27 |
$(CC) $(CFLAGS) -o pgrep pgrep.o libpcre.a
|
| 28 |
|
| 29 |
pcretest: libpcre.a libpcreposix.a pcretest.o
|
| 30 |
$(PURIFY) $(CC) $(CFLAGS) -o pcretest pcretest.o libpcre.a libpcreposix.a
|
| 31 |
|
| 32 |
libpcre.a: $(OBJ)
|
| 33 |
-rm -f libpcre.a
|
| 34 |
$(AR) libpcre.a $(OBJ)
|
| 35 |
$(RANLIB) libpcre.a
|
| 36 |
|
| 37 |
libpcreposix.a: pcreposix.o
|
| 38 |
-rm -f libpcreposix.a
|
| 39 |
$(AR) libpcreposix.a pcreposix.o
|
| 40 |
$(RANLIB) libpcreposix.a
|
| 41 |
|
| 42 |
pcre.o: chartables.c pcre.c pcre.h internal.h Makefile
|
| 43 |
$(CC) -c $(CFLAGS) pcre.c
|
| 44 |
|
| 45 |
pcreposix.o: pcreposix.c pcreposix.h internal.h pcre.h Makefile
|
| 46 |
$(CC) -c $(CFLAGS) pcreposix.c
|
| 47 |
|
| 48 |
maketables.o: maketables.c pcre.h internal.h Makefile
|
| 49 |
$(CC) -c $(CFLAGS) maketables.c
|
| 50 |
|
| 51 |
get.o: get.c pcre.h internal.h Makefile
|
| 52 |
$(CC) -c $(CFLAGS) get.c
|
| 53 |
|
| 54 |
study.o: study.c pcre.h internal.h Makefile
|
| 55 |
$(CC) -c $(CFLAGS) study.c
|
| 56 |
|
| 57 |
pcretest.o: pcretest.c pcre.h Makefile
|
| 58 |
$(CC) -c $(CFLAGS) pcretest.c
|
| 59 |
|
| 60 |
pgrep.o: pgrep.c pcre.h Makefile
|
| 61 |
$(CC) -c $(CFLAGS) pgrep.c
|
| 62 |
|
| 63 |
# An auxiliary program makes the default character table source
|
| 64 |
|
| 65 |
chartables.c: dftables
|
| 66 |
./dftables >chartables.c
|
| 67 |
|
| 68 |
dftables: dftables.c maketables.c pcre.h internal.h Makefile
|
| 69 |
$(CC) -o dftables $(CFLAGS) dftables.c
|
| 70 |
|
| 71 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made
|
| 72 |
# chartables.c shouldn't change, and if people have edited the tables by hand,
|
| 73 |
# you don't want to throw them away.
|
| 74 |
|
| 75 |
clean:; -rm -f *.o *.a pcretest pgrep
|
| 76 |
|
| 77 |
runtest: all
|
| 78 |
./RunTest
|
| 79 |
|
| 80 |
# End
|