Rev 51124 | Blame | Last modification | View Log | Download | RSS feed
#-*- Makefile -*-## This file contains tabs: make sure your editor leaves them unchanged.## As from R 2.9.0 it is only used when building R itself (and not packages),## but it does customize etc/Makeconf as from R 2.11.0## =========== configuration macros for building packages ================# Absolute path to '/usr/local' software collection. The versions used# on CRAN can be found at# http://www.stats.ox.ac.uk/pub/Rtools/goodies/local.zip# http://www.stats.ox.ac.uk/pub/Rtools/goodies/Win64/local64.zipLOCAL_SOFT =## ============== configuration macros for building R ===================# Alternatives GCC4 or F2C (use suitable f2c rather than a Fortran compiler).BUILD=GCC4# an alternative is to use -gstabs here, if the debugger supports only stabs.G_FLAG=-gdwarf-2# Comment out if the msvcrt.dll malloc/free is required (not tested recently)LEA_MALLOC=YES# Set to YES and specify the path if you want to use the ATLAS BLAS.USE_ATLAS=NOATLAS_PATH=/R/ATLAS/lib/WinNT_P4SSE2# Support for the ACML and Goto BLASes has been withdrawn: see R-admin.html# Where does Tcl/Tk live? Spaces allowed.# If you alter this you cannot build the installer and will need to set# MY_TCLTK to use the package.TCL_HOME = $(RHOME)/TclTCL_VERSION = 85# Define to use svnversion to set SVN-REVISION (slow, and requires a clean# checkout with no modifications).# USE_SVNVERSION = YES# We normally link directly against DLLs,# but this macro forces the use of import libs# Needed if using other compilers,# including some versions of MinGW-w64 (but not the ones we use)# USE_IMPLIBS = YES# Some of the 64-bit compilers are in fact cross-compilers and have prefixesBINPREF=# 32- or 64-bit Windows? For MinGW-w64.WIN=32ifeq ($(strip $(WIN)),64)# Mainly -DWIN64 is used, but this define is used in a few placesDEFINES=-DW64BINPREF=x86_64-w64-mingw32-# for sub-architectureR_ARCH="/x64"DEFINES=-DW64 -DR_ARCH='"x64"'endif# set to use ICU (experimental)# USE_ICU=YES# path to parent of ICU headersICU_PATH=/sources/icu# optional overrides for making bitmapdll: names of source directories# JPEGDIR = jpeg-7# PNGDIR = libpng-1.2.35# TIFFDIR = libtiff# set this to YES to build static HTML helpBUILD_HTML = NO## ====== configuration macros for building installer ===========# location where Inno Setup 5.3.x was installed. Spaces allowed.ISDIR=C:/packages/Inno## ====== configuration macros for building MSI installer ===========# location where WiX was installed. Spaces allowed, slashes required.WIXDIR=C:/packages/WiX## =============== end of user-customizable parts ===================## c99 would force __STRICT_ANSI__ disabling strdup etc, and also allocaC99FLAG=-std=gnu99## for mingw-runtime <= 3.11# C99FLAG=-std=gnu99 -fgnu89-inlineifeq ($(strip $(BUILD)),GCC4)F77=$(BINPREF)gfortran$(GCC4_SUFF)FLIBS=-lgfortran## earlier Rtools needs -sjlj; the alternative is -dw2, which fails building R.GCC4_SUFF=endififeq ($(strip $(BUILD)),F2C)F77=sh $(RHOME)/src/scripts/f77_f2cFLIBS=-lf2cendif## usually bin: other values are not yet completely acceptedBINDIR=binifdef USE_IMPLIBSIMPDIR=libelseIMPDIR=$(BINDIR)endif## use in front-ends and internet moduleGRAPHAPP_LIB=-lRgraphapp## used in stats/src/Makevars.winBLAS_LIBS=-L$(RHOME)/$(IMPDIR) -lRblas## these were for packages# LAPACK_LIBS=-L$(RHOME)/$(IMPDIR) -lRlapack# ZLIB_LIBS=-lRzlibAR=$(BINPREF)arAS=$(BINPREF)as# AWK=gawkCAT=catCC=$(BINPREF)gcc$(GCC4_SUFF) $(C99FLAG)CP=cp# as set by makeCPP=$(CC) -EDLL=$(CC)DLLTOOL=$(BINPREF)dlltool## some versions have trouble with paths, so we always need this## even for native buildsDLLTOOLFLAGS=--as $(AS) -kECHO=echo## FIND is only used in installer/MakefileFIND=findLINKER=$(MAIN_LD)MAIN_LD=$(CC)MKDIR=mkdirNM=$(BINPREF)nmPERL=perlRANLIB=$(BINPREF)ranlibRESCOMP=$(BINPREF)windres# as set by makeRM=rm -fSED=sedSORT=sort## from etc/Renviron.site on Unix# EGREP=grep -e# LN_S=cp -p# TAR=tar.SUFFIXES:.SUFFIXES: .c .cc .cpp .C .f .o .a .def .exp .dll .exe .d .f90 .f95 .m .S.c.d:@echo "making $@ from $<"@$(CC) -MM $(CPPFLAGS) $($*-CPPFLAGS) $(DEFINES) $< -o $@.c.o:$(CC) $(CPPFLAGS) $($*-CPPFLAGS) $(CFLAGS) $($*-CFLAGS) $(DEFINES) -c $< -o $@.f.o:$(F77) $(FFLAGS) $($*-FFLAGS) -c $< -o $@%.exe:$(LINKER) $(LINKFLAGS) $($*-LINKFLAGS) -o $@ $^ $($*-LIBS) $(LIBS)%.dll:@$(ECHO) EXPORTS > $*.def@$(NM) $^ | $(SED) -n 's/^.* [BCDRT] _/ /p' >> $*.def$(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ $*.def $^ $($*-DLLLIBS) $(DLLLIBS)@$(RM) $*.deflib%.dll.a: %.def$(DLLTOOL) $(DLLTOOLFLAGS) $($*-DLLTOOLFLAGS) --dllname $*.dll --input-def $*.def --output-lib $@%.a:# @$(ECHO) -------- Building $@ from $^ --------@$(RM) $@$(AR) crs $@ $^## MinGW-w64 at one time needed --use-temp-file%.o: %.rc$(RESCOMP) $(RESFLAGS) $($*-RESFLAGS) -i $< -o $@