The R Project SVN R

Rev

Rev 15369 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

#
# ${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 = devices.c dynload.c edit.c gnome.c stubs.c system.c sys-unix.c \
          sys-common.c sys-std.c X11.c
DEPENDS = $(SOURCES:.c=.d)
OBJECTS = $(SOURCES:.c=.o)
HEADERS = Runix.h devUI.h

distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
DISTFILES = \
    Makefile.in PSPAPER $(SOURCES) $(HEADERS) \
    hpdlfcn.c system.txt

noinst_LIBRARIES = libunix.a
libunix_a_SOURCES = $(SOURCES)
libunix_a_OBJECTS = $(OBJECTS)

## FIXME:
## We most likely will not want a separate shared library.
## If we have a final decision, remove libunix.la target.
## </FIXME>
noinst_LTLIBRARIES = libunix.la
libunix_la_SOURCES = $(SOURCES)
libunix_la_OBJECTS = $(OBJECTS:.o=.lo)
@USE_LIBTOOL_TRUE@libunix_la_LDFLAGS = -avoid-version -rpath $(Rexeclibdir)

all: Makefile Makedeps R

Makefile: $(srcdir)/Makefile.in \
  $(top_builddir)/config.status \
  ../include/Rversion.h \
  FFDecl.h \
  FFTab.h \
  $(SOURCES)
    @cd $(top_builddir) && \
      CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
      $(SHELL) ./config.status

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

R: Makefile
    @$(MAKE) Makedeps
    @$(MAKE) $(noinst_LIBRARIES)
@WANT_R_SHLIB_TRUE@ @$(MAKE) stamp-lo

../include/Rversion.h:
    (cd ../include; $(MAKE) $(@F))
FFDecl.h FFTab.h: $(top_srcdir)/src/appl/ROUTINES \
  $(top_srcdir)/tools/GETSYMBOLS
    @$(top_srcdir)/tools/GETSYMBOLS

libunix.a: $(libunix_a_OBJECTS)
    $(AR) cr $@ $(libunix_a_OBJECTS)
    $(RANLIB) $@

stamp-lo: $(libunix_la_OBJECTS)
    @touch $@
libunix.la: stamp-lo
    $(SHLIB_LINK) -o $@ $(libunix_la_LDFLAGS) $(libunix_la_OBJECTS)

mostlyclean: clean
clean:
    @-rm -rf .libs _libs
    @-rm -f Makedeps FFDecl.h FFTab.h *.d *.o *.a *.lo *.la stamp-lo
distclean: clean
    @-rm -f Makefile
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: