| 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. |
# Edit CC, CFLAGS, and RANLIB for your system. |
| 4 |
|
|
| 5 |
# 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, |
| 6 |
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix. |
# MIPS RISCOS, NetBSD, OpenBSD, Digital Unix, and Ultrix. |
| 12 |
# lacks the strerror() function, but can provide the equivalent by indexing |
# lacks the strerror() function, but can provide the equivalent by indexing |
| 13 |
# into errlist. |
# into errlist. |
| 14 |
|
|
| 15 |
CC = gcc -O |
CC = gcc -O2 |
| 16 |
CFLAGS = |
CFLAGS = |
| 17 |
RANLIB = @true |
RANLIB = @true |
| 18 |
|
|
| 38 |
ar cq libpcreposix.a pcreposix.o |
ar cq libpcreposix.a pcreposix.o |
| 39 |
$(RANLIB) libpcreposix.a |
$(RANLIB) libpcreposix.a |
| 40 |
|
|
| 41 |
pcre.o: pcre.c pcre.h internal.h |
pcre.o: pcre.c pcre.h internal.h Makefile |
| 42 |
$(CC) -c $(CFLAGS) pcre.c |
$(CC) -c $(CFLAGS) pcre.c |
| 43 |
|
|
| 44 |
pcreposix.o: pcreposix.c pcreposix.h internal.h |
pcreposix.o: pcreposix.c pcreposix.h internal.h Makefile |
| 45 |
$(CC) -c $(CFLAGS) pcreposix.c |
$(CC) -c $(CFLAGS) pcreposix.c |
| 46 |
|
|
| 47 |
chartables.o: chartables.c |
chartables.o: chartables.c |
| 48 |
$(CC) -c $(CFLAGS) chartables.c |
$(CC) -c $(CFLAGS) chartables.c |
| 49 |
|
|
| 50 |
study.o: study.c pcre.h internal.h |
study.o: study.c pcre.h internal.h Makefile |
| 51 |
$(CC) -c $(CFLAGS) study.c |
$(CC) -c $(CFLAGS) study.c |
| 52 |
|
|
| 53 |
pcretest.o: pcretest.c pcre.h |
pcretest.o: pcretest.c pcre.h Makefile |
| 54 |
$(CC) -c $(CFLAGS) pcretest.c |
$(CC) -c $(CFLAGS) pcretest.c |
| 55 |
|
|
| 56 |
pgrep.o: pgrep.c pcre.h |
pgrep.o: pgrep.c pcre.h Makefile |
| 57 |
$(CC) -c $(CFLAGS) pgrep.c |
$(CC) -c $(CFLAGS) pgrep.c |
| 58 |
|
|
| 59 |
# An auxiliary program makes the character tables |
# An auxiliary program makes the character tables |
| 61 |
chartables.c: maketables |
chartables.c: maketables |
| 62 |
./maketables >chartables.c |
./maketables >chartables.c |
| 63 |
|
|
| 64 |
maketables: maketables.c |
maketables: maketables.c Makefile |
| 65 |
$(CC) -o maketables $(CFLAGS) maketables.c |
$(CC) -o maketables $(CFLAGS) maketables.c |
| 66 |
|
|
| 67 |
# We deliberately omit maketables and chartables.c from 'make clean'; once made |
# We deliberately omit maketables and chartables.c from 'make clean'; once made |
| 70 |
|
|
| 71 |
clean:; /bin/rm -f *.o *.a pcretest pgrep |
clean:; /bin/rm -f *.o *.a pcretest pgrep |
| 72 |
|
|
| 73 |
|
# Run the tests |
| 74 |
|
|
| 75 |
|
runtest: all |
| 76 |
|
./pcretest testinput testtry |
| 77 |
|
diff testtry testoutput |
| 78 |
|
./pcretest -i testinput2 testtry |
| 79 |
|
diff testtry testoutput2 |
| 80 |
|
rm -f testtry |
| 81 |
|
|
| 82 |
# End |
# End |