Rev 48071 | 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.## ===== 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## ============== configuration macros for building R ===================# Should CHM help be built? Any value other than TRUE disables thisUSE_CHM = TRUE# 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 'HTML Help Workshop' live? (unused if compiled HTML help is# not selectred by USE_CHM = TRUE). Spaces allowed.# Used to build Rchtml.dll: hhc.exe must also be in the path.HHWDIR=C:/Program Files/HTML Help Workshop# Define this to enable memory profiling.# R_MEMORY_PROFILING=YES# Where does Tcl/Tk live? Spaces allowed.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 against DLLs, but this macro forces the use of import libs# Needed if using other compilers, including Mingw64# USE_IMPLIBS = YES# Some of the Mingw64 compilers are in fact cross-compilers and have prefixesBINPREF=# 32- or 64-bit Windows? For experminets with Mingw64.WIN=32ifeq ($(strip $(WIN)),64)USE_IMPLIBS = YESDEFINES=-DW64BINPREF=x86_64-pc-mingw32-USE_CHM = FALSEendif# use ICUUSE_ICU=NO# path to parent of ICU headersICU_PATH=/sources/icu# optional overrides for making bitmapdll: names of source directories# JPEGDIR = jpeg-6b# PNGDIR = libpng-1.2.35# TIFFDIR = libtiff## ====== configuration macros for building installer ===========# location where Inno Setup 5.[12].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 ===================C99FLAG=-std=gnu99ifeq ($(strip $(BUILD)),GCC4)F77=$(BINPREF)gfortran$(GCC4_SUFF)FLIBS=-lgfortran## for mingw-runtime <= 3.11# C99FLAG=-std=gnu99 -fgnu89-inline## earlier Rtools needs -sjlj## an alternative is -dw2, which currently fails building R.GCC4_SUFF=endififeq ($(strip $(BUILD)),F2C)F77=sh $(RHOME)/src/scripts/f77_f2cFLIBS=-lf2cendififeq ($(strip $(USE_IMPLIBS)),YES)IMPDIR=libelseIMPDIR=binendif## 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=echoFIND=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 $@ $^## Mingw64 at one time needed --use-temp-file%.o: %.rc$(RESCOMP) $(RESFLAGS) $($*-RESFLAGS) -i $< -o $@