| 27 |
prefix = @prefix@ |
prefix = @prefix@ |
| 28 |
exec_prefix = @exec_prefix@ |
exec_prefix = @exec_prefix@ |
| 29 |
|
|
| 30 |
BINDIR = $(exec_prefix)/bin |
BINDIR = @bindir@ |
| 31 |
LIBDIR = $(exec_prefix)/lib |
LIBDIR = @libdir@ |
| 32 |
INCDIR = $(prefix)/include |
INCDIR = @includedir@ |
| 33 |
MANDIR = $(prefix)/man |
MANDIR = @mandir@ |
| 34 |
|
|
| 35 |
CC = @CC@ |
CC = @CC@ |
| 36 |
CFLAGS = @CFLAGS@ |
CFLAGS = @CFLAGS@ |
| 45 |
LIBTOOL = @LIBTOOL@ |
LIBTOOL = @LIBTOOL@ |
| 46 |
LIBSUFFIX = @LIBSUFFIX@ |
LIBSUFFIX = @LIBSUFFIX@ |
| 47 |
|
|
| 48 |
|
# These are the version numbers for the shared libraries |
| 49 |
|
|
| 50 |
|
PCRELIBVERSION = @PCRE_LIB_VERSION@ |
| 51 |
|
PCREPOSIXLIBVERSION = @PCRE_POSIXLIB_VERSION@ |
| 52 |
|
|
| 53 |
|
|
| 54 |
#---------------------------------------------------------------------------# |
#---------------------------------------------------------------------------# |
| 55 |
# A copy of install-sh is in this distribution and is used by default. # |
# A copy of install-sh is in this distribution and is used by default. # |
| 110 |
@echo '--- Building shared library: libpcre' |
@echo '--- Building shared library: libpcre' |
| 111 |
@echo ' ' |
@echo ' ' |
| 112 |
-rm -f libpcre.la |
-rm -f libpcre.la |
| 113 |
libtool $(CC) -o libpcre.la -rpath $(LIBDIR) $(LOBJ) |
libtool $(CC) -version-info '$(PCRELIBVERSION)' -o libpcre.la -rpath $(LIBDIR) $(LOBJ) |
| 114 |
|
|
| 115 |
libpcreposix.a: pcreposix.o |
libpcreposix.a: pcreposix.o |
| 116 |
@echo ' ' |
@echo ' ' |
| 125 |
@echo '--- Building shared library: libpcreposix' |
@echo '--- Building shared library: libpcreposix' |
| 126 |
@echo ' ' |
@echo ' ' |
| 127 |
-rm -f libpcreposix.la |
-rm -f libpcreposix.la |
| 128 |
libtool $(CC) -o libpcreposix.la -rpath $(LIBDIR) pcreposix.lo |
libtool $(CC) -version-info '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la -rpath $(LIBDIR) pcreposix.lo |
| 129 |
|
|
| 130 |
pcre.o: chartables.c pcre.c pcre.h internal.h config.h Makefile |
pcre.o: chartables.c pcre.c pcre.h internal.h config.h Makefile |
| 131 |
$(LIBTOOL) $(CC) -c $(CFLAGS) pcre.c |
$(LIBTOOL) $(CC) -c $(CFLAGS) pcre.c |
| 160 |
$(LIBTOOL) $(INSTALL_DATA) libpcre.$(LIBSUFFIX) $(LIBDIR)/libpcre.$(LIBSUFFIX) |
$(LIBTOOL) $(INSTALL_DATA) libpcre.$(LIBSUFFIX) $(LIBDIR)/libpcre.$(LIBSUFFIX) |
| 161 |
$(LIBTOOL) $(INSTALL_DATA) libpcreposix.$(LIBSUFFIX) $(LIBDIR)/libpcreposix.$(LIBSUFFIX) |
$(LIBTOOL) $(INSTALL_DATA) libpcreposix.$(LIBSUFFIX) $(LIBDIR)/libpcreposix.$(LIBSUFFIX) |
| 162 |
$(INSTALL_DATA) pcre.h $(INCDIR)/pcre.h |
$(INSTALL_DATA) pcre.h $(INCDIR)/pcre.h |
| 163 |
|
$(INSTALL_DATA) pcreposix.h $(INCDIR)/pcreposix.h |
| 164 |
$(INSTALL_DATA) doc/pcre.3 $(MANDIR)/man3/pcre.3 |
$(INSTALL_DATA) doc/pcre.3 $(MANDIR)/man3/pcre.3 |
| 165 |
$(INSTALL_DATA) doc/pcreposix.3 $(MANDIR)/man3/pcre.3 |
$(INSTALL_DATA) doc/pcreposix.3 $(MANDIR)/man3/pcreposix.3 |
| 166 |
$(INSTALL_DATA) doc/pgrep.1 $(MANDIR)/man1/pgrep.1 |
$(INSTALL_DATA) doc/pgrep.1 $(MANDIR)/man1/pgrep.1 |
| 167 |
@if test "$(LIBTOOL)" = "libtool"; then \ |
@if test "$(LIBTOOL)" = "libtool"; then \ |
| 168 |
|
echo ' '; \ |
| 169 |
echo '--- Rebuilding pgrep to use installed shared library ---'; \ |
echo '--- Rebuilding pgrep to use installed shared library ---'; \ |
| 170 |
echo $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \ |
echo $(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \ |
| 171 |
$(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \ |
$(CC) $(CFLAGS) -o pgrep pgrep.o -L$(LIBDIR) -lpcre; \ |
| 172 |
|
echo '--- Rebuilding pcretest to use installed shared library ---'; \ |
| 173 |
|
echo $(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \ |
| 174 |
|
$(CC) $(CFLAGS) -o pcretest pcretest.o -L$(LIBDIR) -lpcre -lpcreposix; \ |
| 175 |
fi |
fi |
| 176 |
$(INSTALL) pgrep $(BINDIR)/pgrep \ |
$(INSTALL) pgrep $(BINDIR)/pgrep |
| 177 |
|
$(INSTALL) pcre-config $(BINDIR)/pcre-config |
| 178 |
|
|
| 179 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
| 180 |
# 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, |
| 185 |
# But "make distclean" should get back to a virgin distribution |
# But "make distclean" should get back to a virgin distribution |
| 186 |
|
|
| 187 |
distclean: clean |
distclean: clean |
| 188 |
-rm -f chartables.c libtool \ |
-rm -f chartables.c libtool pcre-config pcre.h \ |
| 189 |
Makefile config.h config.status config.log config.cache |
Makefile config.h config.status config.log config.cache |
| 190 |
|
|
| 191 |
check: runtest |
check: runtest |