# # ${R_HOME}/src/unix/Makefile VPATH = @srcdir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = ../.. subdir = src/unix include $(top_builddir)/Makeconf ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(X_CFLAGS) $(CPPFLAGS) $(DEFS) SOURCES_C_BASE = dynload.c edit.c stubs.c system.c sys-unix.c sys-std.c \ X11.c aqua.c SOURCES = $(SOURCES_C_BASE) DEPENDS = $(SOURCES:.c=.d) OBJECTS = $(SOURCES:.c=.o) HEADERS = Runix.h hpdlfcn.h distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) DISTFILES = \ Makefile.in $(SOURCES_C_BASE) Rembedded.c Rscript.c \ $(HEADERS) hpdlfcn.c libR.pc.in system.txt @WANT_R_SHLIB_TRUE@ALL_CFLAGS = $(ALL_CFLAGS_LO) all: Makefile Makedeps R Makefile: $(srcdir)/Makefile.in \ $(top_builddir)/config.status \ ../include/Rversion.h \ $(SOURCES) @cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ Makedeps: Makefile $(DEPENDS) @cat $(DEPENDS) >> Makefile @touch $@ R: Makefile @$(MAKE) Makedeps @WANT_R_SHLIB_FALSE@ @$(MAKE) libunix.a @WANT_R_SHLIB_TRUE@ @$(MAKE) stamp-lo @$(MAKE) rhome=$(abs_top_builddir) install-Rscript ## is this portable? ../include/Rversion.h: (cd ../include; $(MAKE) $(@F)) libunix.a: $(OBJECTS) rm -rf $@ $(AR) cr $@ $(OBJECTS) $(RANLIB) $@ stamp-lo: $(OBJECTS) Rembedded.o @touch $@ mostlyclean: clean clean: @-rm -rf .libs _libs @-rm -f Makedeps *.d *.o *.a *.lo *.la stamp-lo distclean: clean @-rm -f Makefile maintainer-clean: distclean ## we need to build at install time to capture the correct 'rhome' install-Rscript: $(CC) $(ALL_CPPFLAGS) $(ALL_CFLAGS) -DR_HOME='"$(rhome)"' -o Rscript \ $(srcdir)/Rscript.c @$(MKINSTALLDIRS) "$(Rexecbindir)" @$(INSTALL_PROGRAM) Rscript "$(Rexecbindir)/Rscript" ## substitute at install time to allow 'prefix' to be overridden install-pc: @$(MKINSTALLDIRS) "$(libdir)/pkgconfig" @$(SED) -e "s:@rhome:$(rhome):" -e "s:@rincludedir:$(rincludedir):" \ -e 's/@VERSION/$(VERSION)/' $(srcdir)/libR.pc.in \ > "$(libdir)/pkgconfig/libR.pc" install: install-Rscript @WANT_R_SHLIB_TRUE@ install-pc @$(MKINSTALLDIRS) "$(bindir)" @$(INSTALL_PROGRAM) Rscript "$(bindir)/Rscript" uninstall: @rm -f "$(bindir)/Rscript" "$(Rexecbindir)/Rscript" \ "$(libdir)/pkgconfig/libR.pc" install-strip: @$(MAKE) INSTALL_PROGRAM="${INSTALL_PROGRAM} -s" install 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: