File: GNUmakefile

package info (click to toggle)
r-cran-rinside 0.2.19-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 668 kB
  • sloc: cpp: 3,310; ansic: 117; xml: 57; ruby: 34; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 672 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
# Basic R extensions info
R_HOME := $(shell R RHOME)
RLDFLAGS := $(shell $(R_HOME)/bin/R CMD config --ldflags)

# Header files required by Rcpp
RCPPFLAGS := $(shell $(R_HOME)/bin/R CMD config --cppflags)

# Location of RInsideC.h
RINSIDECINCL := $(shell echo 'RInside:::CFlags()' | $(R_HOME)/bin/R --vanilla --slave)

# Location of RInsideC library
RINSIDECLIBS := $(shell echo 'RInside:::LdFlags()'  | $(R_HOME)/bin/R --vanilla --slave)

# C compiler
CC := $(shell $(R_HOME)/bin/R CMD config CC)

FLAGS := $(RLDFLAGS) $(RCPPFLAGS) $(RINSIDECLIBS) $(RINSIDECINCL)

hello:
	$(CC) hello.c $(FLAGS) -o hello
	./hello

pass:
	$(CC) passdata.c $(FLAGS) -o passdata
	./passdata