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"
|