| 1 |
# Make file for PCRE (Perl-Compatible Regular Expression) library. |
# Make file for PCRE (Perl-Compatible Regular Expression) library. |
| 2 |
|
|
| 3 |
# Edit CC, CFLAGS, and RANLIB for your system. |
# If you are using a Unix system, see below. |
| 4 |
|
|
| 5 |
|
############################################################################## |
| 6 |
|
# If you want to compile PCRE for a non-Unix system, note that it consists |
| 7 |
|
# entirely of code written in Standard C, and so should compile successfully |
| 8 |
|
# using normal compiling commands to do the following: |
| 9 |
|
# |
| 10 |
|
# (1) Compile dftables.c as a stand-alone program, and then run it with |
| 11 |
|
# output sent to chartables.c. This generates a set of standard character |
| 12 |
|
# tables. |
| 13 |
|
# |
| 14 |
|
# (2) Compile maketables.c, get.c, study.c and pcre.c and link them all |
| 15 |
|
# together. This is the pcre library (chartables.c gets included by means of |
| 16 |
|
# an #include directive). |
| 17 |
|
# |
| 18 |
|
# (3) Compile pcreposix.c and link it as the pcreposix library. |
| 19 |
|
# |
| 20 |
|
# (4) Compile the test program pcretest.c. This needs the functions in the |
| 21 |
|
# pcre and pcreposix libraries when linking. |
| 22 |
|
# |
| 23 |
|
# (5) Run pcretest on the testinput files, and check that the output matches |
| 24 |
|
# the corresponding testoutput files. You must use the -i option with |
| 25 |
|
# testinput2. |
| 26 |
|
|
| 27 |
|
|
| 28 |
|
############################################################################## |
| 29 |
|
# On a Unix system: |
| 30 |
|
# |
| 31 |
|
# Edit CC, CFLAGS, and RANLIB for your system. |
| 32 |
|
# |
| 33 |
# It is believed that RANLIB=ranlib is required for AIX, BSDI, FreeBSD, Linux, |
# It is believed that RANLIB=ranlib is required for AIX, BSDI, FreeBSD, Linux, |
| 34 |
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix. |
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix. |
| 35 |
|
# |
| 36 |
# Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the |
# Use CFLAGS = -DUSE_BCOPY on SunOS4 and any other system that lacks the |
| 37 |
# memmove() function, but has bcopy(). |
# memmove() function, but has bcopy(). |
| 38 |
|
# |
| 39 |
# Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that |
# Use CFLAGS = -DSTRERROR_FROM_ERRLIST on SunOS4 and any other system that |
| 40 |
# lacks the strerror() function, but can provide the equivalent by indexing |
# lacks the strerror() function, but can provide the equivalent by indexing |
| 41 |
# into errlist. |
# into errlist. |
| 45 |
CFLAGS = |
CFLAGS = |
| 46 |
RANLIB = @true |
RANLIB = @true |
| 47 |
|
|
| 48 |
########################################################################## |
# If you are going to obey "make install", edit these settings for your |
| 49 |
|
# system. BINDIR is the directory in which the pgrep command is installed. |
| 50 |
|
# INCDIR is the directory in which the public header file pcre.h is installed. |
| 51 |
|
# LIBDIR is the directory in which the libraries are installed. MANDIR is the |
| 52 |
|
# directory in which the man pages are installed. The pcretest program, as it |
| 53 |
|
# is a test program, does not get installed anywhere. |
| 54 |
|
|
| 55 |
|
BINDIR = /usr/local/bin |
| 56 |
|
INCDIR = /usr/local/include |
| 57 |
|
LIBDIR = /usr/local/lib |
| 58 |
|
MANDIR = /usr/local/man |
| 59 |
|
|
| 60 |
|
|
| 61 |
|
############################################################################## |
| 62 |
|
|
| 63 |
OBJ = maketables.o get.o study.o pcre.o |
OBJ = maketables.o get.o study.o pcre.o |
| 64 |
|
|
| 109 |
dftables: dftables.c maketables.c pcre.h internal.h Makefile |
dftables: dftables.c maketables.c pcre.h internal.h Makefile |
| 110 |
$(CC) -o dftables $(CFLAGS) dftables.c |
$(CC) -o dftables $(CFLAGS) dftables.c |
| 111 |
|
|
| 112 |
|
install: all |
| 113 |
|
cp libpcre.a libpcreposix.a $(LIBDIR) |
| 114 |
|
cp pcre.h $(INCDIR) |
| 115 |
|
cp pgrep $(BINDIR) |
| 116 |
|
cp pcre.3 pcreposix.3 $(MANDIR)/man3 |
| 117 |
|
cp pgrep.1 $(MANDIR)/man1 |
| 118 |
|
|
| 119 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
| 120 |
# chartables.c shouldn't change, and if people have edited the tables by hand, |
# chartables.c shouldn't change, and if people have edited the tables by hand, |
| 121 |
# you don't want to throw them away. |
# you don't want to throw them away. |