| 54 |
INCDIR = @includedir@ |
INCDIR = @includedir@ |
| 55 |
MANDIR = @mandir@ |
MANDIR = @mandir@ |
| 56 |
|
|
| 57 |
|
# EXEEXT is set by configure to the extention of an executable file |
| 58 |
|
# OBJEXT is set by configure to the extention of an object file |
| 59 |
|
# The BUILD_* equivalents are the same but for the host we're building on |
| 60 |
|
|
| 61 |
|
EXEEXT = @EXEEXT@ |
| 62 |
|
OBJEXT = @OBJEXT@ |
| 63 |
|
# Note that these are just here to have a convenient place to look at the |
| 64 |
|
# outcome. |
| 65 |
|
BUILD_EXEEXT = @BUILD_EXEEXT@ |
| 66 |
|
BUILD_OBJEXT = @BUILD_OBJEXT@ |
| 67 |
|
|
| 68 |
|
# The compiler, C flags, preprocessor flags, etc |
| 69 |
|
|
| 70 |
CC = @CC@ |
CC = @CC@ |
| 71 |
CFLAGS = @CFLAGS@ |
CFLAGS = @CFLAGS@ |
| 72 |
|
CPPFLAGS = @CPPFLAGS@ |
| 73 |
CC_FOR_BUILD = @CC_FOR_BUILD@ |
CC_FOR_BUILD = @CC_FOR_BUILD@ |
| 74 |
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ |
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ |
| 75 |
|
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ |
| 76 |
UTF8 = @UTF8@ |
UTF8 = @UTF8@ |
| 77 |
NEWLINE = @NEWLINE@ |
NEWLINE = @NEWLINE@ |
| 78 |
POSIX_MALLOC_THRESHOLD = @POSIX_MALLOC_THRESHOLD@ |
POSIX_MALLOC_THRESHOLD = @POSIX_MALLOC_THRESHOLD@ |
| 87 |
|
|
| 88 |
LIBTOOL = @LIBTOOL@ |
LIBTOOL = @LIBTOOL@ |
| 89 |
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) |
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) |
| 90 |
LINK = $(LIBTOOL) --mode=link $(CC) --no-undefined $(CFLAGS) -I. -I$(top_srcdir) |
@ON_WINDOWS@LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs |
| 91 |
|
@NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
| 92 |
|
LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
| 93 |
|
LINK_FOR_BUILD = $(LIBTOOL) --mode=link $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -I$(top_srcdir) |
| 94 |
|
|
| 95 |
# These are the version numbers for the shared libraries |
# These are the version numbers for the shared libraries |
| 96 |
|
|
| 100 |
############################################################################## |
############################################################################## |
| 101 |
|
|
| 102 |
|
|
| 103 |
OBJ = maketables.o get.o study.o pcre.o @POSIX_OBJ@ |
OBJ = maketables.@OBJEXT@ get.@OBJEXT@ study.@OBJEXT@ pcre.@OBJEXT@ @POSIX_OBJ@ |
| 104 |
LOBJ = maketables.lo get.lo study.lo pcre.lo @POSIX_LOBJ@ |
LOBJ = maketables.lo get.lo study.lo pcre.lo @POSIX_LOBJ@ |
| 105 |
|
|
| 106 |
all: libpcre.la @POSIX_LIB@ pcretest pcregrep |
all: libpcre.la @POSIX_LIB@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @ON_WINDOWS@ winshared |
| 107 |
|
|
| 108 |
pcregrep: libpcre.la pcregrep.o |
pcregrep@EXEEXT@: libpcre.la pcregrep.@OBJEXT@ @ON_WINDOWS@ winshared |
| 109 |
$(LINK) -o pcregrep pcregrep.o libpcre.la |
$(LINK) -o pcregrep@EXEEXT@ pcregrep.@OBJEXT@ -lpcre |
| 110 |
|
|
| 111 |
pcretest: libpcre.la @POSIX_LIB@ pcretest.o |
pcretest@EXEEXT@: libpcre.la @POSIX_LIB@ pcretest.@OBJEXT@ @ON_WINDOWS@ winshared |
| 112 |
$(LINK) $(PURIFY) $(EFENCE) -o pcretest pcretest.o \ |
$(LINK) $(PURIFY) $(EFENCE) -o pcretest@EXEEXT@ pcretest.@OBJEXT@ \ |
| 113 |
libpcre.la @POSIX_LIB@ |
-lpcre @POSIX_LIB@ |
| 114 |
|
|
| 115 |
libpcre.la: $(OBJ) |
libpcre.la: $(OBJ) |
| 116 |
-rm -f libpcre.la |
-rm -f libpcre.la |
| 117 |
$(LINK) -rpath $(LIBDIR) -version-info \ |
$(LINKLIB) -rpath $(LIBDIR) -version-info \ |
| 118 |
'$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) |
'$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) |
| 119 |
|
|
| 120 |
libpcreposix.la: pcreposix.o |
libpcreposix.la: pcreposix.@OBJEXT@ |
| 121 |
-rm -f libpcreposix.la |
-rm -f libpcreposix.la |
| 122 |
$(LINK) -rpath $(LIBDIR) -L. -lpcre -version-info \ |
$(LINKLIB) -rpath $(LIBDIR) -L. -lpcre -version-info \ |
| 123 |
'$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo |
'$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo |
| 124 |
|
|
| 125 |
pcre.o: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ |
pcre.@OBJEXT@: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ |
| 126 |
$(top_srcdir)/internal.h $(top_srcdir)/printint.c \ |
$(top_srcdir)/internal.h $(top_srcdir)/printint.c \ |
| 127 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
| 128 |
$(LTCOMPILE) $(UTF8) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c |
$(LTCOMPILE) $(UTF8) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c |
| 129 |
|
|
| 130 |
pcreposix.o: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ |
pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ |
| 131 |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
| 132 |
$(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c |
$(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c |
| 133 |
|
|
| 134 |
maketables.o: $(top_srcdir)/maketables.c $(top_srcdir)/internal.h \ |
maketables.@OBJEXT@: $(top_srcdir)/maketables.c $(top_srcdir)/internal.h \ |
| 135 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
| 136 |
$(LTCOMPILE) $(top_srcdir)/maketables.c |
$(LTCOMPILE) $(top_srcdir)/maketables.c |
| 137 |
|
|
| 138 |
get.o: $(top_srcdir)/get.c $(top_srcdir)/internal.h \ |
get.@OBJEXT@: $(top_srcdir)/get.c $(top_srcdir)/internal.h \ |
| 139 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
| 140 |
$(LTCOMPILE) $(top_srcdir)/get.c |
$(LTCOMPILE) $(top_srcdir)/get.c |
| 141 |
|
|
| 142 |
study.o: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ |
study.@OBJEXT@: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ |
| 143 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
| 144 |
$(LTCOMPILE) $(UTF8) $(top_srcdir)/study.c |
$(LTCOMPILE) $(UTF8) $(top_srcdir)/study.c |
| 145 |
|
|
| 146 |
pcretest.o: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ |
pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ |
| 147 |
$(top_srcdir)/printint.c \ |
$(top_srcdir)/printint.c \ |
| 148 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
| 149 |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(LINK_SIZE) $(top_srcdir)/pcretest.c |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(LINK_SIZE) $(top_srcdir)/pcretest.c |
| 150 |
|
|
| 151 |
pcregrep.o: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h |
pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h |
| 152 |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c |
| 153 |
|
|
| 154 |
|
# Some Windows-specific targets, for Cygwin and MinGW |
| 155 |
|
|
| 156 |
|
winshared : .libs/@WIN_PREFIX@pcre.dll .libs/@WIN_PREFIX@pcreposix.dll |
| 157 |
|
|
| 158 |
|
.libs/@WIN_PREFIX@pcre.dll : libpcre.la |
| 159 |
|
$(CC) $(CFLAGS) -shared -o $@ \ |
| 160 |
|
-Wl,--whole-archive .libs/libpcre.a \ |
| 161 |
|
-Wl,--out-implib,.libs/libpcre.dll.a \ |
| 162 |
|
-Wl,--output-def,.libs/@WIN_PREFIX@pcre.dll-def \ |
| 163 |
|
-Wl,--export-all-symbols \ |
| 164 |
|
-Wl,--no-whole-archive |
| 165 |
|
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcre.dll'#" \ |
| 166 |
|
-e "s#library_names=''#library_names='libpcre.dll.a'#" \ |
| 167 |
|
< .libs/libpcre.lai > .libs/libpcre.lai.tmp && \ |
| 168 |
|
mv .libs/libpcre.lai.tmp .libs/libpcre.lai |
| 169 |
|
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcre.dll'#" \ |
| 170 |
|
-e "s#library_names=''#library_names='libpcre.dll.a'#" \ |
| 171 |
|
< libpcre.la > libpcre.la.tmp && \ |
| 172 |
|
mv libpcre.la.tmp libpcre.la |
| 173 |
|
|
| 174 |
|
|
| 175 |
|
.libs/@WIN_PREFIX@pcreposix.dll: libpcreposix.la libpcre.la |
| 176 |
|
$(CC) $(CFLAGS) -shared -o $@ \ |
| 177 |
|
-Wl,--whole-archive .libs/libpcreposix.a \ |
| 178 |
|
-Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \ |
| 179 |
|
-Wl,--output-def,.libs/@WIN_PREFIX@pcreposix.dll-def \ |
| 180 |
|
-Wl,--export-all-symbols \ |
| 181 |
|
-Wl,--no-whole-archive .libs/libpcre.a |
| 182 |
|
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ |
| 183 |
|
-e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ |
| 184 |
|
< .libs/libpcreposix.lai > .libs/libpcreposix.lai.tmp && \ |
| 185 |
|
mv .libs/libpcreposix.lai.tmp .libs/libpcreposix.lai |
| 186 |
|
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ |
| 187 |
|
-e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ |
| 188 |
|
< libpcreposix.la > libpcreposix.la.tmp && \ |
| 189 |
|
mv libpcreposix.la.tmp libpcreposix.la |
| 190 |
|
|
| 191 |
|
|
| 192 |
|
wininstall : winshared |
| 193 |
|
$(mkinstalldirs) $(DESTDIR)$(LIBDIR) |
| 194 |
|
$(mkinstalldirs) $(DESTDIR)$(BINDIR) |
| 195 |
|
$(INSTALL) .libs/@WIN_PREFIX@pcre.dll $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcre.dll |
| 196 |
|
$(INSTALL) .libs/@WIN_PREFIX@pcreposix.dll $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcreposix.dll |
| 197 |
|
$(INSTALL) .libs/libpcreposix.dll.a $(DESTDIR)$(LIBDIR)/libpcreposix.dll.a |
| 198 |
|
$(INSTALL) .libs/libpcre.dll.a $(DESTDIR)$(LIBDIR)/libpcre.dll.a |
| 199 |
|
-strip -g $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcre.dll |
| 200 |
|
-strip -g $(DESTDIR)$(BINDIR)/@WIN_PREFIX@pcreposix.dll |
| 201 |
|
-strip $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
| 202 |
|
-strip $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
| 203 |
|
|
| 204 |
# An auxiliary program makes the default character table source |
# An auxiliary program makes the default character table source |
| 205 |
|
|
| 206 |
$(top_srcdir)/chartables.c: dftables |
$(top_srcdir)/chartables.c: dftables |
| 207 |
./dftables >$(top_srcdir)/chartables.c |
./dftables >$(top_srcdir)/chartables.c |
| 208 |
|
|
| 209 |
dftables.o: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ |
dftables.@BUILD_OBJEXT@: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ |
| 210 |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
| 211 |
$(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -I. $(top_srcdir)/dftables.c |
$(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -I. $(top_srcdir)/dftables.c |
| 212 |
|
|
| 213 |
dftables: dftables.o |
dftables: dftables.@BUILD_OBJEXT@ |
| 214 |
$(LINK) -o dftables dftables.o |
$(LINK_FOR_BUILD) -o dftables dftables.@OBJEXT@ |
| 215 |
|
|
| 216 |
install: all |
install: all @ON_WINDOWS@ wininstall |
| 217 |
$(mkinstalldirs) $(DESTDIR)$(LIBDIR) |
@NOT_ON_WINDOWS@ $(mkinstalldirs) $(DESTDIR)$(LIBDIR) |
| 218 |
echo "$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la" |
@NOT_ON_WINDOWS@ echo "$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la" |
| 219 |
$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la |
@NOT_ON_WINDOWS@ $(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la |
| 220 |
echo "$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la" |
@NOT_ON_WINDOWS@ echo "$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la" |
| 221 |
$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la |
@NOT_ON_WINDOWS@ $(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la |
| 222 |
$(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) |
@NOT_ON_WINDOWS@ $(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) |
| 223 |
$(mkinstalldirs) $(DESTDIR)$(INCDIR) |
$(mkinstalldirs) $(DESTDIR)$(INCDIR) |
| 224 |
$(INSTALL_DATA) pcre.h $(DESTDIR)$(INCDIR)/pcre.h |
$(INSTALL_DATA) pcre.h $(DESTDIR)$(INCDIR)/pcre.h |
| 225 |
$(INSTALL_DATA) $(top_srcdir)/pcreposix.h $(DESTDIR)$(INCDIR)/pcreposix.h |
$(INSTALL_DATA) $(top_srcdir)/pcreposix.h $(DESTDIR)$(INCDIR)/pcreposix.h |
| 253 |
$(INSTALL_DATA) $(top_srcdir)/doc/pcregrep.1 $(DESTDIR)$(MANDIR)/man1/pcregrep.1 |
$(INSTALL_DATA) $(top_srcdir)/doc/pcregrep.1 $(DESTDIR)$(MANDIR)/man1/pcregrep.1 |
| 254 |
$(INSTALL_DATA) $(top_srcdir)/doc/pcretest.1 $(DESTDIR)$(MANDIR)/man1/pcretest.1 |
$(INSTALL_DATA) $(top_srcdir)/doc/pcretest.1 $(DESTDIR)$(MANDIR)/man1/pcretest.1 |
| 255 |
$(mkinstalldirs) $(DESTDIR)$(BINDIR) |
$(mkinstalldirs) $(DESTDIR)$(BINDIR) |
| 256 |
$(LIBTOOL) --mode=install $(INSTALL) pcregrep $(DESTDIR)$(BINDIR)/pcregrep |
$(LIBTOOL) --mode=install $(INSTALL) pcregrep@EXEEXT@ $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
| 257 |
$(LIBTOOL) --mode=install $(INSTALL) pcretest $(DESTDIR)$(BINDIR)/pcretest |
$(LIBTOOL) --mode=install $(INSTALL) pcretest@EXEEXT@ $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
| 258 |
$(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config |
$(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config |
| 259 |
|
|
| 260 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
| 261 |
# 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, |
| 262 |
# you don't want to throw them away. |
# you don't want to throw them away. |
| 263 |
|
|
| 264 |
clean:; -rm -rf *.o *.lo *.a *.la .libs pcretest pcregrep testtry |
clean:; -rm -rf *.@OBJEXT@ *.lo *.a *.la .libs pcretest@EXEEXT@ pcregrep@EXEEXT@ testtry |
| 265 |
|
|
| 266 |
# But "make distclean" should get back to a virgin distribution |
# But "make distclean" should get back to a virgin distribution |
| 267 |
|
|
| 271 |
|
|
| 272 |
check: runtest |
check: runtest |
| 273 |
|
|
| 274 |
|
@WIN_PREFIX@pcre.dll : winshared |
| 275 |
|
cp .libs/@WIN_PREFIX@pcre.dll . |
| 276 |
|
|
| 277 |
test: runtest |
test: runtest |
| 278 |
|
|
| 279 |
runtest: all |
runtest: all @ON_WINDOWS@ @WIN_PREFIX@pcre.dll |
| 280 |
./RunTest |
./RunTest |
| 281 |
|
|
| 282 |
# End |
# End |