Skip to content
Snippets Groups Projects
Commit 1c1202b7 authored by Mick Jordan's avatar Mick Jordan
Browse files

native clean build fixes

parent ea68d797
No related branches found
No related tags found
No related merge requests found
......@@ -49,7 +49,7 @@ $(C_LIB): $(OBJ) $(C_OBJECTS)
$(OBJ):
mkdir -p $(OBJ)
$(OBJ)/%.o: $(SRC)/%.c $(TOPDIR)/include/jni/Rinternals.h
$(OBJ)/%.o: $(SRC)/%.c $(TOPDIR)/include/jni/include/Rinternals.h
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
......
......@@ -50,7 +50,10 @@ build: $(GNUR_DIR)/bin/R
$(GNUR_DIR)/bin/R:
(cd $(GNUR_DIR); make >& make.log)
copy: $(BLAS_TARGET) $(LAPACK_TARGET) $(PCRE_TARGET)
copy: $(TARGET_DIR) $(BLAS_TARGET) $(LAPACK_TARGET) $(PCRE_TARGET)
$(TARGET_DIR):
mkdir -p $(TARGET_DIR)
$(BLAS_TARGET): $(GNUR_DIR)/lib/libRblas.$(SHARED_EXT)
cp $(GNUR_DIR)/lib/libRblas.$(SHARED_EXT) $(BLAS_TARGET)
......@@ -63,4 +66,4 @@ $(PCRE_TARGET):
clean:
rm -rf $(GNUR_DIR)
rm $(TARGET_DIR)/*
rm -f $(BLAS_TARGET) $(LAPACK_TARGET) $(PCRE_TARGET)
......@@ -46,10 +46,10 @@ linked:
mkdir -p include
mkdir -p include/R_ext
$(foreach file,$(R_HEADERS_TO_LINK),ln -sf $(GNUR_DIR)/include/$(file) include/$(file);)
cp src/libintl.h .
sed -f sed_Rinternals src/Rinternals.h > include/Rinternals.h
cp src/libintl.h include
ed $(GNUR_DIR)/include/Rinternals.h < ed_Rinternals
$(foreach file,$(R_EXT_HEADERS_TO_LINK),ln -sf $(GNUR_DIR)/include/R_ext/$(file) include/R_ext/$(file);)
cp $(R_EXT_HEADERS_LOCAL) R_ext
cp $(R_EXT_HEADERS_LOCAL) include/R_ext
touch linked
clean:
......
/typedef struct SEXPREC \*SEXP;/
i
#ifdef FASTR
#include <jni.h>
typedef jobject SEXP;
#else
.
+1
a
#endif
.
w include/Rinternals.h
/typedef struct SEXPREC *SEXP;/i\
#ifdef FASTR\
#include <jni.h>\
typedef jobject SEXP\
#else
/typedef struct SEXPREC *SEXP;/a\
#endif
/ dp <- c("datasets", "utils", "grDevices", "graphics",/s/c("/c("fastr", /
/ dp <- c("datasets", "utils", "grDevices", "graphics",/s/c("/c("fastr", "/
......@@ -52,7 +52,7 @@ LIBDIR := $(OBJ)
LIB_PKG := $(OBJ)/$(PKG).so
JNI_INCLUDES = -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/$(OS_DIR)
FFI_INCLUDES = -I$(TOPDIR)/include/jni
FFI_INCLUDES = -I$(TOPDIR)/include/jni/include
INCLUDES := $(JNI_INCLUDES) $(FFI_INCLUDES)
......
......@@ -40,7 +40,7 @@ ifeq ($(FASTR_INSTALL), GNUR)
endif
LDFLAGS := $(LDFLAGS) $(FRAMEWORKFLAGS)
else
INCLUDES := -I $(NATIVE_PROJECT)/include/jni -I $(FASTR_JAVA_HOME)/include -I $(FASTR_JAVA_HOME)/include/$(OS_DIR)
INCLUDES := -I $(NATIVE_PROJECT)/include/jni/include -I $(FASTR_JAVA_HOME)/include -I $(FASTR_JAVA_HOME)/include/$(OS_DIR)
endif
......
#
# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
......@@ -41,7 +41,7 @@ C_OBJECTS := $(subst $(SRC),$(OBJ),$(C_SOURCES:.c=.o))
C_LIB := $(OBJ)/$(C_LIBNAME)
INCLUDE_DIR := $(NATIVE_PROJECT)/include/jni
INCLUDE_DIR := $(NATIVE_PROJECT)/include/jni/include
all: $(C_LIB)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment