File: Makevars.win

package info (click to toggle)
r-cran-eaf 2.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,016 kB
  • sloc: ansic: 7,281; perl: 848; makefile: 73; sh: 43; python: 27
file content (31 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 							-*- mode: makefile -*-
# Do not put GCC specific flags here. Put them instead in CFLAGS and
# CXXFLAGS in ~/.R/Makevars
# This is from https://github.com/eddelbuettel/rcppgsl/blob/master/tools/winlibs.R
RSCRIPT := "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe"
GSL_ROOT :=$(shell $(RSCRIPT) -e 'cat(file.path(getwd(), "../windows/gsl-2.7/"))')
GSL_CFLAGS = -I"$(GSL_ROOT)/include"
GSL_LIBS   = -L"$(GSL_ROOT)/lib${R_ARCH}${CRT}" -lgsl -lgslcblas
DEBUG=0
PKG_CPPFLAGS = $(GSL_CFLAGS) -DR_PACKAGE -DDEBUG=$(DEBUG) -I./eaf/ -I./mo-tools/
PKG_LIBS = $(GSL_LIBS)
EAF_SRC_FILES= avl.c eaf3d.c eaf.c io.c
MOTOOLS_SRC_FILES = hv_contrib.c hv.c pareto.c whv.c whv_hype.c
SOURCES = $(EAF_SRC_FILES:%=eaf/%) $(MOTOOLS_SRC_FILES:%=mo-tools/%) init.c  Reaf.c  Repsilon.c  Rhv.c  Rnondominated.c
OBJECTS = $(SOURCES:.c=.o)

export GSL_CFLAGS GSL_LIBS

.PHONY: all clean winlibs

all: $(SHLIB)

$(SHLIB): $(OBJECTS)

clean:
	@-rm -f *.o *.so *.dll eaf/*.o	mo-tools/*.o

$(OBJECTS): winlibs

winlibs:
	$(RSCRIPT) "../tools/winlibs.R"