PageRenderTime 23ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/farmR/src/jvm-w32/Makefile

https://code.google.com/p/javawfm/
Makefile | 38 lines | 15 code | 10 blank | 13 comment | 0 complexity | 380cc787e81f49fd8ef26e893aaac678 MD5 | raw file
 1# helper tools and libs for building and running rJava for Windows
 2# Author: Simon Urbanek
 3
 4TARGETS=libjvm.dll.a findjava.exe WinRegistry.dll
 5
 6# libjvm.dll.a    - wrapper lib for jvm.dll from Java
 7# findjava.exe    - helper tool to find the current JDK from the registry
 8# WinRegistry.dll - helper lib to provide registry access to rJava before
 9#                   rJava.dll is loaded, because at that point path to
10#                   jvm.dll must be known. We don't hard-code the JVM path,
11#                   because updates of JRE/JDK can re-locate it.
12
13all: $(TARGETS)
14
15libjvm.dll.a: jvm.def
16	dlltool --input-def jvm.def --kill-at --dllname jvm.dll --output-lib libjvm.dll.a
17
18# compile findjava.exe from source - no magic here, no special libs necessary
19findjava.o: findjava.c
20	$(CC) -O2 -c -o $@ $^
21
22findjava.exe: findjava.o
23	$(CC) -s -o $@ $^
24
25# compile WinRegistry.dll - this can be tricky, because it should emulate
26# the way R builds package DLLs. I know of no easier or more reliable way
27# to do that ..
28WinRegistry.o: WinRegistry.c
29	$(CC) -O2 -c -o $@ $^ -I$(RHOME)/include
30
31WinRegistry.dll: WinRegistry.o
32	$(CC) --shared -s -o $@ $^ -lR -L$(RHOME)/src/gnuwin32 -L$(RHOME)/bin
33
34# just cleanup everything
35clean:
36	rm -f *.o *~ $(TARGETS)
37
38.PHONY: all clean