# Makefile.in for PCRE (Perl-Compatible Regular Expression) library. #---------------------------------------------------------------------------# # 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. # #---------------------------------------------------------------------------# ############################################################################# # PCRE is developed on a Unix system. I do not use Windows or Macs, and know # nothing about building software on them. Although the code of PCRE should # be very portable, the building system in this Makefile is designed for Unix # systems, with the exception of the mingw32 stuff just mentioned. # This setting enables Unix-style directory scanning in pcregrep, triggered # by the -f option. Maybe one day someone will add code for other systems. PCREGREP_OSTYPE=-DIS_UNIX ############################################################################# #---------------------------------------------------------------------------# # The following lines are modified by "configure" to insert data that it is # # given in its arguments, or which it finds out for itself. # #---------------------------------------------------------------------------# SHELL = /bin/sh prefix = exec_prefix = ${prefix} top_srcdir = . mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs # NB: top_builddir is not referred to directly below, but it is used in the # setting of $(LIBTOOL), so don't remove it! top_builddir = . # BINDIR is the directory in which the pcregrep, pcretest, and pcre-config # commands are installed. # INCDIR is the directory in which the public header files pcre.h and # pcreposix.h are installed. # LIBDIR is the directory in which the libraries are installed. # MANDIR is the directory in which the man pages are installed. BINDIR = ${exec_prefix}/bin LIBDIR = ${exec_prefix}/lib INCDIR = ${prefix}/include MANDIR = ${prefix}/man # EXEEXT is set by configure to the extention of an executable file # OBJEXT is set by configure to the extention of an object file # The BUILD_* equivalents are the same but for the host we're building on EXEEXT = OBJEXT = # Note that these are just here to have a convenient place to look at the # outcome. BUILD_EXEEXT = $(EXEEXT) BUILD_OBJEXT = $(OBJEXT) # The compiler, C flags, preprocessor flags, etc CC = cc CFLAGS = -fno-common CPPFLAGS = CC_FOR_BUILD = $(CC) CFLAGS_FOR_BUILD = $(CFLAGS) CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ UTF8 = NEWLINE = POSIX_MALLOC_THRESHOLD = -DPOSIX_MALLOC_THRESHOLD=10 LINK_SIZE = MATCH_LIMIT= INSTALL = ../../ INSTALL_DATA = install -o root -g wheel -m 444 # LIBTOOL enables the building of shared and static libraries. It is set up # to do one or the other or both by ./configure. LIBTOOL = $(SHELL) $(top_builddir)/libtool LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) -I. -I$(top_srcdir) $(NEWLINE) $(LINK_SIZE) $(MATCH_LIMIT) #LINK = $(CC) $(CFLAGS) -I. -I$(top_srcdir) -L.libs LINK = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) LINKLIB = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -I. -I$(top_srcdir) LINK_FOR_BUILD = $(LIBTOOL) --mode=link $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -I. -I$(top_srcdir) # These are the version numbers for the shared libraries PCRELIBVERSION = 0:1:0 PCREPOSIXLIBVERSION = 0:0:0 ############################################################################## OBJ = maketables. get. study. pcre. LOBJ = maketables.lo get.lo study.lo pcre.lo all: libpcre.la libpcreposix.la pcretest pcregrep # winshared pcregrep: libpcre.la pcregrep. # winshared $(LINK) -o pcregrep pcregrep. -lpcre pcretest: libpcre.la libpcreposix.la pcretest. # winshared $(LINK) $(PURIFY) $(EFENCE) -o pcretest pcretest. \ -lpcre libpcreposix.la libpcre.la: $(OBJ) -rm -f libpcre.la $(LINKLIB) -rpath $(LIBDIR) -version-info \ '$(PCRELIBVERSION)' -o libpcre.la $(LOBJ) libpcreposix.la: pcreposix. -rm -f libpcreposix.la $(LINKLIB) -rpath $(LIBDIR) -L. -lpcre -version-info \ '$(PCREPOSIXLIBVERSION)' -o libpcreposix.la pcreposix.lo pcre.: $(top_srcdir)/chartables.c $(top_srcdir)/pcre.c \ $(top_srcdir)/internal.h $(top_srcdir)/printint.c \ pcre.h config.h Makefile $(LTCOMPILE) $(UTF8) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcre.c pcreposix.: $(top_srcdir)/pcreposix.c $(top_srcdir)/pcreposix.h \ $(top_srcdir)/internal.h pcre.h config.h Makefile $(LTCOMPILE) $(POSIX_MALLOC_THRESHOLD) $(top_srcdir)/pcreposix.c maketables.: $(top_srcdir)/maketables.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(top_srcdir)/maketables.c get.: $(top_srcdir)/get.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(top_srcdir)/get.c study.: $(top_srcdir)/study.c $(top_srcdir)/internal.h \ pcre.h config.h Makefile $(LTCOMPILE) $(UTF8) $(top_srcdir)/study.c pcretest.: $(top_srcdir)/pcretest.c $(top_srcdir)/internal.h \ $(top_srcdir)/printint.c \ pcre.h config.h Makefile $(CC) -c $(CFLAGS) -I. $(UTF8) $(LINK_SIZE) $(top_srcdir)/pcretest.c pcregrep.: $(top_srcdir)/pcregrep.c pcre.h Makefile config.h $(CC) -c $(CFLAGS) -I. $(UTF8) $(PCREGREP_OSTYPE) $(top_srcdir)/pcregrep.c # Some Windows-specific targets, for Cygwin and MinGW winshared : .libs/pcre.dll .libs/pcreposix.dll .libs/pcre.dll : libpcre.la $(CC) $(CFLAGS) -shared -o $@ \ -Wl,--whole-archive .libs/libpcre.a \ -Wl,--out-implib,.libs/libpcre.dll.a \ -Wl,--output-def,.libs/pcre.dll-def \ -Wl,--export-all-symbols \ -Wl,--no-whole-archive sed -e "s#dlname=''#dlname='../bin/pcre.dll'#" \ -e "s#library_names=''#library_names='libpcre.dll.a'#" \ < .libs/libpcre.lai > .libs/libpcre.lai.tmp && \ mv .libs/libpcre.lai.tmp .libs/libpcre.lai sed -e "s#dlname=''#dlname='../bin/pcre.dll'#" \ -e "s#library_names=''#library_names='libpcre.dll.a'#" \ < libpcre.la > libpcre.la.tmp && \ mv libpcre.la.tmp libpcre.la .libs/pcreposix.dll: libpcreposix.la libpcre.la $(CC) $(CFLAGS) -shared -o $@ \ -Wl,--whole-archive .libs/libpcreposix.a \ -Wl,--out-implib,.libs/libpcreposix.dll.a \ -Wl,--output-def,.libs/pcreposix.dll-def \ -Wl,--export-all-symbols \ -Wl,--no-whole-archive .libs/libpcre.a sed -e "s#dlname=''#dlname='../bin/pcreposix.dll'#" \ -e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ < .libs/libpcreposix.lai > .libs/libpcreposix.lai.tmp && \ mv .libs/libpcreposix.lai.tmp .libs/libpcreposix.lai sed -e "s#dlname=''#dlname='../bin/pcreposix.dll'#" \ -e "s#library_names=''#library_names='libpcreposix.dll.a'#"\ < libpcreposix.la > libpcreposix.la.tmp && \ mv libpcreposix.la.tmp libpcreposix.la wininstall : winshared $(mkinstalldirs) $(DESTDIR)$(LIBDIR) $(mkinstalldirs) $(DESTDIR)$(BINDIR) $(INSTALL) .libs/pcre.dll $(DESTDIR)$(BINDIR)/pcre.dll $(INSTALL) .libs/pcreposix.dll $(DESTDIR)$(BINDIR)/pcreposix.dll $(INSTALL) .libs/libpcreposix.dll.a $(DESTDIR)$(LIBDIR)/libpcreposix.dll.a $(INSTALL) .libs/libpcre.dll.a $(DESTDIR)$(LIBDIR)/libpcre.dll.a -strip -g $(DESTDIR)$(BINDIR)/pcre.dll -strip -g $(DESTDIR)$(BINDIR)/pcreposix.dll -strip $(DESTDIR)$(BINDIR)/pcregrep -strip $(DESTDIR)$(BINDIR)/pcretest # An auxiliary program makes the default character table source $(top_srcdir)/chartables.c: dftables ./dftables >$(top_srcdir)/chartables.c dftables.$(OBJEXT): $(top_srcdir)/dftables.c $(top_srcdir)/maketables.c \ $(top_srcdir)/internal.h pcre.h config.h Makefile $(CC_FOR_BUILD) -c $(CFLAGS_FOR_BUILD) -I. $(top_srcdir)/dftables.c dftables: dftables.$(OBJEXT) $(LINK_FOR_BUILD) -o dftables dftables. install: all # wininstall $(mkinstalldirs) $(DESTDIR)$(LIBDIR) echo "$(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la" $(LIBTOOL) --mode=install $(INSTALL) libpcre.la $(DESTDIR)$(LIBDIR)/libpcre.la echo "$(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la" $(LIBTOOL) --mode=install $(INSTALL) libpcreposix.la $(DESTDIR)$(LIBDIR)/libpcreposix.la $(LIBTOOL) --finish $(DESTDIR)$(LIBDIR) $(mkinstalldirs) $(DESTDIR)$(INCDIR) $(INSTALL_DATA) pcre.h $(DESTDIR)$(INCDIR)/pcre.h $(INSTALL_DATA) $(top_srcdir)/pcreposix.h $(DESTDIR)$(INCDIR)/pcreposix.h $(mkinstalldirs) $(DESTDIR)$(MANDIR)/man3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre.3 $(DESTDIR)$(MANDIR)/man3/pcre.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcreapi.3 $(DESTDIR)$(MANDIR)/man3/pcreapi.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcrebuild.3 $(DESTDIR)$(MANDIR)/man3/pcrebuild.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcrecallout.3 $(DESTDIR)$(MANDIR)/man3/pcrecallout.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcrecompat.3 $(DESTDIR)$(MANDIR)/man3/pcrecompat.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcrepattern.3 $(DESTDIR)$(MANDIR)/man3/pcrepattern.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcreperform.3 $(DESTDIR)$(MANDIR)/man3/pcreperform.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcreposix.3 $(DESTDIR)$(MANDIR)/man3/pcreposix.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcresample.3 $(DESTDIR)$(MANDIR)/man3/pcresample.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_compile.3 $(DESTDIR)$(MANDIR)/man3/pcre_compile.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_config.3 $(DESTDIR)$(MANDIR)/man3/pcre_config.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_copy_named_substring.3 $(DESTDIR)$(MANDIR)/man3/pcre_copy_named_substring.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_copy_substring.3 $(DESTDIR)$(MANDIR)/man3/pcre_copy_substring.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_exec.3 $(DESTDIR)$(MANDIR)/man3/pcre_exec.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_free_substring.3 $(DESTDIR)$(MANDIR)/man3/pcre_free_substring.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_free_substring_list.3 $(DESTDIR)$(MANDIR)/man3/pcre_free_substring_list.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_fullinfo.3 $(DESTDIR)$(MANDIR)/man3/pcre_fullinfo.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_get_named_substring.3 $(DESTDIR)$(MANDIR)/man3/pcre_get_named_substring.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_get_stringnumber.3 $(DESTDIR)$(MANDIR)/man3/pcre_get_stringnumber.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_get_substring.3 $(DESTDIR)$(MANDIR)/man3/pcre_get_substring.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_get_substring_list.3 $(DESTDIR)$(MANDIR)/man3/pcre_get_substring_list.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_info.3 $(DESTDIR)$(MANDIR)/man3/pcre_info.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_maketables.3 $(DESTDIR)$(MANDIR)/man3/pcre_maketables.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_study.3 $(DESTDIR)$(MANDIR)/man3/pcre_study.3 $(INSTALL_DATA) $(top_srcdir)/doc/pcre_version.3 $(DESTDIR)$(MANDIR)/man3/pcre_version.3 $(mkinstalldirs) $(DESTDIR)$(MANDIR)/man1 $(INSTALL_DATA) $(top_srcdir)/doc/pcregrep.1 $(DESTDIR)$(MANDIR)/man1/pcregrep.1 $(INSTALL_DATA) $(top_srcdir)/doc/pcretest.1 $(DESTDIR)$(MANDIR)/man1/pcretest.1 $(mkinstalldirs) $(DESTDIR)$(BINDIR) $(LIBTOOL) --mode=install $(INSTALL) pcregrep $(DESTDIR)$(BINDIR)/pcregrep $(LIBTOOL) --mode=install $(INSTALL) pcretest $(DESTDIR)$(BINDIR)/pcretest $(INSTALL) pcre-config $(DESTDIR)$(BINDIR)/pcre-config # We deliberately omit dftables and chartables.c from 'make clean'; once made # chartables.c shouldn't change, and if people have edited the tables by hand, # you don't want to throw them away. clean:; -rm -rf *. *.lo *.a *.la .libs pcretest pcregrep testtry # But "make distclean" should get back to a virgin distribution distclean: clean -rm -f chartables.c libtool pcre-config pcre.h \ Makefile config.h config.status config.log config.cache \ dftables RunTest check: runtest pcre.dll : winshared cp .libs/pcre.dll . test: runtest runtest: all # pcre.dll ./RunTest # End