Rev 37277 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
#-*- Makefile -*-## This files contains tabs: make sure your editor leaves them unchanged.## ===== configuration macros for building packages or R ===============# Alternatives MINGW (mingw), CROSS (Linux)BUILD=MINGWHELP = YESifeq ($(strip $(BUILD)),CROSS)WINHELP = NOelseWINHELP = CHM # NO or CHMendif## ============== configuration macros for building R ===================# Comment out if the msvcrt.dll malloc/free is required.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_PIIISSE1# Set to YES and specify the path to libacml.a# if you want to use the AMD's ACML BLAS.USE_ACML=NOACML_PATH=c:/packages/AMD/acml2.7.0/gnu32/lib# Set to YES and specify the DLL name if you want to use K. Goto's BLAS.USE_GOTO=NOGOTO_DLL=libgoto_p4_512-r0.9.dll# Where does 'HTML Help Workshop' live? (unused if compiled HTML help is# not requested. Spaces allowed.)HHWDIR=C:/Program Files/HTML Help Workshop# Where does Tcl/Tk live? Spaces allowed.TCL_HOME = $(RHOME)/TclTCL_VERSION = 84# Define to use unicows# USE_UNICOWS = YES# Define to use svnversion to set SVN-REVISION (slow, but more informative# than without it because mixed or modified revisions will be indicated)# USE_SVNVERSION = YES## ====== configuration macros for building installers ===========# location where Inno Setup 5.1.x was installed. Spaces allowed.ISDIR=C:/packages/Inno51## =================== cross-compilation settings =================ifeq ($(strip $(BUILD)),CROSS)# Next might be i386-mingw32msvc- or i586- depending on the cross-compiler.BINPREF=mingw32-# Set this to where the mingw32 include files are. It must be accurate.HEADER=/users/ripley/R/cross-tools4/i586-mingw32/includeendif# path (possibly full path) to same version of R on the host system# R_EXE=R## =============== end of user-customizable parts ===================ifneq ($(strip $(BUILD)),CROSS)ifeq ($(strip $(shell latex --version | grep ^MiKTeX | wc -l)),1)# MiKTeXR_TEXOPTS=--include-directory=$(RHOME)/share/texmfelseR_TEXOPTS=endifelse # cross-buildsR_TEXOPTS=endififeq ($(strip $(BUILD)),MINGW)BINPREF=MINGW32CFLAG=MINGW32LDFLAG=FLIBS=-lg2cAWK=gawk## only safe for gcc >= 3.1DEPARG=-MMendififeq ($(strip $(BUILD)),CROSS)MINGW32CFLAG=-isystem $(HEADER)MINGW32LDFLAG=FLIBS=-lg2cAWK=awk## BDR's build of cross-compiler was 2.95.3DEPARG=-Mendififdef SUPPORT_GUI_MBCSCFLAGS+=-DSUPPORT_GUI_MBCSendififdef USE_UNICOWSLIBEXTRAS += -lunicowsendifPERL=perlRM=rm -fSED=sedECHO=echoCP=cpMKDIR=mkdirCAT=catCC=$(BINPREF)gcc $(MINGW32CFLAG)CXX=$(BINPREF)g++ $(MINGW32CFLAG)F77=$(BINPREF)g77AS=$(BINPREF)asDLL_LDMAIN=gccDLL=$(BINPREF)$(DLL_LDMAIN) $(MINGW32LDFLAG)## use version without -k for front-ends/libproxy.aDLLTOOL_WIN32=$(BINPREF)dlltool --as $(AS)DLLTOOL=$(DLLTOOL_WIN32) -kLINKER=$(BINPREF)gcc $(MINGW32LDFLAG)AR=$(BINPREF)arRANLIB=$(BINPREF)ranlibNM=$(BINPREF)nmCPP=$(CC) -ERESCOMP=$(BINPREF)windres.SUFFIXES: .c .cc .cpp .C .f .o .a .def .exp .dll .exe .d.c.d:@echo "making $@ from $<"@$(CC) $(DEPARG) $(CFLAGS) $($*-CFLAGS) $< -o $@.cc.d:@echo "making $@ from $<"@$(CXX) $(DEPARG) $(CXXFLAGS) $($*-CXXFLAGS) $< -o $@.cpp.d:@echo "making $@ from $<"@$(CXX) $(DEPARG) $(CXXFLAGS) $($*-CXXFLAGS) $< -o $@.C.d:@echo "making $@ from $<"@$(CXX) $(DEPARG) $(CXXFLAGS) $($*-CXXFLAGS) $< -o $@.c.o:$(CC) $(CFLAGS) $($*-CFLAGS) -c $< -o $@.f.o:$(F77) $(FFLAGS) $($*-FFLAGS) -c $< -o $@.cc.o:$(CXX) $(CXXFLAGS) $($*-CXXFLAGS) -c $< -o $@.cpp.o:$(CXX) $(CXXFLAGS) $($*-CXXFLAGS) -c $< -o $@.C.o:$(CXX) $(CXXFLAGS) $($*-CXXFLAGS) -c $< -o $@%.exe:$(LINKER) $(LINKFLAGS) $($*-LINKFLAGS) -o $@ $^ $($*-LIBS) $(LIBS)%.dll:# @$(ECHO) ------- Building $@ from $^ --------@$(ECHO) LIBRARY $* > $*.def@$(ECHO) EXPORTS >> $*.def@$(NM) $^ > Defs@$(SED) -n '/^........ [BCDRT] _/s/^........ [BCDRT] _/ /p' Defs >> $*.def@$(RM) Defs$(DLL) --shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ $*.def $^ $($*-DLLLIBS) $(DLLLIBS)@$(RM) $*.deflib%.a: %.def@$(ECHO) -------- Building $@ from $^ --------$(DLLTOOL) $(DLLTOOLFLAGS) $($*-DLLTOOLFLAGS) --dllname $*.dll --def $*.def --output-lib lib$*.a%.a:# @$(ECHO) -------- Building $@ from $^ --------@$(RM) $@$(AR) cr $@ $^$(RANLIB) $@%.o: %.rc$(RESCOMP) $(RESFLAGS) $($*-RESFLAGS) -i $< -o $@