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 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 |
study.o: study.c pcre.h internal.h Makefile
|
52 |
$(CC) -c $(CFLAGS) study.c
|
53 |
|
54 |
pcretest.o: pcretest.c pcre.h Makefile
|
55 |
$(CC) -c $(CFLAGS) pcretest.c
|
56 |
|
57 |
pgrep.o: pgrep.c pcre.h Makefile
|
58 |
$(CC) -c $(CFLAGS) pgrep.c
|
59 |
|
60 |
# An auxiliary program makes the default character table source
|
61 |
|
62 |
chartables.c: dftables
|
63 |
./dftables >chartables.c
|
64 |
|
65 |
dftables: dftables.c maketables.c pcre.h internal.h Makefile
|
66 |
$(CC) -o dftables $(CFLAGS) dftables.c
|
67 |
|
68 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made
|
69 |
# chartables.c shouldn't change, and if people have edited the tables by hand,
|
70 |
# you don't want to throw them away.
|
71 |
|
72 |
clean:; -rm -f *.o *.a pcretest pgrep
|
73 |
|
74 |
runtest: all
|
75 |
./RunTest
|
76 |
|
77 |
# End
|