#
# ${R_HOME}/src/extra/pcre/Makefile

VPATH = @srcdir@
srcdir = @srcdir@
top_srcdir = @top_srcdir@

top_builddir = ../../..
subdir = src/extra/pcre
R_HOME = $(top_builddir)

include $(top_builddir)/Makeconf

PCRE_CPPFLAGS = -I$(srcdir)# -DSUPPORT_UTF8
ALL_CPPFLAGS = $(PCRE_CPPFLAGS) $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS)

SOURCES = pcre_compile.c pcre_config.c pcre_dfa_exec.c pcre_exec.c \
	pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c \
	pcre_maketables.c pcre_ord2utf8.c pcre_refcount.c \
	pcre_study.c pcre_tables.c pcre_try_flipped.c \
	pcre_valid_utf8.c pcre_version.c pcre_xclass.c

HEADERS = pcre_internal.h ucp.h ucpinternal.h pcre.h
DEPENDS = $(SOURCES:.c=.d)
OBJECTS = $(SOURCES:.c=.o)
@WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) @C_VISIBILITY@

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
DISTFILES = LICENCE Makefile.in Makefile.win R_changes dftables.c \
  chartables.h.win $(SOURCES) $(HEADERS)
noinst_LIBRARIES = @BUILD_PCRE_TRUE@ libpcre.a
libpcre_a_SOURCES = $(SOURCES)
libpcre_a_OBJECTS = $(OBJECTS)


all: R

Makefile: $(srcdir)/Makefile.in \
  $(top_builddir)/config.status \
  $(SOURCES)
	@cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

Makedeps: Makefile $(DEPENDS)
	@cat $(DEPENDS) >> Makefile
	@touch $@

R: Makefile chartables.h
	@$(MAKE) Makedeps
	@$(MAKE) $(noinst_LIBRARIES)

chartables.h: dftables
	./dftables chartables.h

dftables.o:  pcre_maketables.c pcre_internal.h pcre.h
dftables: dftables.o
	$(MAIN_LD) $(LDFLAGS) -o dftables dftables.o

libpcre.a: $(libpcre_a_OBJECTS)
	rm -f $@
	$(AR) cr $@ $(libpcre_a_OBJECTS)
	$(RANLIB) $@


mostlyclean: clean
clean:
	@-rm -f Makedeps *.d *.o *.lo *.a
distclean: clean
	@-rm -f Makefile dftables chartables.h
maintainer-clean: distclean

install install-strip uninstall TAGS info dvi check:

distdir: $(DISTFILES)
	@for f in $(DISTFILES); do \
	  test -f $(distdir)/$${f} \
	    || ln $(srcdir)/$${f} $(distdir)/$${f} 2>/dev/null \
	    || cp -p $(srcdir)/$${f} $(distdir)/$${f}; \
	done

## Automagically generated dependencies:



syntax highlighted by Code2HTML, v. 0.9.1