The R Project SVN R

Rev

Rev 88902 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6994 pd 1
#-*- Makefile -*-
4394 ripley 2
 
51479 ripley 3
## This is only used when building R itself but it does customize
78894 ripley 4
## etc/*/Makeconf: see fixed/Makefile
51479 ripley 5
 
67240 murdoch 6
## Customize by copying to MkRules.local and uncommenting and editing 
87997 kalibera 7
## some of the definitions there. The values are tailored to Rtools45, the
8
## currently recommended toolchain using gcc 14, MinGW-w64 11, 64-bit only,
86117 kalibera 9
## UCRT. R is only intended to be built for 64-bit UCRT as of R 4.2. The
87997 kalibera 10
## values also work with Rtools45 on aarch64 (LLVM 19, clang/flang-new, lld,
86117 kalibera 11
## libc++) via USE_LLVM=1 and WIN=.
67240 murdoch 12
 
51102 ripley 13
## =========== configuration macros for building packages ================
17913 ripley 14
 
81360 kalibera 15
# LOCAL_SOFT is intended to point to software collection with static
16
# libraries and headers installed "outside of Rtools", in the same spirit as
17
# software is installed on Linux into '/usr/local' if it is not available in
18
# the respective Linux distribution. 
19
#
20
# CRAN distributed this software and running 'make rsync-extsoft' would
21
# populate the default directory $(R_HOME)/extsoft.  The versions used on
22
# CRAN recommended for R 2.14.2 to 3.2.4 can still be found at
23
# https://www.stats.ox.ac.uk/pub/Rtools/libs.html
24
#
25
# Eventually, this software collection became part of Rtools, so it should
26
# no longer be referred to via LOCAL_SOFT.  Rtools42 hence introduce
27
# variable R_TOOLS_SOFT for use in R packages to refer to headers or
28
# libraries in the Rtools software collection (which in turn can be
29
# influenced by R_CUSTOM_TOOLS_SOFT for packages).  LOCAL_SOFT should not be
30
# used for that purpose.  R source code refers to that software collection
31
# using EXT_LIBS.
32
#
33
# However, a number of CRAN packages ended up referring to Rtools software
34
# collection via LOCAL_SOFT, so LOCAL_SOFT is set up by default to also
81376 kalibera 35
# point to the Rtools software. This may be changed in the future.
81360 kalibera 36
#
87997 kalibera 37
# To build R from source with Rtools45 (installed from installer as well as
81376 kalibera 38
# tarball), gcc has to be on PATH and LOCAL_SOFT can be computed as follows:
81360 kalibera 39
#
81376 kalibera 40
# LOCAL_SOFT ?= $(shell which `echo $(CC) | sed -e 's/ .*//g'` | sed -e 's!/bin/[^/]\+!!g')
41
#
51102 ripley 42
## ============== configuration macros for building R ===================
43
 
67155 ripley 44
# Path of library directory containing zlib, bzlib, liblzma, pcre,
80902 kalibera 45
# libpng, libjpeg, libtiff, xz.
67240 murdoch 46
# EXT_LIBS = $(LOCAL_SOFT)
67080 ripley 47
 
86218 kalibera 48
# Set to 1 when using LLVM (e.g.  with the recommended toolchain for
49
# aarch64)
50
# USE_LLVM =
51
 
87099 kalibera 52
# Set to NO to disable pkg-config. Otherwise, pkg-config will be used when
53
# available to figure out C preprocessor flags and linking commands to link
54
# R (and packages part of R distribution) against external libraries.
55
# It is assumed that when available, pkg-config is on PATH.
56
# USE_PKG_CONFIG =
57
 
86218 kalibera 58
# Debug flag, -gdward-2 can be used with GCC, -g3 can be used with clang.
67240 murdoch 59
# G_FLAG = -gdwarf-2
38642 ripley 60
 
17913 ripley 61
# Set to YES and specify the path if you want to use the ATLAS BLAS.
67240 murdoch 62
# USE_ATLAS = NO
67302 ripley 63
# ATLAS_PATH =
17913 ripley 64
 
87317 kalibera 65
# Set to YES if you want to use OPENBLAS. OPENBLAS libraries are looked up
66
# using pkg-config. OPENBLAS and pkg-config are part of Rtools.
67
# USE_OPENBLAS = NO
68
 
43261 ripley 69
# Support for the ACML and Goto BLASes has been withdrawn: see R-admin.html
36320 ripley 70
 
45560 murdoch 71
# Define to use svnversion to set SVN-REVISION (slow, and requires a clean
72
# checkout with no modifications).
34404 murdoch 73
# USE_SVNVERSION = YES
74
 
86218 kalibera 75
# Some of the toolchains have prefixes for e.g.  ar, gcc.  This can also be
76
# used to give the full path to the compiler, including a trailing / .  When
77
# cross-compiling using the recommended toolchain, one would set this to
78
# aarch64-w64-mingw32.static.posix- for aarch64 and to
79
# x86_64-w64-mingw32.static.posix- for x86_64 target.
80
# BINPREF64 =
81
 
70374 murdoch 82
# Set this to indicate a non-gcc compiler and version
83
# COMPILED_BY = <determined automatically>
47846 ripley 84
 
55076 ripley 85
# Others use a -m64 or -m32 option to select architectures
67240 murdoch 86
# M_ARCH =
55078 ripley 87
# and for as (--32 or --64)
67240 murdoch 88
# AS_ARCH =
55141 ripley 89
# and for windres (-F pe-i386 or pe-x86-64)
67240 murdoch 90
# RC_ARCH =
55218 ripley 91
# and for dlltool ("-m i386 --as-flags --32" vs "-m i386:x86-64 --as-flags --64")
67240 murdoch 92
# DT_ARCH =
55076 ripley 93
 
70266 murdoch 94
# The gcc 4.9.3 64 bit toolchain is set up for the 'medium code' model and needs
95
# to remove the .refptr and .weak entries from the exports list; this is the default
70358 murdoch 96
# NM_FILTER = | $(SED) -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d'
67837 murdoch 97
 
57924 ripley 98
# We normally link directly against DLLs, 
99
# but this macro forces the use of import libs
100
# Has been needed for some versions of MinGW-w64
101
# USE_IMPLIBS = YES
102
 
103
 
66031 ripley 104
# set to use ICU
66034 ripley 105
# USE_ICU = YES
45518 ripley 106
# path to parent of ICU headers
67302 ripley 107
# ICU_PATH =
78893 ripley 108
# needed libs varies by version and build.
86218 kalibera 109
# ICU_LIBS = -lsicuin -lsicuuc $(EXT_LIBS)/lib/sicudt.a -lstdc++
45518 ripley 110
 
67444 ripley 111
# set to use libcurl
112
# USE_LIBCURL = YES
113
# path to parent of libcurl headers
114
# CURL_PATH =
86218 kalibera 115
# libs: currently recommended toolchain
116
# CURL_LIBS= -lcurl -lpsl -lbcrypt -lzstd -lrtmp -lssl -lssh2 -lbcrypt -lgcrypt \
117
#            -lcrypto -lgdi32 -lz \
118
#            -lws2_32 -lgdi32 -lcrypt32 -lidn2 -lunistring -liconv -lgpg-error -lwldap32 \
119
#            -lwinmm -lbrotlidec -lbrotlicommon
67444 ripley 120
 
83541 ligges 121
# For the cairographics devices:
81360 kalibera 122
# set to build cairo devices in "cairodevices" or "distribution" targets
123
# (they are not built in "all" even if this is set)
124
# USE_CAIRO = YES
125
# set to cairo headers (included in the recommended toolchain, but under "cairo")
86218 kalibera 126
# CAIRO_CPPFLAGS = "-I$(EXT_LIBS)/include/cairo -I$(EXT_LIBS)/include/freetype2 \
127
#                   -DCAIRO_WIN32_STATIC_BUILD"
81360 kalibera 128
# set to cairo libraries (included in the recommended toolchain)
86218 kalibera 129
# CAIRO_LIBS = "-lcairo -lfontconfig -lfreetype -lpng -lpixman-1 -lexpat -lharfbuzz \
130
#               -lbz2 -lintl -lz -liconv -luuid -lstdc++ -lgdi32 -lmsimg32 -lole32 \
131
#               -lbrotlidec -lbrotlicommon"
81360 kalibera 132
#
133
# Previous versions of R used CAIRO_HOME and an empty value meant to not
134
# build cairo. This is no longer used.
55657 ripley 135
 
50366 murdoch 136
# set this to YES to build static HTML help
67240 murdoch 137
# BUILD_HTML = NO
48071 ripley 138
 
78893 ripley 139
# TEXI2DVI = texi2dvi
81360 kalibera 140
# MiKTEX no longer provides texi2dvi and needs something like (previous toolchains)
69459 ripley 141
# TEXI2DVI = TEXINDEX=/Rtools/bin/texindex.exe texify
81360 kalibera 142
# with the currently recommended toolchain, Msys2 texi2dvi is used, but needs a workaround for a bug
143
# TEXI2DVI = env COMSPEC= texi2dvi
54749 ripley 144
 
88902 smeyer 145
# For Texinfo >= 6.8. If the texinfo files are installed at /packages/texinfo,
67343 murdoch 146
# TEXI2ANY = /path/to/perl -I/packages/texinfo /packages/texinfo/texi2any
147
# if you do not have texinfo (default),
148
# TEXI2ANY = missing
64019 ripley 149
 
87747 kalibera 150
# C standard to use by default (override the compiler default)
151
# CSTD = -std=gnu2x
152
 
76828 kalibera 153
# additional optimization flags (e.g. -mtune=native for a private build)
81254 kalibera 154
#
155
# -mstackrealign is used to avoid traps due to misaligned addresses with
81360 kalibera 156
#   SSE2 (seen on 32-bit builds with forced SSE2 using -mfpmath=sse -msse2,
157
#   probably not needed on 64-bit builds)
81254 kalibera 158
#
81468 kalibera 159
# -fexceptions was used as a workaround for GCC 10.3.0 bug causing crashes in
81447 kalibera 160
#   long jumps due to invalid unwind tables. This is the only reason for
161
#   this option as R does not use structured exception handling from C.
162
#   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103274
163
#   
164
#   -fno-reorder-blocks-and-partition was not a suitable workaround because
165
#   of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103465
81254 kalibera 166
#
81447 kalibera 167
#   (reorder-blocks-and-partition has been fixed in GCC, so -fexceptions
168
#   should no longer be needed for newer versions of GCC and the recommended
84100 kalibera 169
#   toolchain)
81254 kalibera 170
#
86227 kalibera 171
# -Wa,-muse-unaligned-vector-move can be used to make binutils (on x86_64)
86218 kalibera 172
#   turn vectorized instructions requiring aligned vectors into instructions
86317 kalibera 173
#   not requiring them; this can be used as a work-around when compiling with
86218 kalibera 174
#   GCC with AVX2 instructions enabled, for a bug due to which GCC does not
175
#   ensure that local variables are 32-byte aligned. See
86227 kalibera 176
#   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412
86218 kalibera 177
#   This bug is still present in GCC 13.
178
#
81468 kalibera 179
# EOPTS = -mfpmath=sse -msse2 -mstackrealign $(LTO)
56065 ripley 180
 
87562 kalibera 181
# sanitizer options to be passed to the compiler and linker; this requires
182
# support in the compiler toolchain
183
# e.g. -fsanitize=address,undefined,bounds
184
# SANOPTS = 
185
 
57417 ripley 186
# define to -fopenmp if the toolchain has OpenMP support
67240 murdoch 187
# OPENMP = -fopenmp
57417 ripley 188
 
58553 ripley 189
# define to -pthread if the toolchain has pthreads support
67240 murdoch 190
# PTHREAD = -pthread
57944 ripley 191
 
78893 ripley 192
# define to use Link-Time Optimization.
78909 ripley 193
# standard value is -flto, or e.g. -flto=8 to use 8 threads
78893 ripley 194
# LTO =
78909 ripley 195
# flag for use with Rcmd INSTALL --use-LTO
78894 ripley 196
# LTO_OPT =
78893 ripley 197
 
36544 ripley 198
## ====== configuration macros for building installer ===========
17913 ripley 199
 
81360 kalibera 200
# location where Inno Setup 6 was installed. Spaces allowed.
201
# ISDIR = C:/Program Files (x86)/Inno Setup 6
17913 ripley 202
 
54396 ripley 203
# optional location where qpdf was installed (in $(QPDF)/bin). Spaces allowed.
67240 murdoch 204
# QPDF =
54396 ripley 205
 
57436 ripley 206
# Full paths of extra DLLs that need to be shipped
207
# e.g
67240 murdoch 208
# DLLs64 =
57436 ripley 209
 
86218 kalibera 210
# External build-tree with pre-compiled (e.g. cross-compiled) R binaries.
211
# Can be used to cross-compile installer for Windows/aarch64 on
212
# Windows/x86_64.
213
# CROSS_BUILD =
67854 murdoch 214
 
38882 ripley 215
## ====== configuration macros for building MSI installer ===========
216
 
53954 ripley 217
# location where WiX 3.x executables were installed. Spaces allowed.
218
# The MSI uses '/bin': other packagings may not
86406 kalibera 219
# WIX3DIR = C:/packages/WiX3.14/bin
38882 ripley 220
 
51597 ripley 221
# set to 1 for a non-elevated per-user installer
67240 murdoch 222
# WIX_PERSONAL = 0
51597 ripley 223
 
17913 ripley 224
## =============== end of user-customizable parts  ===================