# @configure_input@
#
# ${R_HOME}/etc/Makeconf

include $(R_SHARE_DIR)/make/vars.mk

AR = @AR@
BLAS_LIBS = @BLAS_LIBS@
C_VISIBILITY = @C_VISIBILITY@
CC = @CC@
CFLAGS = @CFLAGS@
CPICFLAGS = @CPICFLAGS@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXFLAGS = @CXXFLAGS@
CXXPICFLAGS = @CXXPICFLAGS@
DYLIB_EXT = @DYLIB_EXT@
DYLIB_LD = @DYLIB_LD@
DYLIB_LDFLAGS = @DYLIB_LDFLAGS@
DYLIB_LINK = $(DYLIB_LD) $(DYLIB_LDFLAGS) $(LDFLAGS)
ECHO = echo
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
F77 = @F77@
F77_VISIBILITY = @F77_VISIBILITY@
FC = @FC@
FCFLAGS = @FCFLAGS@
FFLAGS = @FFLAGS@
FLIBS = @FLIBS@
FCPICFLAGS = @FCPICFLAGS@
FPICFLAGS = @FPICFLAGS@
FOUNDATION_CPPFLAGS = @FOUNDATION_CPPFLAGS@
FOUNDATION_LIBS = @FOUNDATION_LIBS@
JAR = @JAR@
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVAH = @JAVAH@
JAVA_HOME = @JAVA_HOME@
JAVA_LD_LIBRARY_PATH = @JAVA_LD_LIBRARY_PATH@
JAVA_LIBS = @JAVA_LIBS0@
JAVA_CPPFLAGS = @JAVA_CPPFLAGS0@
LAPACK_LIBS = @LAPACK_LIBS@
## we only need this is if it is external, as otherwise link to R
LIBINTL= @LIBINTL@
LIBM = @LIBM@
LIBR = @LIBR@
LIBS = @LIBS@
## needed by R CMD config
LIBnn = @LIBnn@
LIBTOOL = $(SHELL) $(R_HOME)/bin/libtool
LDFLAGS = @LDFLAGS@
## needed to build applications linking to static libR
MAIN_LD = @MAIN_LD@
MAIN_LDFLAGS = @MAIN_LDFLAGS@
MAIN_LINK = $(MAIN_LD) $(MAIN_LDFLAGS) $(LDFLAGS)
MKINSTALLDIRS = $(R_HOME)/bin/mkinstalldirs
OBJC = @OBJC@
OBJCFLAGS = @OBJCFLAGS@
OBJC_LIBS = @OBJC_LIBS@
OBJCXX = @OBJCXX@
R_ARCH = @R_ARCH@
RANLIB = @RANLIB@
SAFE_FFLAGS = @SAFE_FFLAGS@
SED = @SED@
SHELL = @R_SHELL@
SHLIB_CFLAGS = @SHLIB_CFLAGS@
SHLIB_CXXFLAGS = @SHLIB_CXXFLAGS@
SHLIB_CXXLD = @SHLIB_CXXLD@
SHLIB_CXXLDFLAGS = @SHLIB_CXXLDFLAGS@
SHLIB_EXT = @SHLIB_EXT@
SHLIB_FCLD = @SHLIB_FCLD@
SHLIB_FCLDFLAGS = @SHLIB_FCLDFLAGS@
SHLIB_FFLAGS = @SHLIB_FFLAGS@
SHLIB_LD = @SHLIB_LD@
SHLIB_LDFLAGS = @SHLIB_LDFLAGS@
SHLIB_LIBADD = @SHLIB_LIBADD@
SHLIB_LINK = $(SHLIB_LD) $(SHLIB_LDFLAGS) $(LDFLAGS)
STRIP_LIBS = @striplib@
STRIP_STATIC_LIBS = @stripstaticlib@
TCLTK_CPPFLAGS = @TCLTK_CPPFLAGS@
TCLTK_LIBS = @TCLTK_LIBS@

## for linking to libR.a
STATIC_LIBR = @WANT_R_STATIC_TRUE@ $(R_HOME)/lib$(R_ARCH)/libR.a $(BLAS_LIBS) $(FLIBS) @R_XTRA_LIBS@ $(LIBINTL) @READLINE_LIBS@ $(LIBS)


R_XTRA_CFLAGS = @R_XTRA_CFLAGS@
R_XTRA_CPPFLAGS = @R_XTRA_CPPFLAGS@ @R_XTRA_CPPFLAGS2@
R_XTRA_CXXFLAGS = @R_XTRA_CXXFLAGS@
R_XTRA_FFLAGS = @R_XTRA_FFLAGS@

ALL_CFLAGS = $(R_XTRA_CFLAGS) $(PKG_CFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(CFLAGS)
ALL_CPPFLAGS = $(R_XTRA_CPPFLAGS) $(PKG_CPPFLAGS) $(CPPFLAGS) $(CLINK_CPPFLAGS)
ALL_CXXFLAGS = $(R_XTRA_CXXFLAGS) $(PKG_CXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(CXXFLAGS)
ALL_OBJCFLAGS = $(PKG_OBJCFLAGS) $(CPICFLAGS) $(SHLIB_CFLAGS) $(OBJCFLAGS)
ALL_OBJCXXFLAGS = $(PKG_OBJCXXFLAGS) $(CXXPICFLAGS) $(SHLIB_CXXFLAGS) $(OBJCXXFLAGS)
ALL_FFLAGS = $(R_XTRA_FFLAGS) $(PKG_FFLAGS) $(FPICFLAGS) $(SHLIB_FFLAGS) $(FFLAGS)
ALL_LIBS = $(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)@DYLIB_UNDEFINED_ALLOWED_FALSE@ $(LIBINTL)

.SUFFIXES:
.SUFFIXES: .c .cc .cpp .C .d .f .f90 .f95 .m .mm .M .o

@r_cc_rules_frag@
@r_cxx_rules_frag@
@r_objc_rules_frag@
.mm.o:
	$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.M.o:
	$(OBJCXX) $(ALL_CPPFLAGS) $(ALL_OBJCXXFLAGS) -c $< -o $@
.f.o:
	$(F77) $(ALL_FFLAGS) -c $< -o $@
.f95.o:
	$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c @FCFLAGS_f95@ $< -o $@
.f90.o:
	$(FC) $(PKG_FCFLAGS) $(FCPICFLAGS) $(FCFLAGS) -c @FCFLAGS_f90@ $< -o $@
