1 |
|
|
2 |
# Makefile.in for PCRE (Perl-Compatible Regular Expression) library. |
# Makefile.in for PCRE (Perl-Compatible Regular Expression) library. |
3 |
|
|
|
#---------------------------------------------------------------------------# |
|
|
# MinGW DLLs are built automatically with this configure.in and Makefile.in # |
|
|
# as long you are using autoconf 2.50 or higher. The Win32 static libraries # |
|
|
# have not been tested, but appear to be generated. This functionality is # |
|
|
# by courtesy of Fred Cox. I (Philip Hazel) don't know anything about it, # |
|
|
# as I live entirely in a non-Windows world. # |
|
|
#---------------------------------------------------------------------------# |
|
|
|
|
4 |
|
|
5 |
############################################################################# |
############################################################################# |
6 |
|
|
7 |
# PCRE is developed on a Unix system. I do not use Windows or Macs, and know |
# PCRE is developed on a Unix system. I do not use Windows or Macs, and know |
8 |
# nothing about building software on them. Although the code of PCRE should |
# nothing about building software on them. Although the code of PCRE should |
9 |
# be very portable, the building system in this Makefile is designed for Unix |
# be very portable, the building system in this Makefile is designed for Unix |
10 |
# systems, with the exception of the mingw32 stuff just mentioned. |
# systems. However, there are features that have been supplied to me by various |
11 |
|
# people that should make it work on MinGW and Cygwin systems. |
12 |
|
|
13 |
# This setting enables Unix-style directory scanning in pcregrep, triggered |
# This setting enables Unix-style directory scanning in pcregrep, triggered |
14 |
# by the -f option. Maybe one day someone will add code for other systems. |
# by the -f option. Maybe one day someone will add code for other systems. |
63 |
CC = @CC@ |
CC = @CC@ |
64 |
CFLAGS = @CFLAGS@ |
CFLAGS = @CFLAGS@ |
65 |
CPPFLAGS = @CPPFLAGS@ |
CPPFLAGS = @CPPFLAGS@ |
66 |
|
|
67 |
CC_FOR_BUILD = @CC_FOR_BUILD@ |
CC_FOR_BUILD = @CC_FOR_BUILD@ |
68 |
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ |
CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ |
69 |
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ |
CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ |
70 |
|
|
71 |
|
UCP = @UCP@ |
72 |
UTF8 = @UTF8@ |
UTF8 = @UTF8@ |
73 |
NEWLINE = @NEWLINE@ |
NEWLINE = @NEWLINE@ |
74 |
POSIX_MALLOC_THRESHOLD = @POSIX_MALLOC_THRESHOLD@ |
POSIX_MALLOC_THRESHOLD = @POSIX_MALLOC_THRESHOLD@ |
75 |
LINK_SIZE = @LINK_SIZE@ |
LINK_SIZE = @LINK_SIZE@ |
76 |
MATCH_LIMIT= @MATCH_LIMIT@ |
MATCH_LIMIT = @MATCH_LIMIT@ |
77 |
|
NO_RECURSE = @NO_RECURSE@ |
78 |
|
EBCDIC = @EBCDIC@ |
79 |
|
|
80 |
INSTALL = @INSTALL@ |
INSTALL = @INSTALL@ |
81 |
INSTALL_DATA = @INSTALL_DATA@ |
INSTALL_DATA = @INSTALL_DATA@ |
84 |
# to do one or the other or both by ./configure. |
# to do one or the other or both by ./configure. |
85 |
|
|
86 |
LIBTOOL = @LIBTOOL@ |
LIBTOOL = @LIBTOOL@ |
87 |
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) $(NO_RECURSE) $(EBCDIC) |
88 |
@ON_WINDOWS@LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs |
@ON_WINDOWS@LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs |
89 |
@NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
@NOT_ON_WINDOWS@LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
90 |
LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) |
104 |
all: libpcre.la @POSIX_LIB@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @ON_WINDOWS@ winshared |
all: libpcre.la @POSIX_LIB@ pcretest@EXEEXT@ pcregrep@EXEEXT@ @ON_WINDOWS@ winshared |
105 |
|
|
106 |
pcregrep@EXEEXT@: libpcre.la pcregrep.@OBJEXT@ @ON_WINDOWS@ winshared |
pcregrep@EXEEXT@: libpcre.la pcregrep.@OBJEXT@ @ON_WINDOWS@ winshared |
107 |
$(LINK) -o pcregrep@EXEEXT@ pcregrep.@OBJEXT@ -lpcre |
$(LINK) -o pcregrep@EXEEXT@ pcregrep.@OBJEXT@ libpcre.la |
108 |
|
|
109 |
pcretest@EXEEXT@: libpcre.la @POSIX_LIB@ pcretest.@OBJEXT@ @ON_WINDOWS@ winshared |
pcretest@EXEEXT@: libpcre.la @POSIX_LIB@ pcretest.@OBJEXT@ @ON_WINDOWS@ winshared |
110 |
$(LINK) $(PURIFY) $(EFENCE) -o pcretest@EXEEXT@ pcretest.@OBJEXT@ \ |
$(LINK) $(PURIFY) $(EFENCE) -o pcretest@EXEEXT@ pcretest.@OBJEXT@ \ |
111 |
-lpcre @POSIX_LIB@ |
libpcre.la @POSIX_LIB@ |
112 |
|
|
113 |
libpcre.la: $(OBJ) |
libpcre.la: $(OBJ) |
114 |
-rm -f libpcre.la |
-rm -f libpcre.la |
115 |
$(LINKLIB) -rpath $(LIBDIR) -version-info \ |
$(LINKLIB) -rpath $(LIBDIR) -version-info \ |
116 |
'$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) |
'$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) |
117 |
|
|
118 |
libpcreposix.la: pcreposix.@OBJEXT@ |
libpcreposix.la: libpcre.la pcreposix.@OBJEXT@ |
119 |
-rm -f libpcreposix.la |
-rm -f libpcreposix.la |
120 |
$(LINKLIB) -rpath $(LIBDIR) -L. -lpcre -version-info \ |
$(LINKLIB) -rpath $(LIBDIR) libpcre.la -version-info \ |
121 |
'$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo |
'$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo |
122 |
|
|
123 |
pcre.@OBJEXT@: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ |
# Note that chartables.c is in the current directory, not the source directory. |
124 |
|
|
125 |
|
pcre.@OBJEXT@: chartables.c $(top_srcdir)/pcre.c \ |
126 |
$(top_srcdir)/internal.h $(top_srcdir)/printint.c \ |
$(top_srcdir)/internal.h $(top_srcdir)/printint.c \ |
127 |
|
$(top_srcdir)/ucp.c $(top_srcdir)/ucp.h $(top_srcdir)/ucpinternal.h \ |
128 |
|
$(top_srcdir)/ucptable.c $(top_srcdir)/ucptypetable.c \ |
129 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
130 |
$(LTCOMPILE) $(UTF8) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c |
$(LTCOMPILE) $(UTF8) $(UCP) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c |
131 |
|
|
132 |
pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ |
pcreposix.@OBJEXT@: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ |
133 |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
143 |
|
|
144 |
study.@OBJEXT@: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ |
study.@OBJEXT@: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ |
145 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
146 |
$(LTCOMPILE) $(UTF8) $(top_srcdir)/study.c |
$(LTCOMPILE) $(UTF8) $(UCP) $(top_srcdir)/study.c |
147 |
|
|
148 |
pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ |
pcretest.@OBJEXT@: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ |
149 |
$(top_srcdir)/printint.c \ |
$(top_srcdir)/printint.c \ |
150 |
pcre.h config.h Makefile |
pcre.h config.h Makefile |
151 |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(LINK_SIZE) $(top_srcdir)/pcretest.c |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(UCP) $(LINK_SIZE) $(top_srcdir)/pcretest.c |
152 |
|
|
153 |
pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h |
pcregrep.@OBJEXT@: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h |
154 |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c |
$(CC) -c $(CFLAGS) -I. $(UTF8) $(UCP) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c |
155 |
|
|
156 |
# Some Windows-specific targets, for Cygwin and MinGW |
# Some Windows-specific targets for MinGW. Do not use for Cygwin. |
157 |
|
|
158 |
winshared : .libs/@WIN_PREFIX@pcre.dll .libs/@WIN_PREFIX@pcreposix.dll |
winshared : .libs/@WIN_PREFIX@pcre.dll .libs/@WIN_PREFIX@pcreposix.dll |
159 |
|
|
177 |
.libs/@WIN_PREFIX@pcreposix.dll: libpcreposix.la libpcre.la |
.libs/@WIN_PREFIX@pcreposix.dll: libpcreposix.la libpcre.la |
178 |
$(CC) $(CFLAGS) -shared -o $@ \ |
$(CC) $(CFLAGS) -shared -o $@ \ |
179 |
-Wl,--whole-archive .libs/libpcreposix.a \ |
-Wl,--whole-archive .libs/libpcreposix.a \ |
180 |
-Wl,--out-implib,.libs/lib@WIN_PREFIX@pcreposix.dll.a \ |
-Wl,--out-implib,.libs/@WIN_PREFIX@pcreposix.dll.a \ |
181 |
-Wl,--output-def,.libs/@WIN_PREFIX@pcreposix.dll-def \ |
-Wl,--output-def,.libs/@WIN_PREFIX@libpcreposix.dll-def \ |
182 |
-Wl,--export-all-symbols \ |
-Wl,--export-all-symbols \ |
183 |
-Wl,--no-whole-archive .libs/libpcre.a |
-Wl,--no-whole-archive .libs/libpcre.a |
184 |
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ |
sed -e "s#dlname=''#dlname='../bin/@WIN_PREFIX@pcreposix.dll'#" \ |
203 |
-strip $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
-strip $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
204 |
-strip $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
-strip $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
205 |
|
|
206 |
# An auxiliary program makes the default character table source |
# An auxiliary program makes the default character table source. This is put |
207 |
|
# in the current directory, NOT the $top_srcdir directory. |
208 |
|
|
209 |
$(top_srcdir)/chartables.c: dftables |
chartables.c: dftables |
210 |
./dftables >$(top_srcdir)/chartables.c |
./dftables chartables.c |
211 |
|
|
212 |
dftables.@BUILD_OBJEXT@: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ |
dftables.@BUILD_OBJEXT@: $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ |
213 |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
$(top_srcdir)/internal.h pcre.h config.h Makefile |
259 |
$(LIBTOOL) --mode=install $(INSTALL) pcregrep@EXEEXT@ $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
$(LIBTOOL) --mode=install $(INSTALL) pcregrep@EXEEXT@ $(DESTDIR)$(BINDIR)/pcregrep@EXEEXT@ |
260 |
$(LIBTOOL) --mode=install $(INSTALL) pcretest@EXEEXT@ $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
$(LIBTOOL) --mode=install $(INSTALL) pcretest@EXEEXT@ $(DESTDIR)$(BINDIR)/pcretest@EXEEXT@ |
261 |
$(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config |
$(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config |
262 |
|
$(mkinstalldirs) $(DESTDIR)$(LIBDIR)/pkgconfig |
263 |
|
$(INSTALL) libpcre.pc $(DESTDIR)$(LIBDIR)/pkgconfig/libpcre.pc |
264 |
|
|
265 |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
# We deliberately omit dftables and chartables.c from 'make clean'; once made |
266 |
# 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, |
282 |
test: runtest |
test: runtest |
283 |
|
|
284 |
runtest: all @ON_WINDOWS@ @WIN_PREFIX@pcre.dll |
runtest: all @ON_WINDOWS@ @WIN_PREFIX@pcre.dll |
285 |
./RunTest |
@./RunTest |
286 |
|
|
287 |
# End |
# End |