# # ${R_HOME}/src/main/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../.. subdir = src/main include $(top_builddir)/Makeconf SOURCES_C = \ CConverters.c \ Rdynload.c RNG.c \ apply.c arithmetic.c apse.c array.c attrib.c \ base.c bind.c builtin.c \ character.c coerce.c colors.c complex.c connections.c context.c \ cov.c cum.c \ dcf.c datetime.c debug.c devPS.c devPicTeX.c deparse.c deriv.c \ devices.c dotcode.c dounzip.c dstruct.c duplicate.c \ engine.c envir.c errors.c eval.c \ format.c fourier.c \ gram.c gram-ex.c graphics.c \ identical.c internet.c iosupport.c \ lapack.c list.c logic.c \ main.c mapply.c match.c memory.c model.c \ names.c \ objects.c optim.c optimize.c options.c \ par.c paste.c pcre.c platform.c \ plot.c plot3d.c plotmath.c \ print.c printarray.c printvector.c printutils.c qsort.c \ random.c regex.c relop.c \ saveload.c scan.c seq.c serialize.c size.c sort.c source.c split.c \ sprintf.c subassign.c subscript.c subset.c summary.c \ unique.c util.c \ version.c vfonts.c \ registration.c SOURCES_F = \ xxxpr.f EXTRA_SOURCES_C = \ alloca.c acosh.c asinh.c atanh.c \ snprintf.c strdup.c strncasecmp.c \ vsnprintf.c DEPENDS = $(SOURCES_C:.c=.d) $(EXTRA_SOURCES_C:.c=.d) SOURCES = $(SOURCES_C) $(SOURCES_F) OBJECTS = $(SOURCES_C:.c=.o) $(SOURCES_F:.f=.o) HEADERS = \ RBufferUtils.h Rregex.h Rstrptime.h \ arithmetic.h apse.h \ basedecl.h \ par-common.c \ qsort-body.c \ unzip.h distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = Makefile.in Makefile.win \ $(HEADERS) \ $(SOURCES_C) \ $(EXTRA_SOURCES_C) \ $(SOURCES_F) \ gram.y ## these are built with CPICFLAGS so safe to use in libR.so ZLIB_CPPFLAGS = @BUILD_ZLIB_TRUE@ -I$(top_srcdir)/src/extra/zlib BZLIB_CPPFLAGS = @BUILD_BZLIB_TRUE@ -I$(top_srcdir)/src/extra/bzip2 PCRE_CPPFLAGS = @BUILD_PCRE_TRUE@ -I$(top_srcdir)/src/extra/pcre ALL_CPPFLAGS = $(ZLIB_CPPFLAGS) $(BZLIB_CPPFLAGS) $(PCRE_CPPFLAGS) \ $(R_XTRA_CPPFLAGS) $(CPPFLAGS) $(DEFS) ## use an explicit library: there might be an unsatisfactory -lz around R_ZLIBS = @BUILD_ZLIB_TRUE@ ../extra/zlib/libz.a R_BZLIBS = @BUILD_BZLIB_TRUE@ ../extra/bzip2/libbz2.a R_PCRE = @BUILD_PCRE_TRUE@ ../extra/pcre/libpcre.a R_XDR = @BUILD_XDR_TRUE@ ../extra/xdr/libxdr.a ## ## Names in here should use '$(top_builddir)' instead ... RLIBS = ../unix/libunix.a ../appl/libappl.a ../nmath/libnmath.a $(R_XDR) ## Rexecbin_PROGRAMS = R.bin R_bin_SOURCES = $(SOURCES) R_bin_OBJECTS = $(OBJECTS) ## ## This will not be good enough on AIX, where we need to play also with ## -export-symbols SYMFILE. @USE_LIBTOOL_TRUE@R_bin_LDFLAGS = -export-dynamic ## R_bin_LDADD = @LIBOBJS@ @ALLOCA@ $(RLIBS) $(BLAS_LIBS) $(FLIBS) $(R_XTRA_LIBS) $(R_ZLIBS) $(R_BZLIBS) $(R_PCRE) ## ## Automake would figure this out itself. R_bin_DEPENDENCIES = @LIBOBJS@ @ALLOCA@ $(RLIBS) @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp ## ## ## Change to 'libR.la' when using libtool for shlibs. ## Remove when using automake ... also fix target 'install' then. libR_la = libR$(DYLIB_EXT) ## Rexeclib_LTLIBRARIES = $(libR_la) libR_la_SOURCES = $(SOURCES) libR_la_LDFLAGS = libR_la_OBJECTS = $(OBJECTS:.o=.lo) ## ## This should also have `ls ../appl/*.lo ../nmath/*.lo ../unix/*.lo`, but ## of course this will not work when the files do not exist yet :-) libR_la_LIBADD = @LTLIBOBJS@ $(BLAS_LIBS) $(FLIBS) $(R_XTRA_LIBS) \ $(R_ZLIBS) $(R_BZLIBS) $(R_PCRE) $(R_XDR) libR_la_DEPENDENCIES = @LTLIBOBJS@ ../appl/stamp-lo ../nmath/stamp-lo ../unix/stamp-lo @USE_EXPORTFILES_TRUE@ $(top_builddir)/etc/R.exp ## @USE_LIBTOOL_TRUE@libR_la_LDFLAGS = -avoid-version -rpath $(Rexeclibdir) LIBR_LDFLAGS = @LIBR_LDFLAGS@ all: Makefile Makedeps R Makefile: $(srcdir)/Makefile.in \ $(top_builddir)/config.status \ ../include/config.h \ ../include/Rversion.h \ $(SOURCES_C) @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ Makedeps: Makefile $(DEPENDS) @cat $(DEPENDS) >> Makefile @touch $@ R: Makefile @$(MAKE) Makedeps @$(MAKE) $(Rexecbin_PROGRAMS) @WANT_R_SHLIB_TRUE@ @$(MAKE) $(Rexeclib_LTLIBRARIES) ../include/config.h ../include/Rversion.h: (cd $(@D); $(MAKE) $(@F)) R.bin: $(R_bin_OBJECTS) $(R_bin_DEPENDENCIES) $(MAIN_LINK) -o $@ $(R_bin_LDFLAGS) $(R_bin_OBJECTS) $(R_bin_LDADD) $(LIBS) ## ## Not sure if we want to do this ... @$(MAKE) rhome=`cd $(top_builddir); pwd` install-bin ## $(top_builddir)/etc/R.exp: $(OBJECTS) $(RLIBS) @$(top_srcdir)/tools/ldAIX4 -o $@ $(OBJECTS) $(RLIBS) $(RLIBS): (cd $(@D); $(MAKE) $(@F)) libR: $(libR_la) $(libR_la): $(libR_la_OBJECTS) $(libR_la_DEPENDENCIES) ## ## This used to have $(SHLIB_LINK), but this uses $(SHLIB_LDFLAGS) which ## is really for loadable modules and not shared libraries for linking ## against ... the definition of $(SHLIB_LINK) in the top level Makeconf ## has a libtool conditional which we do not have here (as we currently ## cannot use libtool anyway). $(SHLIB_LD) $(LIBR_LDFLAGS) $(LDFLAGS) -o $@ $(libR_la_LDFLAGS) $(libR_la_OBJECTS) `ls ../appl/*.lo ../nmath/*.lo ../unix/*.lo 2>/dev/null` $(libR_la_LIBADD) $(LIBS) ## ## ## Not sure if we want to do this ... @$(MAKE) rhome=`cd $(top_builddir); pwd` install-lib ## ../appl/stamp-lo ../nmath/stamp-lo ../unix/stamp-lo: (cd $(@D); $(MAKE) $(@F)) $(srcdir)/gram.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/gram.y @echo "re-making gram.c" $(YACC) $(YFLAGS) $(srcdir)/gram.y $(top_srcdir)/tools/move-if-change y.tab.c $(srcdir)/gram.c install: installdirs @$(MAKE) install-bin @if test -f $(libR_la); then $(MAKE) install-lib; fi installdirs: @$(MKINSTALLDIRS) $(Rexecbindir) @$(MKINSTALLDIRS) $(Rexeclibdir) install-bin: @$(top_srcdir)/tools/copy-if-change R.bin $(Rexecbindir)/R.bin install-lib: @USE_LIBTOOL_FALSE@ @$(top_srcdir)/tools/copy-if-change $(libR_la) $(Rexeclibdir)/$(libR_la) @USE_LIBTOOL_TRUE@ @$(LIBTOOL) --mode=install $(INSTALL) $(libR_la) $(Rexeclibdir) install-strip: $(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install uninstall: @rm -f $(Rexecbindir)/R.bin @rmdir $(Rexecbindir) 2>/dev/null \ || echo " subdir $(Rexecbindir) not removed" @rm -f $(Rexeclibdir)/libR$(DYLIB_EXT) @rmdir $(Rexeclibdir) 2>/dev/null \ || echo " subdir $(Rexeclibdir) not removed" mostlyclean: clean clean: @-rm -rf .libs _libs @-rm -f *core Makedeps *.d *.o *.lo *.la *$(DYLIB_EXT) \ $(Rexecbin_PROGRAMS) distclean: clean @-rm -f Makefile maintainer-clean: distclean @echo "This command is intended for maintainers to use; it" @echo "deletes files that may need special rules to rebuild" @-rm -f $(srcdir)/gram.c tags: TAGS TAGS: $(SOURCES) $(EXTRA_SOURCES_C) $(HEADERS) etags $(SOURCES) $(EXTRA_SOURCES_C) $(HEADERS) ## Unused targets 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: